Contents:
The NGram class is a set that supports searching for its members by N-Gram string similarity. It is a full subclass of the built-in set that maintains N-Gram indexing on all set operations. The algorithm is based from String::Trigram by Tarek Ahmed.
NGram up to version 2.0.0b2 was written by Michel Albert, and since then has had a major rewrite and been maintained by Graham Poulter: see Changes in Version 3
NGram is hosted at the Python Package Index, and this is the online documentation.
Simple way is to install from PyPI:
easy_install ngram
Or download the source tarball from PyPI and install locally:
python setup.py install --prefix=$HOME/.local
With source you can build documentation in docs/_build/html:
python setup.py build_sphinx
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.