From 63f86efa8bcea3cb48ef67c19aef2ba879ee02da Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Sat, 8 Aug 2015 19:14:01 +0200 Subject: [PATCH] * Add test for specifying initial actions --- tests/parser/test_initial_actions_parse.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 tests/parser/test_initial_actions_parse.py diff --git a/tests/parser/test_initial_actions_parse.py b/tests/parser/test_initial_actions_parse.py new file mode 100644 index 000000000..2f45a6994 --- /dev/null +++ b/tests/parser/test_initial_actions_parse.py @@ -0,0 +1,8 @@ +import pytest + + +def test_initial(EN): + doc = EN.tokenizer(u'I ate the pizza with anchovies.') + EN.tagger(doc) + EN.parser(doc, initial_actions=['L-nsubj', 'S', 'L-det']) + assert doc[0].head.i == 1