MCPcopy
hub / github.com/explosion/spaCy / test_parser_initial

Function test_parser_initial

spacy/tests/parser/test_parse.py:177–185  ·  view source on GitHub ↗
(en_vocab, en_parser)

Source from the content-addressed store, hash-verified

175 reason="The step_through API was removed (but should be brought back)"
176)
177def test_parser_initial(en_vocab, en_parser):
178 words = ["I", "ate", "the", "pizza", "with", "anchovies", "."]
179 transition = ["L-nsubj", "S", "L-det"]
180 doc = Doc(en_vocab, words=words)
181 apply_transition_sequence(en_parser, doc, transition)
182 assert doc[0].head.i == 1
183 assert doc[1].head.i == 1
184 assert doc[2].head.i == 3
185 assert doc[3].head.i == 3
186
187
188def test_parser_parse_subtrees(en_vocab, en_parser):

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…