fd9fd275c5209b64d163943da33cadeea01b247c,spacy/tests/regression/test_issue1945.py,,test_issue1945,#,9

Before Change



    nlp = English()
    matcher = PhraseMatcher(nlp.vocab)
    matcher.add("MWE", None, *[nlp.tokenizer(item) for item in mw_list])

    assert len(matcher(nlp(text))) == 1

After Change


    text = "a a a"
    matcher = Matcher(Vocab())
    matcher.add("MWE", None, [{"orth": "a"}, {"orth": "a"}])
    doc = Doc(matcher.vocab, words=["a", "a", "a"])
    matches = matcher(doc)
    // We should see two overlapping matches here
    assert len(matches) == 2
    assert matches[0][1:] == (0, 2)
    assert matches[1][1:] == (1, 3)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: explosion/spaCy
Commit Name: fd9fd275c5209b64d163943da33cadeea01b247c
Time: 2018-02-06
Author: honnibal+gh@gmail.com
File Name: spacy/tests/regression/test_issue1945.py
Class Name:
Method Name: test_issue1945


Project Name: explosion/spaCy
Commit Name: d8051e89ca9daeb047d40a113fa45ccecfd0f493
Time: 2019-02-15
Author: ines@ines.io
File Name: spacy/tests/doc/test_doc_spilt.py
Class Name:
Method Name: test_split_heads_error


Project Name: explosion/spaCy
Commit Name: d8051e89ca9daeb047d40a113fa45ccecfd0f493
Time: 2019-02-15
Author: ines@ines.io
File Name: spacy/tests/doc/test_doc_spilt.py
Class Name:
Method Name: test_split_dependencies