Tiny preprocessor for Russian text


Keywords
natural-language-processing, nlp, preprocessing, python
License
BSD-3-Clause
Install
pip install toxine==1.0.52

Documentation

RuMor: Russian Morphology project

Toxine: a tiny python NLP library for Russian text preprocessing

PyPI Version Python Version License: BSD-3

A part of RuMor project. It contains pipeline for preprocessing and tokenization texts in Russian. Also, it includes preliminary entity tagging. Highlights are:

  • Extracting emojies, emails, dates, phones, urls, html/xml fragments etc.
  • Tagging/removing tokens with inallowed symbols
  • Normalizing of punctuation
  • Tokenization (via NLTK)
  • Russan Wikipedia tokenizer

Installation

pip

Toxine supports Python 3.5 or later. To install it via pip, run:

$ pip install toxine

If you currently have a previous version of Toxine installed, use:

$ pip install toxine -U

From Source

Alternatively, you can also install Toxine from source of this git repository:

$ git clone https://github.com/fostroll/toxine.git
$ cd toxine
$ pip install -e .

This gives you access to examples that are not included to the PyPI package.

Setup

Toxine uses NLTK with punkt data downloaded. If you didn't do it yet, start Python interpreter and execute:

>>> import nltk
>>> nltk.download('punkt')

Usage

Text Preprocessor

Wrapper for tokenized Wikipedia

Examples

You can find them in the directory examples of our Toxic github repository.

License

Toxine is released under the BSD License. See the LICENSE file for more details.