You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.rst
+11-13Lines changed: 11 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,13 +17,15 @@ Example Session
17
17
Out[3]= 0.5
18
18
In[4] = TextCases["I was in London last year.", "Pronoun"]
19
19
Out[4]= {I}
20
+
In[5] = LanguageIdentify["eins zwei drei"]
21
+
Out[4]= "German"
20
22
21
23
More examples can be found in the `test file <https://github.com/Mathics3/Mathics3-Module-nltk/blob/master/test/test_nltk.py>`_.
22
24
23
25
Installing and Running
24
26
----------------------
25
27
26
-
To use build module, you will need to install Python module `nltk
28
+
To build this Mathics3 module, you will need to install the Python module `nltk
27
29
<https://pypi.org/project/nltk/>`_ and `spacy
28
30
<https://pypi.org/project/spacy/>`_, and then install some data from
29
31
Language-specific words:
@@ -32,16 +34,15 @@ Language-specific words:
32
34
33
35
$ make develop # or make install
34
36
35
-
The above ``make`` command uses defaults the language to English. If
36
-
you would like to install for another language set the variable
37
+
The above ``make`` command defaults to the English. If
38
+
you would like to install for another language, set the variable
37
39
``LANG``. For example:
38
40
39
41
::
40
42
41
43
$ make develop LANG=fr
42
44
43
-
In order to use the Extended Open Multilingual Wordnet with NLTK and
44
-
use even more languages, you need to install them manually. Go to
45
+
To use the Extended Open Multilingual Wordnet with NLTK and use even more languages, you need to install them manually. Go to
45
46
`<http://compling.hss.ntu.edu.sg/omw/summx.html>`_, download the data,
46
47
and then create a new folder under
47
48
``$HOME/nltk_data/corpora/omw/your_language`` where you put the file
@@ -54,9 +55,9 @@ If you get the message
54
55
55
56
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.
56
57
57
-
There is a problem with the ``spacy`` the library for advanced Natural Language Processing in Python.
58
+
There is a problem with the ``spacy``library for advanced Natural Language Processing in Python.
58
59
59
-
You might be able to fix this running:
60
+
You might be able to fix this by running:
60
61
61
62
::
62
63
@@ -71,8 +72,7 @@ User customization
71
72
.. reinstate after this is fixed in the code
72
73
.. For nltk, use the environment variable ``NLTK_DATA`` to specify a custom data path (instead of $HOME/.nltk). For spacy, set 'MATHICS3_SPACY_DATA', a Mathics3-specific variable.
73
74
74
-
In order to use the Extended Open Multilingual Wordnet (OMW) with 'NLTK'
75
-
and use even more languages, you need to install them manually.
75
+
To use the Extended Open Multilingual Wordnet (OMW) with 'NLTK' and use even more languages, you need to install them manually.
76
76
77
77
Go to http://compling.hss.ntu.edu.sg/omw/summx.html, download the data, and then create a new folder under
78
78
``$HOME/nltk_data/corpora/omw/your_language`` where you put the file from
@@ -81,10 +81,8 @@ wn-data-your_language.tab.
81
81
82
82
Adding more languages to Open Multilingual Wordnet:
83
83
84
-
In order to use the Extended Open Multilingual Wordnet with NLTK and
85
-
use even more languages, you need to install them manually. Go to
86
-
http://compling.hss.ntu.edu.sg/omw/summx.html, download the data, and
87
-
then create a new folder under
84
+
To use the Extended Open Multilingual Wordnet with NLTK and use even more languages, you need to install them manually. Go to
85
+
http://compling.hss.ntu.edu.sg/omw/summx.html, download the data, and then create a new folder under
88
86
$HOME/nltk_data/corpora/omw/your_language where you put the file from
0 commit comments