()
| 11 | |
| 12 | @pytest.fixture |
| 13 | def 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 | |
| 30 | def test_lemmatizer_init(nlp): |
no test coverage detected