Extract synonyms from sentences using Aho Corasick algorithm
Project description
synonym-extractor
==============
``Usage``::
# 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):
synonym_extractor.add_to_synonym(synonym_name, clean_name)
synonyms_found = synonym_extractor.get_synonyms_from_sentence('I love SF and NY')
``Output``::
synonyms_found
>> ['new york', 'san francisco']
Algorithm
----------
synonym-extractor is based on `Aho-Corasick algorithm
<https://en.wikipedia.org/wiki/Aho%E2%80%93Corasick_algorithm>`_.
Documentation
----------
Documentation can be found at `Read the Docs
<http://synonym-extractor.readthedocs.org>`_.
License
-------
The project is licensed under the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for synonym_extractor-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3fbe712ef0b2052225ded965d09f7bb8a6116a96a2abf9bb14cfa0ebd4b85373 |
|
MD5 | 270ed25c697cab2410a18282d9f4f367 |
|
BLAKE2b-256 | 34e543fa7b0eca1661734129d818044955b48a042899790e1e7e5736dbd7932b |