Skip to content

Commit

Permalink
Fix displaCy test
Browse files Browse the repository at this point in the history
  • Loading branch information
ines committed Nov 22, 2017
1 parent 42ceece commit c90fe92
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion spacy/tests/test_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@ def test_displacy_parse_deps(en_vocab):
words = ["This", "is", "a", "sentence"]
heads = [1, 0, 1, -2]
pos = ['DET', 'VERB', 'DET', 'NOUN']
tags = ['DT', 'VBZ', 'DT', 'NN']
deps = ['nsubj', 'ROOT', 'det', 'attr']
doc = get_doc(en_vocab, words=words, heads=heads, pos=pos, deps=deps)
doc = get_doc(en_vocab, words=words, heads=heads, pos=pos, tags=tags,
deps=deps)
deps = parse_deps(doc)
assert isinstance(deps, dict)
assert deps['words'] == [{'text': 'This', 'tag': 'DET'},
Expand Down

0 comments on commit c90fe92

Please sign in to comment.