Skip to content

Commit

Permalink
test(huspacy): minor improvement in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
oroszgy committed Oct 25, 2023
1 parent c709b10 commit 37d8777
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions huspacy/tests/test_lookup_lemmatizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,13 @@ def test_lookup_lemmatizer(nlp, token, pos, morphs, expected_lemma):
assert processed[0].lemma_ == expected_lemma


@pytest.mark.skip(reason="Test needs a trained model")
@pytest.mark.skip(reason="Needs a trained model")
def test_issue62():
from huspacy.components.lookup_lemmatizer import LookupLemmatizer

nlp = Hungarian()
lookup_lemmatizer: LookupLemmatizer = nlp.add_pipe("lookup_lemmatizer")
lookup_lemmatizer.from_disk(
"/home/gorosz/workspace/huspacy/hu_core_news_md/models/hu_core_news_md-3.6.1/lookup_lemmatizer/")

lookup_lemmatizer.from_disk("hu_core_news_md/models/hu_core_news_md-3.6.1/lookup_lemmatizer/")

doc: Doc = Doc(nlp.vocab, words=["800¥600"], pos=["X"])
processed: Doc = nlp(doc)
2 changes: 1 addition & 1 deletion scripts/smoke_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def main(path: str, with_random_text: bool = False):
print(doc._.conll_str)
if with_random_text is not None:
doc = nlp(get_random_text(nlp, 1024))
print(doc._.conll_str)
print("CONLL format length:", len(doc._.conll_str))
except Exception:
print(traceback.format_exc())
exit(1)
Expand Down

0 comments on commit 37d8777

Please sign in to comment.