Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/japerk/nltk-trainer

Train NLTK objects with zero code
https://github.com/japerk/nltk-trainer

Last synced: about 1 month ago
JSON representation

Train NLTK objects with zero code

Awesome Lists containing this project

README

        

NLTK Trainer
------------

NLTK Trainer exists to make training and evaluating NLTK objects as easy as possible.

Requirements
------------

The scripts with default arguments have been tested for compatibility with Python3.7 and NLTK 3.4.5. If something does not work for you, please `open an issue `_. Include the script with arguments and failure or exception output. To use the sklearn classifiers, you must also install `scikit-learn `_.

If you want to use any of the corpora that come with NLTK, you should `install the NLTK data `_.

Documentation
-------------

Documentation can be found at `nltk-trainer.readthedocs.org `_ (you can also find these documents in the `docs directory `_. Many of the scripts are covered in `Python 3 Text Processing with NLTK 3 Cookbook `_, and every script provides a ``--help`` option that describes all available parameters.

Using Trained Models
--------------------

The trained models are pickle files that by default are put into your ``nltk_data`` directory. You can load them using ``nltk.data.load``, for example::

import nltk.data
classifier = nltk.data.load('classifiers/movie_reviews_NaiveBayes.pickle')

You now have a NLTK classifier object you can work with.