Giter Club home page Giter Club logo

marvin's Introduction

Marvin

Installation

Get a pull of repository

Use the package manager pip to install packages.

pip install -r requirements.txt

Execute below command to start the server

flask run

API Documentation

Getting frequency of words [POST]

Endpoint:

default user_id: 700

http://localhost:5000/word_frequency_analysis

or

Optional

http://localhost:5000/word_frequency_analysis?user_id=500

Input Parameters (json body):

topic_name(String)
frequency_rank(Integer)

Example:

{
    "topic_name": "Earth",
    "frequency_rank": "5"
}

Response:

Status Code: 200

{
    "data": [
        {
            "frequency": Integer,
            "word": String
        }
    ],
    "success": Boolean
}

Status Code: 400

{
    "message": String,
    "success": Boolean
}

History of search results

Input Parameters (Type query params):

user_id [Optional] default user_id is 700 if not passed

Endpoint

http://localhost:5000/history

or

http://localhost:5000/history?user_id=500

Response:

{
    "data": [
        {
            "search": [
                {
                    "frequency": 387,
                    "word": "the"
                },
                {
                    "frequency": 348,
                    "word": "of"
                },
                {
                    "frequency": 190,
                    "word": "and"
                },
                {
                    "frequency": 185,
                    "word": "a"
                },
                {
                    "frequency": 174,
                    "word": "to"
                }
            ],
            "time": "2024-02-07 04:46:20"
        }
    ],
    "success": true
}

If any of topic not found use below url [POST]

http://localhost:5000/search_wikipedia_topics

Parameter:

{
    "topic_name": "Earth"
}

Response:

{
    "data": [
        "Earth",
        "Google Earth",
        "Moon",
        "Flat Earth",
        "Earth Day",
        "Earth–Moon–Earth communication",
        "Not of This Earth",
        "The Earth Is ...",
        "Near-Earth object",
        "Salt of the earth"
    ],
    "success": true
}

Unit Testing

pytest

marvin's People

Contributors

manojks1999 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.