MCPcopy
hub / github.com/explosion/spaCy / nlp

Function nlp

spacy/tests/pipeline/test_lemmatizer.py:13–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11
12@pytest.fixture
13def nlp():
14 @registry.misc("cope_lookups")
15 def cope_lookups():
16 lookups = Lookups()
17 lookups.add_table("lemma_lookup", {"cope": "cope", "coped": "cope"})
18 lookups.add_table("lemma_index", {"verb": ("cope", "cop")})
19 lookups.add_table("lemma_exc", {"verb": {"coping": ("cope",)}})
20 lookups.add_table("lemma_rules", {"verb": [["ing", ""]]})
21 return lookups
22
23 nlp = English()
24 nlp.config["initialize"]["components"]["lemmatizer"] = {
25 "lookups": {"@misc": "cope_lookups"}
26 }
27 return nlp
28
29
30def test_lemmatizer_init(nlp):

Callers 15

test_overfitting_IOFunction · 0.70
test_annotates_on_updateFunction · 0.70
test_span_finder_modelFunction · 0.70
test_overfitting_IOFunction · 0.70
test_issue4030Function · 0.70
test_simple_trainFunction · 0.70
test_resize_same_resultsFunction · 0.70
test_overfitting_IOFunction · 0.70
test_textcat_evaluationFunction · 0.70

Calls 1

EnglishClass · 0.90

Tested by

no test coverage detected