No project description provided
Project description
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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for pymathics_natlang-2.2.0-py3.9.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33a79246bc6148afec3ea9c053872761f7eea2a869f42293df0358c456474839 |
|
MD5 | 9a992da43e546449da3e2aa8b9ca3b76 |
|
BLAKE2b-256 | 057e9402056219983db4cef9bfacd335f3e5c92d72283f62c184f5dfb124b2c2 |
Hashes for pymathics_natlang-2.2.0-py3.8.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb4ba735adcdd376740814797d324601aba825f348546a470bf939a0b316efee |
|
MD5 | 55c731ed243d6a3d8777a249df202501 |
|
BLAKE2b-256 | c7b6e9801f856c3a970bac491c3676743dc0b198039f6815493938e2be0ca286 |
Hashes for pymathics_natlang-2.2.0-py3.7.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc7df723c2db80df36aed156dc88d5b2398c35a1488bda47d05870c250aea1c7 |
|
MD5 | 2475bc6df1f17d4242ecf57558ac4b70 |
|
BLAKE2b-256 | b2c90949ca879e12dd905919161fb4b1699af05a71395c48dd3901b22248983d |
Hashes for pymathics_natlang-2.2.0-py3.6.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb4ac7139ea7a2296d02653546373cdde439b2eedccf9f6b61b03afc686fad80 |
|
MD5 | 4752421da8ce0ba5b3e60f0ab6891e80 |
|
BLAKE2b-256 | 5e51b0f6ac138e5167866633a251729065996aa20dfb68a2fd4dd47af6715902 |
Hashes for pymathics_natlang-2.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | defd4fd217f97091993be87b84d9ce192e9690ec5e6d022ac69cfc40ec3b24c2 |
|
MD5 | fe8692cf39b4f457893f628a29bcb916 |
|
BLAKE2b-256 | 2cd0618e76f5fcd2a3ea22319fd705a701ea6bf05af9c06e3945434e9f7a63c8 |
Hashes for pymathics_natlang-2.2.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 14b3060551da9366ef27e24ec79f4a4b3db6d231fbfdcd0a834b293bed7fd551 |
|
MD5 | 1e7ab050dffb14926af8ec9cf1b3361c |
|
BLAKE2b-256 | caa29a2ec839a76f04b538a80e59e619e06408e6063c4c1575fa7843b1c4d1c2 |