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.

User customization

In order to use the Extended Open Multilingual Wordnet (OMW) 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.

Adding more languages to Open Multilingual Wordnet:

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.

Release files for pymathics-natlang 6.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 6.0.0
File Size Uploaded Provenance Actions
pymathics-natlang-6.0.0.tar.gz 32.0 kB Without provenance Details for pymathics-natlang-6.0.0.tar.gz

Built distributions (wheels)

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

Total release size: 350.1 kB

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

Download URL pymathics-natlang-6.0.0.tar.gz
Size 32.0 kB
Tags Source
SHA-256 checksum
How to use checksums
fa86cdb9754e47dfa0bd4b4008c72dbb25a41f68c74700cf22e3a9ba49a8f5a6
BLAKE2b-256 checksum
How to use checksums
db10b0cc6231bec3712d07cd9876eeff167779fba22a54c1550e289a28ed6ea7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.12

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

Download URL pymathics_natlang-6.0.0-py3.10.egg
Size 50.7 kB
Tags Egg
SHA-256 checksum
How to use checksums
f4d86c4ee8d1394881ee42dfb0c6d48858df534e3b63038b1956d92f179344b8
BLAKE2b-256 checksum
How to use checksums
e60e1681c93552cec288915f43d509058c39f79dc162aa82befba3936a5d7049
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.12

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

Download URL pymathics_natlang-6.0.0-py3.9.egg
Size 50.1 kB
Tags Egg
SHA-256 checksum
How to use checksums
23c8f98f28ff82414183c1bfd31375a9c20d3cea98156a4b1b9ba5e50a500279
BLAKE2b-256 checksum
How to use checksums
7b1be222da9880061175d8edf8a06414bcbe13a096e7d4538187442c4fd71d0d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.12

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

Download URL pymathics_natlang-6.0.0-py3.8.egg
Size 50.2 kB
Tags Egg
SHA-256 checksum
How to use checksums
bcf7f1a689a3aff19699906e9c3018d1584d586135222e5f723e3d51e9a7a785
BLAKE2b-256 checksum
How to use checksums
867fe7fcc3e999835535d08ed928199cb434011b969a0cce03331b9a01785ee7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.12

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

Download URL pymathics_natlang-6.0.0-py3.7.egg
Size 49.9 kB
Tags Egg
SHA-256 checksum
How to use checksums
8f912adc8931b2551170c5f3e13c34003d8f7cc8909b249c5c711139cdbf5935
BLAKE2b-256 checksum
How to use checksums
353753324beb9daf9566b1fabe40cfa8448168bf25775995b0938238c15c56a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.12

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

Download URL pymathics_natlang-6.0.0-py3.6.egg
Size 49.9 kB
Tags Egg
SHA-256 checksum
How to use checksums
46eddc3fd204075c5584b397b3a7b014dc6457362e4a263076c72768f17eb61c
BLAKE2b-256 checksum
How to use checksums
0f899546bba4be9a9ee585b57fb0cd862445abafe00ede7ec312a327001e0f7b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.12

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

Download URL pymathics_natlang-6.0.0-py3-none-any.whl
Size 33.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f6b805b76ee93284bb3743a834bfa65efe81f4e32a805bb0bb14e384b08f9443
BLAKE2b-256 checksum
How to use checksums
0c51658b05265ad88f059f86f2e8dfd4c9a2ddfa4229d6602b82d8f59aff245a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.12

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

Download URL pymathics_natlang-6.0.0-py2.py3-none-any.whl
Size 33.6 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
7d574c156d464a596e35e7eda38d9a32c17a39c1f657c740a12a7b8d7e814303
BLAKE2b-256 checksum
How to use checksums
bf59fb9376b7a92a06ff4d68b1647652301f0facfa7ad5e82d505dde140879f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.12

Security for pymathics-natlang 6.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