Coder Social home page Coder Social logo

foprel / ner-api Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 18 KB

An experiment with Named-Entity Recognition in Python using the Flask and FuzzyWuzzy libraries

License: MIT License

Python 100.00%
api flask fuzzywuzzy named-entity-recognition python

ner-api's Introduction

ner-api

โš ๏ธ Security warning: This project is experimental and provided as-is (see MIT license).

Description

An experiment with Named-Entity Recognition in Python using the Flask and FuzzyWuzzy libraries. Flask serves as an API which expects fuzzy entity names, which are compared against a list of valid entity names using FuzzyWuzzy.

Installation

git clone https://github.com/foprel/ner-api.git
cd ner-api

Usage

Set the server-side environment variables for the NER API.

SECRET_KEY=your_secret_key
USERNAME=your_username
PASSWORD=your_password
IP_RANGES=your_ip_ranges

Start the NER API server using Flask:

flask run

Login the NER API client using bash. Be aware that the jq library is required to parse the JSON response.

USERNAME=username \
PASSWORD=password \
LOGIN=$(echo -n "$USERNAME:$PASSWORD" | base64) \
TOKEN=$(curl -H "Authorization:Basic ${LOGIN}" "http://127.0.0.1:5000/login" | jq -r ".token") \

Request a named-entity match using bash. You will need to pass two HTTP headers. The first contains the JSON payload containing the requested named-entity. The second contains the Web Token obtained in the previous setp to authorize the request.

curl -X POST "http://127.0.0.1:5000/api/named-entity-recognizer/" \
-H "Content-Type: application/json" \
-d '{"account_name_client":"entity_name"}' \
-H "token: $TOKEN" \

Acknowledgements

ner-api's People

Contributors

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