Skip to content

Commit 5128810

Browse files
mmaterarocky
andauthored
Split main (#14)
* split main in modules * adding comments * black * fix summaries * rocky's comments fixed * black * test for wordlist * easy fixes * complete doctests * fix Containing. Adding test cases * black * trailing typos * split nltk from utils * Some small tweaks and conformance things (#15) --------- Co-authored-by: R. Bernstein <rocky@users.noreply.github.com>
1 parent 3433c53 commit 5128810

File tree

14 files changed

+1802
-1523
lines changed

14 files changed

+1802
-1523
lines changed

Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ pytest:
7272

7373

7474
doctest:
75-
MATHICS_CHARACTER_ENCODING="ASCII" $(PYTHON) -m mathics.docpipeline -l pymathics.natlang -c "Natural Language Processing" $o
75+
MATHICS_CHARACTER_ENCODING="ASCII" $(PYTHON) -m mathics.docpipeline -l pymathics.natlang -c 'Natural Language Processing' $o
7676

7777

7878
# #: Make Mathics PDF manual
@@ -89,5 +89,4 @@ ChangeLog: rmChangeLog
8989

9090
#: Run pytest consistency and style checks
9191
check-consistency-and-style:
92-
# MATHICS_LINT=t $(PYTHON) -m pytest test/consistency-and-style
93-
echo "check-consistency-and-style deactivated. Activate me later. "
92+
MATHICS_LINT=t $(PYTHON) -m pytest test/consistency-and-style

pymathics/natlang/__init__.py

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,28 +38,32 @@
3838
= Old Man Apulia, conduct peculiar
3939
"""
4040

41-
42-
from pymathics.natlang.main import (
43-
DeleteStopwords,
41+
from pymathics.natlang.linguistic_data import (
4442
DictionaryLookup,
4543
DictionaryWordQ,
46-
LanguageIdentify,
47-
Pluralize,
4844
RandomWord,
49-
SpellingCorrectionList,
45+
WordData,
46+
WordDefinition,
47+
WordList,
48+
)
49+
from pymathics.natlang.manipulate import Pluralize
50+
from pymathics.natlang.normalization import (
51+
DeleteStopwords,
5052
TextCases,
5153
TextPosition,
5254
TextSentences,
5355
TextStructure,
5456
TextWords,
57+
)
58+
from pymathics.natlang.textual_analysis import (
59+
Containing,
60+
SpellingCorrectionList,
5561
WordCount,
56-
WordData,
57-
WordDefinition,
5862
WordFrequency,
59-
WordList,
6063
WordSimilarity,
6164
WordStem,
6265
)
66+
from pymathics.natlang.translation import LanguageIdentify
6367
from pymathics.natlang.version import __version__
6468

6569
pymathics_version_data = {
@@ -70,6 +74,7 @@
7074
}
7175

7276
__all__ = [
77+
"Containing",
7378
"DeleteStopwords",
7479
"DictionaryLookup",
7580
"DictionaryWordQ",

0 commit comments

Comments
 (0)