Skip to content

Latest commit

 

History

History
39 lines (28 loc) · 1 KB

README.md

File metadata and controls

39 lines (28 loc) · 1 KB

Reverse Dictionary

Ever had that problem when you know of the concept yet can't recall the word? Thesaurus are usually pretty poor at this task, because it's built to link individual words to each other, instead of definitions to a single word.

This solution is built from WordNet through NLTK and TextBlob. It utilizes tfidf implemented by Elasticsearch to index each word by their definitions.

Install

# install elasticsearch via https://www.elastic.co/downloads/elasticsearch 
git clone git@github.com:whosken/reversedict.git
cd reversedict
pip install -r requirements.txt
python cli.py --index

Usage

Basic look up

import reversedict
reversdict.lookup('run fast')

or

python cli.py 'run fast'

Synonym boosting

python cli.py 'run fast' --synonym sprint