File tree Expand file tree Collapse file tree 2 files changed +26
-16
lines changed
Expand file tree Collapse file tree 2 files changed +26
-16
lines changed Original file line number Diff line number Diff line change @@ -8,42 +8,49 @@ GIT2CL ?= admin-tools/git2cl
88PYTHON ?= python3
99PIP ?= pip3
1010RM ?= rm
11- LANG ?= en
11+
12+ # Two-letter language code, e.g. fr, zh
13+ lang ?= en
1214
1315# Size of wordlist used
1416# sm=small, lg=large, md=medium.
15- WORDLIST_SIZE ?=md
17+ WORDLIST_SIZE ?= md
18+ SPACY_DOWNLOAD ?= $(lang ) _core_web_$(WORDLIST_SIZE )
1619
1720.PHONY : all build \
1821 check clean \
1922 develop dist doc doc-data \
23+ pypi-setup \
2024 pytest \
2125 rmChangeLog \
2226 test
2327
2428# : Default target - same as "develop"
2529all : develop
2630
27- # : Word-list data. Customize with LANG ( and eventually WORDLIST_SIZE) variables
31+ # : Word-list data. Customize with lang and eventually WORDLIST_SIZE variables
2832wordlist :
2933 $(PYTHON ) -m nltk.downloader wordnet omw
30- $(PYTHON ) -m spacy download $(LANG )
31- # # $(PYTHON) -m spacy download $(LANG)_core_web_$(WORDLIST_SIZE)
34+ $(PYTHON ) -m spacy download $(SPACY_DOWNLOAD )
3235
3336# : build everything needed to install
34- build :
37+ build : pypi-setup
3538 $(PYTHON ) ./setup.py build
3639
37- # : Set up to run from the source tree
38- develop :
40+ # : Check Python version, and install PyPI dependencies
41+ pypi-setup :
3942 $(PIP ) install -e .
43+
44+ # : Set up to run from the source tree
45+ develop : pypi-setup
4046 $(MAKE ) wordlist
4147
4248# : Install mathics
43- install :
49+ install : pypi-setup
4450 $(PYTHON ) setup.py install
4551
46- check : pytest doctest djangotest gstest
52+ # Run tests
53+ check : pytest doctest
4754
4855# : Remove derived files
4956clean : clean-pyc
Original file line number Diff line number Diff line change 1- Natural Language Tookkit module.
1+ Mathics Natural Language Tookkit module.
22
3- To use this module, you will need to install nltk and spacy,
4- Python modules and then install some data from English words:
3+ To use build module, you will need to install Python module `nltk
4+ <https://pypi.org/project/nltk/> `_ and `spacy
5+ <https://pypi.org/project/spacy/> `_, and then install some data from
6+ Language-specific words:
57
68::
79
8- $ make develop
10+ $ make develop # or make install
911
10- If you would like to install works for another language set the
11- variable ``LANG ``. For example:
12+ The above ``make `` command uses defaults the language to English. If
13+ you would like to install for another language set the variable
14+ ``LANG ``. For example:
1215
1316::
1417
You can’t perform that action at this time.
0 commit comments