6bbf4ea309263913229686b42017cde83440e105,spacy/tests/doc/test_array.py,,test_doc_array_dep,#Any#,52
Before Change
def test_doc_array_dep(en_tokenizer):
text = "A nice sentence."
deps = ["det", "amod", "ROOT", "punct"]
tokens = en_tokenizer(text)
doc = get_doc(tokens.vocab, words=[t.text for t in tokens], deps=deps)
feats_array = doc.to_array((ORTH, DEP))
assert feats_array[0][1] == doc[0].dep
assert feats_array[1][1] == doc[1].dep
assert feats_array[2][1] == doc[2].dep
After Change
def test_doc_array_dep(en_vocab):
words = ["A", "nice", "sentence", "."]
deps = ["det", "amod", "ROOT", "punct"]
doc = get_doc(en_vocab, words=words, deps=deps)
feats_array = doc.to_array((ORTH, DEP))
assert feats_array[0][1] == doc[0].dep
assert feats_array[1][1] == doc[1].dep
assert feats_array[2][1] == doc[2].dep
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 14
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_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
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: 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