Procházet zdrojové kódy

fix requirements.txt

Nikos Atlas před 2 roky
rodič
revize
3b72d24723

+ 50 - 2
requirements.txt

@@ -1,6 +1,54 @@
+attrs==21.4.0
+blis==0.7.5
+catalogue==2.0.6
+certifi==2021.10.8
+charset-normalizer==2.0.10
+click==8.0.3
+colored==1.4.3
+cymem==2.0.6
+docopt==0.6.2
+en-core-web-trf @ https://github.com/explosion/spacy-models/releases/download/en_core_web_trf-3.2.0/en_core_web_trf-3.2.0-py3-none-any.whl
+filelock==3.4.2
+huggingface-hub==0.4.0
+idna==3.3
+iniconfig==1.1.1
+Jinja2==3.0.3
+joblib==1.1.0
+langcodes==3.3.0
+MarkupSafe==2.0.1
+murmurhash==1.0.6
 nltk==3.6.7
+numpy==1.22.1
+packaging==21.3
+pathy==0.6.1
+pipreqs==0.4.11
+pluggy==1.0.0
+preshed==3.0.6
 py==1.11.0
+pydantic==1.8.2
+pyparsing==3.0.7
 pytest==6.2.5
-setuptools==60.5.0
+PyYAML==6.0
+regex==2022.1.18
+requests==2.27.1
+sacremoses==0.0.47
+six==1.16.0
+smart-open==5.2.1
 spacy==3.2.1
-en-core-web-trf @ https://github.com/explosion/spacy-models/releases/download/en_core_web_trf-3.2.0/en_core_web_trf-3.2.0-py3-none-any.whl
+spacy-alignments==0.8.4
+spacy-legacy==3.0.8
+spacy-loggers==1.0.1
+spacy-transformers==1.1.4
+srsly==2.4.2
+syrupy==1.7.0
+thinc==8.0.13
+tokenizers==0.10.3
+toml==0.10.2
+torch==1.10.1
+tqdm==4.62.3
+transformers==4.15.0
+typer==0.4.0
+typing_extensions==4.0.1
+urllib3==1.26.8
+wasabi==0.9.0
+yarg==0.1.9

+ 26 - 0
word_processor/tests/test_leaf_no_prep_strategy.py

@@ -0,0 +1,26 @@
+import json
+
+import pytest
+
+import spacy
+
+from word_processor.generators import Generator
+from word_processor.strategies import leaf_strategy
+
+nlp = spacy.load("en_core_web_trf")
+
+
[email protected]('text, expected', [
+    ('Regex for redacted phone numbers with extra info for PlayStation',
+     ['PhoneNumberRegex', 'RedactedPhoneNumberRegex'])
+])
+def test_leaf_strategy(snapshot, text, expected):
+    generator = Generator(text=text, strategy=leaf_strategy)
+
+    results = generator.suggest()
+
+    text_results = []
+    for suggestion in results:
+        text_results.append([token.text for token in suggestion])
+
+    assert text_results == snapshot