mirror of
https://github.com/explosion/spaCy.git
synced 2025-02-05 22:20:34 +03:00
Update test
This commit is contained in:
parent
53931be9a1
commit
4cd1c74385
|
@ -66,7 +66,8 @@ def test_oracle_four_words(arc_eager, vocab):
|
||||||
heads = [1, 1, 3, 3]
|
heads = [1, 1, 3, 3]
|
||||||
deps = ["left", "ROOT", "left", "ROOT"]
|
deps = ["left", "ROOT", "left", "ROOT"]
|
||||||
for dep in deps:
|
for dep in deps:
|
||||||
arc_eager.add_label(dep)
|
arc_eager.add_action(2, dep) # Left
|
||||||
|
arc_eager.add_action(3, dep) # Right
|
||||||
actions = ["L-left", "B-ROOT", "L-left"]
|
actions = ["L-left", "B-ROOT", "L-left"]
|
||||||
state, cost_history = get_sequence_costs(arc_eager, words, heads, deps, actions)
|
state, cost_history = get_sequence_costs(arc_eager, words, heads, deps, actions)
|
||||||
assert state.is_final()
|
assert state.is_final()
|
||||||
|
@ -143,7 +144,7 @@ def test_get_oracle_actions():
|
||||||
doc = Doc(Vocab(), words=[t[1] for t in annot_tuples])
|
doc = Doc(Vocab(), words=[t[1] for t in annot_tuples])
|
||||||
config = {
|
config = {
|
||||||
"learn_tokens": False,
|
"learn_tokens": False,
|
||||||
"min_action_freq": 30,
|
"min_action_freq": 0,
|
||||||
"beam_width": 1,
|
"beam_width": 1,
|
||||||
"beam_update_prob": 1.0,
|
"beam_update_prob": 1.0,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user