Kaynağa Gözat

renaming to word_processor

Nikos Atlas 2 yıl önce
ebeveyn
işleme
6ff7ea09de
40 değiştirilmiş dosya ile 36 ekleme ve 19 silme
  1. 1 1
      .gitignore
  2. 17 0
      README.md
  3. 1 1
      nltk_data/corpora/wordnet/data.noun
  4. 1 1
      nltk_data/corpora/wordnet/index.noun
  5. 1 1
      pytest.ini
  6. 1 1
      setup.py
  7. 0 0
      word_processor/__init__.py
  8. 3 3
      word_processor/__main__.py
  9. 0 0
      word_processor/generators/__init__.py
  10. 0 0
      word_processor/generators/generator.py
  11. 0 0
      word_processor/generators/synonym.py
  12. 0 0
      word_processor/parsers/__init__.py
  13. 1 1
      word_processor/parsers/javascript.py
  14. 0 0
      word_processor/parsers/parser.py
  15. 0 0
      word_processor/playground.py
  16. 0 0
      word_processor/strategies/__init__.py
  17. 0 0
      word_processor/strategies/leaf_strategy.py
  18. 0 0
      word_processor/tests/__init__.py
  19. 0 0
      word_processor/tests/snapshots/test_antonyms/test_antonyms/cat/antonyms
  20. 0 0
      word_processor/tests/snapshots/test_antonyms/test_antonyms/dog/antonyms
  21. 0 0
      word_processor/tests/snapshots/test_antonyms/test_antonyms/factory/antonyms
  22. 0 0
      word_processor/tests/snapshots/test_antonyms/test_antonyms/fetcher/antonyms
  23. 0 0
      word_processor/tests/snapshots/test_antonyms/test_antonyms/serializer/antonyms
  24. 0 0
      word_processor/tests/snapshots/test_javascript_parser/test_parser/Regex_for_redacted_phone_numbers_with_extra_info_for_PlayStation/javascript_parser
  25. 0 0
      word_processor/tests/snapshots/test_leaf_strategy/test_leaf_strategy/Regex_for_redacted_phone_numbers_with_extra_info_for_PlayStation-expected0/leaf_strategy
  26. 0 0
      word_processor/tests/snapshots/test_parser/test_parser/Regex_for_redacted_phone_numbers_with_extra_info_for_PlayStation/parser
  27. 0 0
      word_processor/tests/snapshots/test_synonyms/test_synonyms/cat/synonyms
  28. 0 0
      word_processor/tests/snapshots/test_synonyms/test_synonyms/dog/synonyms
  29. 0 0
      word_processor/tests/snapshots/test_synonyms/test_synonyms/factory/synonyms
  30. 0 0
      word_processor/tests/snapshots/test_synonyms/test_synonyms/fetcher/synonyms
  31. 0 0
      word_processor/tests/snapshots/test_synonyms/test_synonyms/serializer/synonyms
  32. 0 0
      word_processor/tests/test.py
  33. 1 1
      word_processor/tests/test_antonyms.py
  34. 3 3
      word_processor/tests/test_javascript_parser.py
  35. 2 2
      word_processor/tests/test_leaf_strategy.py
  36. 3 3
      word_processor/tests/test_parser.py
  37. 1 1
      word_processor/tests/test_synonyms.py
  38. 0 0
      word_processor/types.py
  39. 0 0
      word_processor/utils/__init__.py
  40. 0 0
      word_processor/utils/word_helpers.py

+ 1 - 1
.gitignore

@@ -14,7 +14,7 @@ newrelic_agent.log
 
 build
 dist
-word_recommender.egg-info
+word_processor.egg-info
 
 # PyCharm stuff we don't need to keep in our repo.
 .idea/codeStyles/

+ 17 - 0
README.md

@@ -19,3 +19,20 @@ Update snapshots
 ```shell
 pytest --snapshot-update
 ```
+
+## Install
+
+Clone repo
+```shell
+git clone http://onarbooks.com/nikatlas/word_processor.git
+pip install ./word_processor
+```
+Download the relevant network  
+```
+python -m spacy download en_core_web_trf
+```
+
+Run the package's script
+```shell
+python -m word_processor "A sentence that describes a variable or function or method or class"
+```

+ 1 - 1
nltk_data/corpora/wordnet/data.noun

@@ -35473,7 +35473,7 @@
 06572011 10 n 02 natural_language_processor 0 natural_language_processing_application 0 002 @ 06570110 n 0000 ~ 06572204 n 0000 | an application program that deals with natural language text  
 06572204 10 n 01 disambiguator 0 003 @ 06572011 n 0000 ;c 06128570 n 0000 + 00957178 v 0101 | (computer science) a natural language processing application that tries to determine the intended meaning of a word or phrase by examining the linguistic context in which it is used  
 06572482 10 n 01 job 1 002 @ 06570110 n 0000 ;c 06128570 n 0000 | (computer science) a program application that may consist of several steps but is a single logical unit  
