mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 01:46:28 +03:00
Fix displaCy test
This commit is contained in:
parent
42ceece110
commit
c90fe92e15
|
@ -49,8 +49,10 @@ def test_displacy_parse_deps(en_vocab):
|
||||||
words = ["This", "is", "a", "sentence"]
|
words = ["This", "is", "a", "sentence"]
|
||||||
heads = [1, 0, 1, -2]
|
heads = [1, 0, 1, -2]
|
||||||
pos = ['DET', 'VERB', 'DET', 'NOUN']
|
pos = ['DET', 'VERB', 'DET', 'NOUN']
|
||||||
|
tags = ['DT', 'VBZ', 'DT', 'NN']
|
||||||
deps = ['nsubj', 'ROOT', 'det', 'attr']
|
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)
|
deps = parse_deps(doc)
|
||||||
assert isinstance(deps, dict)
|
assert isinstance(deps, dict)
|
||||||
assert deps['words'] == [{'text': 'This', 'tag': 'DET'},
|
assert deps['words'] == [{'text': 'This', 'tag': 'DET'},
|
||||||
|
|
Loading…
Reference in New Issue
Block a user