示例#1
0
文件: test.py 项目: snosrap/negspacy
def test_get_patterns():
    nlp = spacy.load("en_core_web_sm")
    negex = Negex(nlp)
    patterns = negex.get_patterns()
    assert type(patterns) == dict
    assert len(patterns) == 4
示例#2
0
def test_get_patterns():
    nlp = spacy.load("pt_core_news_sm")
    negex = Negex(nlp, language="pt")
    patterns = negex.get_patterns()
    assert type(patterns) == dict
    assert len(patterns) == 4