Skip to main content

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.

Release files for pymathics-natlang 5.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pymathics-natlang 5.0.0
File Size Uploaded Provenance Actions
pymathics-natlang-5.0.0.tar.gz 29.4 kB Without provenance Details for pymathics-natlang-5.0.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for pymathics-natlang 5.0.0
File Actions
pymathics_natlang-5.0.0-py3.10.egg Legacy Egg format - - Details for pymathics_natlang-5.0.0-py3.10.egg
pymathics_natlang-5.0.0-py3.9.egg Legacy Egg format - - Details for pymathics_natlang-5.0.0-py3.9.egg
pymathics_natlang-5.0.0-py3.8.egg Legacy Egg format - - Details for pymathics_natlang-5.0.0-py3.8.egg
pymathics_natlang-5.0.0-py3.7.egg Legacy Egg format - - Details for pymathics_natlang-5.0.0-py3.7.egg
pymathics_natlang-5.0.0-py3.6.egg Legacy Egg format - - Details for pymathics_natlang-5.0.0-py3.6.egg
pymathics_natlang-5.0.0-py3-none-any.whl Python 3 none any Details for pymathics_natlang-5.0.0-py3-none-any.whl
pymathics_natlang-5.0.0-py2.py3-none-any.whl Python 3, Python 2 none any Details for pymathics_natlang-5.0.0-py2.py3-none-any.whl

Total release size: 258.0 kB

Release files / pymathics-natlang-5.0.0.tar.gz

Download URL pymathics-natlang-5.0.0.tar.gz
Size 29.4 kB
Tags Source
SHA-256 checksum
How to use checksums
91edc6918a90af1d63c2579168cb046f9d41afc6f34c5338f58ca490952eed92
BLAKE2b-256 checksum
How to use checksums
99ad320e675a2e850fdecd6d761e92f35d0fbdf7e14f0cb56cea937f5177e4a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.5

Release files / pymathics_natlang-5.0.0-py3.10.egg

Download URL pymathics_natlang-5.0.0-py3.10.egg
Size 35.2 kB
Tags Egg
SHA-256 checksum
How to use checksums
73419d7b52900647de2b7cd1000e3c6f20b4adaec7697a5310cf61e197ec300a
BLAKE2b-256 checksum
How to use checksums
d3caede847b4142bdd0ca7680a6d76d954769348836b5e81720ec4a87cba5249
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.5

Release files / pymathics_natlang-5.0.0-py3.9.egg

Download URL pymathics_natlang-5.0.0-py3.9.egg
Size 34.7 kB
Tags Egg
SHA-256 checksum
How to use checksums
b680188bbce94c7a0cb576351dc18cbc8bd1a3d8dd310ffad7a34ce45838a409
BLAKE2b-256 checksum
How to use checksums
9472c0c9bf42224df2e05ccd118d41dd291c08e2dc40416f497cf972d6aa551f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.5

Release files / pymathics_natlang-5.0.0-py3.8.egg

Download URL pymathics_natlang-5.0.0-py3.8.egg
Size 34.8 kB
Tags Egg
SHA-256 checksum
How to use checksums
41c85c59686fcd332b0eabdbb0dcfd7eba1a332348dcb5b35f5e4b2f4feee6b1
BLAKE2b-256 checksum
How to use checksums
89c9b64fcc87965d2290185611d530701c0cb19a14f0e921a7157f0f4475b538
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.5

Release files / pymathics_natlang-5.0.0-py3.7.egg

Download URL pymathics_natlang-5.0.0-py3.7.egg
Size 34.5 kB
Tags Egg
SHA-256 checksum
How to use checksums
ba7aaba25b849bc8217082ba190821bbbe0d2b6d81261c0d8428bd7a8dd7388a
BLAKE2b-256 checksum
How to use checksums
6adc46357ae811cf5429263e84567cd69b12c916a78011d2ae54b4f54cd2c545
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.5

Release files / pymathics_natlang-5.0.0-py3.6.egg

Download URL pymathics_natlang-5.0.0-py3.6.egg
Size 34.5 kB
Tags Egg
SHA-256 checksum
How to use checksums
90e116dedb69b3907b3ebacd4e98d5199ba2db613ddd50e95e0763a136334a53
BLAKE2b-256 checksum
How to use checksums
4f208163084968f5dadce3a9d4e664219bf2fa016b88bd3cfea90026157493ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.5

Release files / pymathics_natlang-5.0.0-py3-none-any.whl

Download URL pymathics_natlang-5.0.0-py3-none-any.whl
Size 27.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2f52af6f6654f0efa6c6d80bf427a5951ad866123f83f68709936937b885ba10
BLAKE2b-256 checksum
How to use checksums
357bc88a5184ff8986a13beb75e1ce4ad5d75f8a08fe93f7dfc9e4e72c2ebdcc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.5

Release files / pymathics_natlang-5.0.0-py2.py3-none-any.whl

Download URL pymathics_natlang-5.0.0-py2.py3-none-any.whl
Size 27.5 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
45fe99fd708f6dcf3244205e767aa6b00dfb4a520d6bdc9afe7ff10c9ff4d339
BLAKE2b-256 checksum
How to use checksums
faf734feacdb135280636532d7586e17185ae658ae10f6f9a3a693de5dd2bc40
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.5

Security for pymathics-natlang 5.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page