Skip to main content

Kadot, the clean natural language processing toolkit.

Project description

.. figure::
:alt: Kadot


Unsupervised natural language processing library.

|Build Status| |Code Health| |PyPI version| |GitHub license|

**Kadot** just lets you process a text easily.

.. code:: python

>>> hello_world = Text("Kadot just lets you process a text easily.")
>>> hello_world.ngrams(n=2)

[('Kadot', 'just'), ('just', 'lets'), ('lets', 'you'), ('you', 'process'), ('process', 'a'), ('a', 'text'), ('text', 'easily')]

🔋 What's included ?

Kadot includes **tokenizers**, text **generators**, **classifiers**, word-level and
document-level **vectorizers**.

The philosophy of Kadot is *"never hardcode the language rules"* : use
**unsupervised solutions** to support most languages. So it will never
includes Treebank based algorithms (like a POS Tagger) : use
`TextBlob <>`__ to do that.

🤔 How to use it ?

You can play with the TextBlob-like syntax :

.. code:: python

>>> from kadot import Text
>>> example_text = Text("This is an example text !")
>>> example_text.words

['This', 'is', 'an', 'example', 'text']

>>> example_text.ngrams(n=2)

[('This', 'is'), ('is', 'an'), ('an', 'example'), ('example', 'text')]

And use the words vectorizer to get words relations :

.. code:: python

>>> large_corpus = """Enter a large text, in preference about history."""
>>> history_book = Text(large_corpus)
>>> vectors = history_book.vectorize(window=20, reduce_rate=300)
>>> vectors.apply_translation(vectors['man'], vectors['woman'], vectors['king'], best=1)

# 'man' is to 'woman' what 'king' is to...
[('queen', 0.86899999)]

For more usages, check
`examples <>`__.
An advanced documentation is coming.

🔨 Installation

Use the ``pip`` command that refair to the Python 3.5 or 3.6
interpreter. In my case :


$ pip3 install kadot

⚖️ License

Kadot is under `MIT
license <>`__.


.. |Build Status| image::
.. |Code Health| image::
.. |PyPI version| image::
.. |GitHub license| image::
.. |forthebadge| image::

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for Kadot, version 0.1.6
Filename, size File type Python version Upload date Hashes
Filename, size Kadot-0.1.6.tar.gz (5.9 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page