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 1.1.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 1.1.0
File Size Uploaded Provenance Actions
pymathics_natlang-1.1.0.tar.gz 17.0 kB Without provenance Details for pymathics_natlang-1.1.0.tar.gz

Built distributions (wheels)

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

Total release size: 150.0 kB

Release files / pymathics_natlang-1.1.0.tar.gz

Download URL pymathics_natlang-1.1.0.tar.gz
Size 17.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c2c4238a3e06d256f390f3e07bc7fcdb93e6858386ad8ebacb044651692dd7a9
BLAKE2b-256 checksum
How to use checksums
ed110f9249e38aeed1beefd3c8b7f2647c44aae0c0fb579af74d7731e20543e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6

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

Download URL pymathics_natlang-1.1.0-py3.8.egg
Size 34.5 kB
Tags Egg
SHA-256 checksum
How to use checksums
efd954c1e9ce79b42a1258bde2172747332de1c71d3d42f25b52b3b655d6365e
BLAKE2b-256 checksum
How to use checksums
25b04acf4b144e405e5e2d2c6115c1f84cce3a26b1e6833372a48aeffc054046
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6

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

Download URL pymathics_natlang-1.1.0-py3.7.egg
Size 34.2 kB
Tags Egg
SHA-256 checksum
How to use checksums
253c2fd8e293915fa9e08b330a84c706bd215266f960b22a991fefb35a523316
BLAKE2b-256 checksum
How to use checksums
5496b602177929e81466f394cb7df4283e8615794acf069b711cf7722a3b0185
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6

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

Download URL pymathics_natlang-1.1.0-py3.6.egg
Size 34.2 kB
Tags Egg
SHA-256 checksum
How to use checksums
3536473af6b61d3ad9ba47ce508bce6ad61faa6a41fb74dede27f1e61155984a
BLAKE2b-256 checksum
How to use checksums
67c2140a3c63c75f963b27711851f6a792a940558665128609186f37c14bd225
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6

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

Download URL pymathics_natlang-1.1.0-py3-none-any.whl
Size 15.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d7b7b6cd2ad781cf377d37bcd3e3162d4cea7719f9750509bb144a9a6619df1a
BLAKE2b-256 checksum
How to use checksums
4eaaa49a785cc17d8e676e8a7e931978b242415580bcf4753c526a48e03cbab8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6

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

Download URL pymathics_natlang-1.1.0-py2.py3-none-any.whl
Size 15.0 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
166b000d79335f8f82886b33b7daa0eecf6e2a476d6a12148a6efd7264b5aff4
BLAKE2b-256 checksum
How to use checksums
6cd33b89f438d8ee9eec1cb986f92fa5048258da1a94245f59f325aabffaedcb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6

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