-06572654 10 n 02 word_processor 0 word_processing_system 0 001 @ 06570110 n 0000 | an application that provides the user with tools needed to write and edit and format text and to send it to a printer  
+06572654 10 n 02 word_processor 0 word_processing_system 0 001 @ 06570110 n 0000 | an application that provides the user with tools needed to write and edit and format text and to send it to a printer
 06572857 10 n 01 loop 1 001 @ 06568978 n 0000 | a computer program that performs a series of instructions repeatedly until some specified condition is satisfied  
 06573020 10 n 01 malevolent_program 0 005 @ 06568978 n 0000 ~ 06585203 n 0000 ~ 06585552 n 0000 ~ 06585816 n 0000 ~ 06586098 n 0000 | a computer program designed to have undesirable or harmful effects  
 06573223 10 n 01 patch 0 001 @ 06568978 n 0000 | a short set of commands to correct a bug in a computer program  

+ 1 - 1
nltk_data/corpora/wordnet/index.noun

@@ -116505,7 +116505,7 @@ word_picture n 1 2 @ ~ 1 0 07201804
 word_play n 1 1 @ 1 0 00513952  
 word_processing n 1 2 @ ; 1 0 13574928  
 word_processing_system n 1 1 @ 1 0 06572654  
-word_processor n 1 1 @ 1 0 06572654  
+word_processor n 1 1 @ 1 0 06572654
 word_salad n 1 1 @ 1 0 06609176  
 word_sense n 1 1 @ 1 0 06602801  
 word_square n 1 1 @ 1 0 06786209  

+ 1 - 1
pytest.ini

@@ -1,6 +1,6 @@
 [pytest]
 testpaths=
-    word_recommender/tests
+    word_processor/tests
 filterwarnings =
     ignore::RuntimeWarning
     ignore::DeprecationWarning

+ 1 - 1
setup.py

