Skip to main content

No project description provided

Project description

Pypi Installs Latest Version Supported Python Versions

Mathics Natural Language Toolkit module.

Example Session

$ mathicsscript
In[1]:= LoadModule["pymathics.natlang"]
Out[1]= pymathics.natlang
In[2]= Pluralize["try"]
Out[2]= tries
In[3]= WordFrequency["Apple Tree and apple", "apple", IgnoreCase -> True]
Out[3]= 0.5
In[4] = TextCases["I was in London last year.", "Pronoun"]
Out[3]= {I}

More examples can be found in the test file.

Installing and Running

To use build module, you will need to install Python module nltk and spacy, and then install some data from Language-specific words:

$ make develop  # or make install

The above make command uses defaults the language to English. If you would like to install for another language set the variable LANG. For example:

$ make develop LANG=fr

In order to use the Extended Open Multilingual Wordnet with NLTK and use even more languages, you need to install them manually. Go to http://compling.hss.ntu.edu.sg/omw/summx.html, download the data, and then create a new folder under $HOME/nltk_data/corpora/omw/your_language where you put the file from wiki/wn-wikt-your_language.tab, and rename it to wn-data-your_language.tab.

If you get the message

OSError: [E050] Can't find model 'en'. It doesn't seem to be a shortcut link, a Python package or a valid path to a data directory.

There is a problem with the spacy the library for advanced Natural Language Processing in Python.

You might be able to fix this running:

python -m spacy download en

Adjust “python” and “en” (the language you want) above as needed.

Download files

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

Source Distribution

pymathics-natlang-5.0.0.tar.gz (29.4 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pymathics_natlang-5.0.0-py3.10.egg (35.2 kB view details)

Uploaded Egg

pymathics_natlang-5.0.0-py3.9.egg (34.7 kB view details)

Uploaded Egg

pymathics_natlang-5.0.0-py3.8.egg (34.8 kB view details)

Uploaded Egg

pymathics_natlang-5.0.0-py3.7.egg (34.5 kB view details)

Uploaded Egg

pymathics_natlang-5.0.0-py3.6.egg (34.5 kB view details)

Uploaded Egg

pymathics_natlang-5.0.0-py3-none-any.whl (27.5 kB view details)

Uploaded Python 3

pymathics_natlang-5.0.0-py2.py3-none-any.whl (27.5 kB view details)

Uploaded Python 2Python 3

File details

Details for the file pymathics-natlang-5.0.0.tar.gz.

File metadata

  • Download URL: pymathics-natlang-5.0.0.tar.gz
  • Upload date:
  • Size: 29.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for pymathics-natlang-5.0.0.tar.gz
Algorithm Hash digest
SHA256 91edc6918a90af1d63c2579168cb046f9d41afc6f34c5338f58ca490952eed92
MD5 0b0e138d1a682f42c3187f833a07b212
BLAKE2b-256 99ad320e675a2e850fdecd6d761e92f35d0fbdf7e14f0cb56cea937f5177e4a0

See more details on using hashes here.

File details

Details for the file pymathics_natlang-5.0.0-py3.10.egg.

File metadata

  • Download URL: pymathics_natlang-5.0.0-py3.10.egg
  • Upload date:
  • Size: 35.2 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for pymathics_natlang-5.0.0-py3.10.egg
Algorithm Hash digest
SHA256 73419d7b52900647de2b7cd1000e3c6f20b4adaec7697a5310cf61e197ec300a
MD5 789d8ba92608c6c132975126f06d144e
BLAKE2b-256 d3caede847b4142bdd0ca7680a6d76d954769348836b5e81720ec4a87cba5249

See more details on using hashes here.

File details

Details for the file pymathics_natlang-5.0.0-py3.9.egg.

File metadata

  • Download URL: pymathics_natlang-5.0.0-py3.9.egg
  • Upload date:
  • Size: 34.7 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for pymathics_natlang-5.0.0-py3.9.egg
Algorithm Hash digest
SHA256 b680188bbce94c7a0cb576351dc18cbc8bd1a3d8dd310ffad7a34ce45838a409
MD5 77e69897bb6ea0d97a742c3570132c12
BLAKE2b-256 9472c0c9bf42224df2e05ccd118d41dd291c08e2dc40416f497cf972d6aa551f

See more details on using hashes here.

File details

Details for the file pymathics_natlang-5.0.0-py3.8.egg.

File metadata

  • Download URL: pymathics_natlang-5.0.0-py3.8.egg
  • Upload date:
  • Size: 34.8 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for pymathics_natlang-5.0.0-py3.8.egg
Algorithm Hash digest
SHA256 41c85c59686fcd332b0eabdbb0dcfd7eba1a332348dcb5b35f5e4b2f4feee6b1
MD5 209e06c465857171905c25264e2755d3
BLAKE2b-256 89c9b64fcc87965d2290185611d530701c0cb19a14f0e921a7157f0f4475b538

See more details on using hashes here.

File details

Details for the file pymathics_natlang-5.0.0-py3.7.egg.

File metadata

  • Download URL: pymathics_natlang-5.0.0-py3.7.egg
  • Upload date:
  • Size: 34.5 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for pymathics_natlang-5.0.0-py3.7.egg
Algorithm Hash digest
SHA256 ba7aaba25b849bc8217082ba190821bbbe0d2b6d81261c0d8428bd7a8dd7388a
MD5 5cb1516e5798b6f1e05e410402004bba
BLAKE2b-256 6adc46357ae811cf5429263e84567cd69b12c916a78011d2ae54b4f54cd2c545

See more details on using hashes here.

File details

Details for the file pymathics_natlang-5.0.0-py3.6.egg.

File metadata

  • Download URL: pymathics_natlang-5.0.0-py3.6.egg
  • Upload date:
  • Size: 34.5 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for pymathics_natlang-5.0.0-py3.6.egg
Algorithm Hash digest
SHA256 90e116dedb69b3907b3ebacd4e98d5199ba2db613ddd50e95e0763a136334a53
MD5 9f6460e8676e89f6939c12dc610ab7b2
BLAKE2b-256 4f208163084968f5dadce3a9d4e664219bf2fa016b88bd3cfea90026157493ab

See more details on using hashes here.

File details

Details for the file pymathics_natlang-5.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pymathics_natlang-5.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2f52af6f6654f0efa6c6d80bf427a5951ad866123f83f68709936937b885ba10
MD5 f32e540f4e62e423ce222a8f12e45275
BLAKE2b-256 357bc88a5184ff8986a13beb75e1ce4ad5d75f8a08fe93f7dfc9e4e72c2ebdcc

See more details on using hashes here.

File details

Details for the file pymathics_natlang-5.0.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for pymathics_natlang-5.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 45fe99fd708f6dcf3244205e767aa6b00dfb4a520d6bdc9afe7ff10c9ff4d339
MD5 1fd9ea048c7dfc038528558b8988bb6c
BLAKE2b-256 faf734feacdb135280636532d7586e17185ae658ae10f6f9a3a693de5dd2bc40

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page