Git Product home page Git Product logo

keyword-mining's Introduction

keyword-mining

License: MIT Python 2.7

API - extract keywords from a text or a web page.

The algorithm extracts all nominal groups (candidate keywords) from the text and, for each one, attributes a score based on multiple parameters including the number of occurrences. The final list of keywords is composed of best-scored nominal groups.

Note

For the moment, this tool works only for English and French.

INSTALL AND RUN

REQUIREMENTS

This tool requires Python2.7 (not working for Python3).

WITH PIP

git clone https://github.com/AnthonySigogne/keyword-mining.git
cd keyword-mining
pip install -r requirements.txt

Then, run the tool :

FLASK_APP=index.py flask run

To run in debug mode, prepend FLASK_DEBUG=1 to the command :

FLASK_DEBUG=1 ... flask run

WITH DOCKER

To run the tool with Docker, you can use my DockerHub image : https://hub.docker.com/r/anthonysigogne/keyword-mining/

docker run -p 5000:5000 anthonysigogne/keyword-mining

Or, build yourself a Docker image :

git clone https://github.com/AnthonySigogne/keyword-mining.git
cd keyword-mining
docker build -t keyword-mining .

USAGE AND EXAMPLES

To list all services of API, type this endpoint in your web browser : http://localhost:5000/

FROM A TEXT

Index a web page through its URL.

  • URL

    /keywords_from_text

  • Method

    POST

  • Form Data Params

    Required:

    text=[string], the text to analyze

    Not required:

    hits=[int], limit number of keywords returned, 100 by default

  • Success Response

    • Code: 200
      Content:
      {
        "keywords": [
          "computer science PhD in applied Language",
          "PhD in Computer Science",
          "Creation of ergonomic websites",
          "Modern infrastructure with API",
          "Development of effective application",
          "experience of research laboratories",
          "projects for international clients",
          "Computer courses for individuals",
          ...
        ]
      }
      
  • Error Response

    • Code: 400 INVALID USAGE
  • Sample Call (with cURL)

    curl http://localhost:5000/keywords_from_text --data "text=True programming enthusiast, I quickly oriented to computer studies at the university, until a computer science PhD in applied Language Processing."
    

FROM AN URL

Query engine to find a list of relevant URLs. Return the sublist of matching URLs sorted by relevance, and the total of matching URLs, in JSON.

  • URL

    /search

  • Method

    POST

  • Form Data Params

    Required:

    url=[string], the url to analyze

    Not required:

    hits=[int], limit number of keywords returned, 100 by default

  • Success Response

    • Code: 200
      Content:
      {
        "keywords": [
          "computer science PhD in applied Language",
          "PhD in Computer Science",
          "Creation of ergonomic websites",
          "Modern infrastructure with API",
          "Development of effective application",
          "experience of research laboratories",
          "projects for international clients",
          "Computer courses for individuals",
          ...
        ]
      }
      
  • Error Response

    • Code: 400 INVALID USAGE
  • Sample Call (with cURL)

    curl http://localhost:5000/keywords_from_url --data "url=https://www.byprog.com/en"
    

FUTURE FEATURES

  • more languages
  • compatibility with Python3
  • filter bad keywords (verbs,...)

LICENCE

MIT

keyword-mining's People

Contributors

anthonysigogne 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.