Skip to content

Latest commit

 

History

History
65 lines (46 loc) · 3.03 KB

README.md

File metadata and controls

65 lines (46 loc) · 3.03 KB

Language Model

GitHub license Supported python versions

A simple Language model having features such as Autocomplete, Spell Check, Word Segmenter, Custom Entity Tagger, Nearest Words.

Index

Features

⬆️ Back to top

  • Autocomplete : predict the future words/sentences on the basis of given words/letters.
  • Spell Check : Returns the correct candididates word for the entered wrong word.
  • Entity Tagger : Returns the entities in a given correct or disambiguated query, along with the domains to which they belongs.
  • Word Segmenter : Returns the segmented words from given joined query/sentence.
  • Nearest words :Returns the nearest words to the given word.

Installation

⬆️ Back to top

Clone it

$ git clone https://github.com/codeorbit/Language_Model
$ cd Language_Model && pip install -r requirements.txt

Run it

Fire it up! 🌋

$ python api.py

How To Use??

Created api calls for each features which returns result as json.

  • List of api : Request http://localhost:7777/language_model/

    • Result : will show all api call urls.
  • Autocomplete : Request http://localhost:7777/language_model/autocomplete/<name> where name will be word/sentence/letter (without angle brackets).

    • Result : list of words or sentences which can come after the given word/sentence/letter in decreasing order of their probability.
  • Spell Check : Request http://localhost:7777/language_model/spellcheck/<name> where name will be incorrect word (wihtout angle brackets).

    • Result : list of correct candidate words for entered incorrect word.
  • Word Segmenter : Request http://localhost:7777/language_model/wordsegment/<name> where name will be joined words or sentences (without angle brackets) for e.g. googlegmail .

    • Result : Returns the list of segmented words for e.g. [google,gmail].
  • Entity Tagger : Request http://localhost:7777/language_model/getentity/<name> where name will be sentences or words after removing stopwords.

    • Result : Returns given query, tagged entities, and their domains and disambiguation link.
  • Nearest Words : Request http://localhost:7777/language_model/nearestword/<name> where name will be word for which nearest needs to be find.

    • Result : Returns list of top 5 nearest words.
    • Alternate : Request http://localhost:7777/language_model/nearestword/<name>/<top_n> where top_n will be integer. This will return top_n nearest results.

Issues

You can tweet me if you can't get it to work. In fact, you should tweet me anyway.