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 2.2.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 2.2.0
File Size Uploaded Provenance Actions
pymathics-natlang-2.2.0.tar.gz 17.0 kB Without provenance Details for pymathics-natlang-2.2.0.tar.gz

Built distributions (wheels)

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

Total release size: 184.8 kB

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

Download URL pymathics-natlang-2.2.0.tar.gz
Size 17.0 kB
Tags Source
SHA-256 checksum
How to use checksums
2f928dae09aac0ffe3479ab84d9d6868b984285dbcfc692cb599e4076ceb392e
BLAKE2b-256 checksum
How to use checksums
70caa5fe92a584686c0a2d0bc3a0b91c4fa0d62a38e808616af719147e10a1e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

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

Download URL pymathics_natlang-2.2.0-py3.9.egg
Size 34.5 kB
Tags Egg
SHA-256 checksum
How to use checksums
33a79246bc6148afec3ea9c053872761f7eea2a869f42293df0358c456474839
BLAKE2b-256 checksum
How to use checksums
057e9402056219983db4cef9bfacd335f3e5c92d72283f62c184f5dfb124b2c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

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

Download URL pymathics_natlang-2.2.0-py3.8.egg
Size 34.6 kB
Tags Egg
SHA-256 checksum
How to use checksums
bb4ba735adcdd376740814797d324601aba825f348546a470bf939a0b316efee
BLAKE2b-256 checksum
How to use checksums
c7b6e9801f856c3a970bac491c3676743dc0b198039f6815493938e2be0ca286
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

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

Download URL pymathics_natlang-2.2.0-py3.7.egg
Size 34.3 kB
Tags Egg
SHA-256 checksum
How to use checksums
bc7df723c2db80df36aed156dc88d5b2398c35a1488bda47d05870c250aea1c7
BLAKE2b-256 checksum
How to use checksums
b2c90949ca879e12dd905919161fb4b1699af05a71395c48dd3901b22248983d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

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

Download URL pymathics_natlang-2.2.0-py3.6.egg
Size 34.3 kB
Tags Egg
SHA-256 checksum
How to use checksums
bb4ac7139ea7a2296d02653546373cdde439b2eedccf9f6b61b03afc686fad80
BLAKE2b-256 checksum
How to use checksums
5e51b0f6ac138e5167866633a251729065996aa20dfb68a2fd4dd47af6715902
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

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

Download URL pymathics_natlang-2.2.0-py3-none-any.whl
Size 15.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
defd4fd217f97091993be87b84d9ce192e9690ec5e6d022ac69cfc40ec3b24c2
BLAKE2b-256 checksum
How to use checksums
2cd0618e76f5fcd2a3ea22319fd705a701ea6bf05af9c06e3945434e9f7a63c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

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

Download URL pymathics_natlang-2.2.0-py2.py3-none-any.whl
Size 15.1 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
14b3060551da9366ef27e24ec79f4a4b3db6d231fbfdcd0a834b293bed7fd551
BLAKE2b-256 checksum
How to use checksums
caa29a2ec839a76f04b538a80e59e619e06408e6063c4c1575fa7843b1c4d1c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

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