Extract synonyms from sentences using Aho Corasick algorithm
# Create an object of SynonymExtractor
synonym_extractor = SynonymExtractor()
# add synonyms to it
synonym_names = ['NY', 'SF']
clean_names = ['new york', 'san francisco']
for synonym_name, clean_name in zip(synonym_names, clean_names):
synonyms_found = synonym_extractor.get_synonyms_from_sentence('I love SF and NY')
>> ['new york', 'san francisco']
synonym-extractor is based on `Aho-Corasick algorithm
Documentation can be found at `Read the Docs
The project is licensed under the MIT license.
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Hashes for synonym_extractor-0.1.0-py2.py3-none-any.whl