Python interface to a free corpus subset from ruscorpora.ru
This package provides Python interface to a free corpus subset available at http://ruscorpora.ru.
pip install ruscorpora-tools
Download and unpack the archive with XML files from http://www.ruscorpora.ru/corpora-usage.html
ruscorpora.parse_xml function parses single XML file and returns an iterator over sentences; each sentence is a list of ruscorpora.Token instances, annotated with a list of ruscorpora.Annotation instances.
ruscorpora.simplify simplifies a result of ruscorpora.parse_xml by removing ambiguous annotations, joining split tokens (+ joining their annotations) and removing accent information.
>>> import ruscorpora as rnc >>> for sent in rnc.simplify(rnc.parse('fiction.xml')): ... print(sent)
Development happens at github and bitbucket:
The issue tracker is at github: https://github.com/kmike/ruscorpora-tools/issues
Feel free to submit ideas, bugs, pull requests (git or hg) or regular patches.
Make sure tox is installed and run
from the source checkout. Tests should pass under python 2.6..3.3 and pypy > 1.8.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size ruscorpora-tools-0.3.tar.gz (8.3 kB)||File type Source||Python version None||Upload date||Hashes View|