This is a simple nlp project providing a ngram model package.
Project description
Ngram Model
This is a basic python module that creates and then pads bigrams from a given sentence.
Python Requirements
Any Python version 3.6 and above is supported.
Install
Install this pip package by typing the following into the command prompt:
pip install nmodels
Nmodels
To import the module 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 Distribution
nmodels-0.0.5.tar.gz
(2.5 kB
view hashes)