@@ -14,7 +14,7 @@ class PostInstallCommand(install):
         # os.system("python -m spacy download en_core_web_trf")
 
 setup(
-    name='word_recommender',
+    name='word_processor',
     version='0.0.2',
     packages=find_packages(),
     url='',

+ 0 - 0
word_recommender/__init__.py → word_processor/__init__.py


+ 3 - 3
word_recommender/__main__.py → word_processor/__main__.py

@@ -1,8 +1,8 @@
 import sys
 
-from word_recommender.generators import Generator
-from word_recommender.parsers import JavascriptParser
-from word_recommender.strategies import leaf_strategy
+from word_processor.generators import Generator
+from word_processor.parsers import JavascriptParser
+from word_processor.strategies import leaf_strategy
 
 
 def calculate_names(text: str):

+ 0 - 0
word_recommender/generators/__init__.py → word_processor/generators/__init__.py


+ 0 - 0
word_recommender/generators/generator.py → word_processor/generators/generator.py


+ 0 - 0
word_recommender/generators/synonym.py → word_processor/generators/synonym.py


+ 0 - 0
word_recommender/parsers/__init__.py → word_processor/parsers/__init__.py


+ 1 - 1
word_recommender/parsers/javascript.py → word_processor/parsers/javascript.py

@@ -1,4 +1,4 @@
-from word_recommender.parsers import Parser
+from word_processor.parsers import Parser
 
 
 class JavascriptParser(Parser):

+ 0 - 0
word_recommender/parsers/parser.py → word_processor/parsers/parser.py


+ 0 - 0
word_recommender/playground.py → word_processor/playground.py


+ 0 - 0
word_recommender/strategies/__init__.py → word_processor/strategies/__init__.py


+ 0 - 0
word_recommender/strategies/leaf_strategy.py → word_processor/strategies/leaf_strategy.py


+ 0 - 0
word_recommender/tests/__init__.py → word_processor/tests/__init__.py


+ 0 - 0
word_recommender/tests/snapshots/test_antonyms/test_antonyms/cat/antonyms → word_processor/tests/snapshots/test_antonyms/test_antonyms/cat/antonyms


+ 0 - 0
word_recommender/tests/snapshots/test_antonyms/test_antonyms/dog/antonyms → word_processor/tests/snapshots/test_antonyms/test_antonyms/dog/antonyms


+ 0 - 0
word_recommender/tests/snapshots/test_antonyms/test_antonyms/factory/antonyms → word_processor/tests/snapshots/test_antonyms/test_antonyms/factory/antonyms


+ 0 - 0
word_recommender/tests/snapshots/test_antonyms/test_antonyms/fetcher/antonyms → word_processor/tests/snapshots/test_antonyms/test_antonyms/fetcher/antonyms


+ 0 - 0
word_recommender/tests/snapshots/test_antonyms/test_antonyms/serializer/antonyms → word_processor/tests/snapshots/test_antonyms/test_antonyms/serializer/antonyms


+ 0 - 0
word_recommender/tests/snapshots/test_javascript_parser/test_parser/Regex_for_redacted_phone_numbers_with_extra_info_for_PlayStation/javascript_parser → word_processor/tests/snapshots/test_javascript_parser/test_parser/Regex_for_redacted_phone_numbers_with_extra_info_for_PlayStation/javascript_parser


+ 0 - 0
word_recommender/tests/snapshots/test_leaf_strategy/test_leaf_strategy/Regex_for_redacted_phone_numbers_with_extra_info_for_PlayStation-expected0/leaf_strategy → word_processor/tests/snapshots/test_leaf_strategy/test_leaf_strategy/Regex_for_redacted_phone_numbers_with_extra_info_for_PlayStation-expected0/leaf_strategy


+ 0 - 0
word_recommender/tests/snapshots/test_parser/test_parser/Regex_for_redacted_phone_numbers_with_extra_info_for_PlayStation/parser → word_processor/tests/snapshots/test_parser/test_parser/Regex_for_redacted_phone_numbers_with_extra_info_for_PlayStation/parser


+ 0 - 0
word_recommender/tests/snapshots/test_synonyms/test_synonyms/cat/synonyms → word_processor/tests/snapshots/test_synonyms/test_synonyms/cat/synonyms


+ 0 - 0
word_recommender/tests/snapshots/test_synonyms/test_synonyms/dog/synonyms → word_processor/tests/snapshots/test_synonyms/test_synonyms/dog/synonyms


+ 0 - 0
word_recommender/tests/snapshots/test_synonyms/test_synonyms/factory/synonyms → word_processor/tests/snapshots/test_synonyms/test_synonyms/factory/synonyms


+ 0 - 0
word_recommender/tests/snapshots/test_synonyms/test_synonyms/fetcher/synonyms → word_processor/tests/snapshots/test_synonyms/test_synonyms/fetcher/synonyms


+ 0 - 0
word_recommender/tests/snapshots/test_synonyms/test_synonyms/serializer/synonyms → word_processor/tests/snapshots/test_synonyms/test_synonyms/serializer/synonyms


+ 0 - 0
word_recommender/tests/test.py → word_processor/tests/test.py


+ 1 - 1
word_recommender/tests/test_antonyms.py → word_processor/tests/test_antonyms.py

@@ -2,7 +2,7 @@ import json
 
 import pytest
 
-import word_recommender.generators.synonym as synonym
+import word_processor.generators.synonym as synonym
 
 
 @pytest.mark.parametrize(

+ 3 - 3
word_recommender/tests/test_javascript_parser.py → word_processor/tests/test_javascript_parser.py

@@ -2,9 +2,9 @@ import json
 
 import pytest
 
-from word_recommender.generators import Generator
-from word_recommender.parsers import JavascriptParser
-from word_recommender.strategies import leaf_strategy
+from word_processor.generators import Generator
+from word_processor.parsers import JavascriptParser
+from word_processor.strategies import leaf_strategy
 
 @pytest.mark.parametrize('text', [
     'Regex for redacted phone numbers with extra info for PlayStation'

+ 2 - 2
word_recommender/tests/test_leaf_strategy.py → word_processor/tests/test_leaf_strategy.py

@@ -5,8 +5,8 @@ import pytest
 import spacy
 from spacy import displacy
 
-from word_recommender.generators import Generator
-from word_recommender.strategies import leaf_strategy
+from word_processor.generators import Generator
+from word_processor.strategies import leaf_strategy
 
 nlp = spacy.load("en_core_web_trf")
 

+ 3 - 3
word_recommender/tests/test_parser.py → word_processor/tests/test_parser.py

@@ -2,9 +2,9 @@ import json
 
 import pytest
 
-from word_recommender.generators import Generator
-from word_recommender.parsers import Parser
-from word_recommender.strategies import leaf_strategy
+from word_processor.generators import Generator
+from word_processor.parsers import Parser
+from word_processor.strategies import leaf_strategy
 
 @pytest.mark.parametrize('text', [
     'Regex for redacted phone numbers with extra info for PlayStation'

+ 1 - 1
word_recommender/tests/test_synonyms.py → word_processor/tests/test_synonyms.py

@@ -2,7 +2,7 @@ import json
 
 import pytest
 
-import word_recommender.generators.synonym as synonym
+import word_processor.generators.synonym as synonym
 
 
 @pytest.mark.parametrize(

+ 0 - 0
word_recommender/types.py → word_processor/types.py


+ 0 - 0
word_recommender/utils/__init__.py → word_processor/utils/__init__.py


+ 0 - 0
word_recommender/utils/word_helpers.py → word_processor/utils/word_helpers.py