6bbf4ea309263913229686b42017cde83440e105,spacy/tests/doc/test_array.py,,test_doc_array_tag,#Any#,39

Before Change


    text = "A nice sentence."
    pos = ["DET", "ADJ", "NOUN", "PUNCT"]
    tokens = en_tokenizer(text)
    doc = get_doc(tokens.vocab, words=[t.text for t in tokens], pos=pos)
    assert doc[0].pos != doc[1].pos != doc[2].pos != doc[3].pos
    feats_array = doc.to_array((ORTH, POS))
    assert feats_array[0][1] == doc[0].pos

After Change




def test_doc_array_tag(en_vocab):
    words = ["A", "nice", "sentence", "."]
    pos = ["DET", "ADJ", "NOUN", "PUNCT"]
    doc = get_doc(en_vocab, words=words, pos=pos)
    assert doc[0].pos != doc[1].pos != doc[2].pos != doc[3].pos
    feats_array = doc.to_array((ORTH, POS))
    assert feats_array[0][1] == doc[0].pos
    assert feats_array[1][1] == doc[1].pos
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: explosion/spaCy
Commit Name: 6bbf4ea309263913229686b42017cde83440e105
Time: 2019-03-10
Author: ines@ines.io
File Name: spacy/tests/doc/test_array.py
Class Name:
Method Name: test_doc_array_tag


Project Name: explosion/spaCy
Commit Name: 6bbf4ea309263913229686b42017cde83440e105
Time: 2019-03-10
Author: ines@ines.io
File Name: spacy/tests/doc/test_array.py
Class Name:
Method Name: test_doc_array_dep


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_doc_split