This is a simple nlp project providing a ngram model package.
Project description
Ngram Model
This is a basic python module that creates and pads bigrams.
Python Requirements
Any python version above 3.6 is supported.
Install
Install this pip package by typing the following into the command prompt:
pip install ngram
Nmodels
To import the simple_bigram function, proceed as follows:
>>> import ngrams
>>> from nmodels.gram import simple_bigram
>>> string = "Hello world, how are you"
>>> [('<START>', 'Hello'), ('Hello', 'world,'), ('world,', 'how'),
('how', 'are'), ('are', 'you'), ('you', '<END>')]
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.