Skip to content

Commit

Permalink
Split main (#14)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
mmatera and rocky authored Feb 23, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 3433c53 commit 5128810
Showing 14 changed files with 1,802 additions and 1,523 deletions.
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -72,7 +72,7 @@ pytest:


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


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

#: Run pytest consistency and style checks
check-consistency-and-style:
# MATHICS_LINT=t $(PYTHON) -m pytest test/consistency-and-style
echo "check-consistency-and-style deactivated. Activate me later. "
MATHICS_LINT=t $(PYTHON) -m pytest test/consistency-and-style
23 changes: 14 additions & 9 deletions pymathics/natlang/__init__.py
Original file line number Diff line number Diff line change
@@ -38,28 +38,32 @@
= Old Man Apulia, conduct peculiar
"""


from pymathics.natlang.main import (
DeleteStopwords,
from pymathics.natlang.linguistic_data import (
DictionaryLookup,
DictionaryWordQ,
LanguageIdentify,
Pluralize,
RandomWord,
SpellingCorrectionList,
WordData,
WordDefinition,
WordList,
)
from pymathics.natlang.manipulate import Pluralize
from pymathics.natlang.normalization import (
DeleteStopwords,
TextCases,
TextPosition,
TextSentences,
TextStructure,
TextWords,
)
from pymathics.natlang.textual_analysis import (
Containing,
SpellingCorrectionList,
WordCount,
WordData,
WordDefinition,
WordFrequency,
WordList,
WordSimilarity,
WordStem,
)
from pymathics.natlang.translation import LanguageIdentify
from pymathics.natlang.version import __version__

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

__all__ = [
"Containing",
"DeleteStopwords",
"DictionaryLookup",
"DictionaryWordQ",
Loading

0 comments on commit 5128810

Please sign in to comment.