Constrain Break action to stack depth==1

This commit is contained in:
Matthew Honnibal 2018-04-01 13:47:02 +02:00
parent dc7f879281
commit 83ca2113a2

View File

@ -189,7 +189,9 @@ cdef cppclass StateC:
return False
elif this._sent[this.B_(0).l_edge].sent_start < 0:
return False
elif this.stack_depth() < 1: # ?? I guess stops first action break?
# We only want to break when the 'root' word is on the stack, so that
# we can add the label.
elif this.stack_depth() != 1:
return False
elif this.at_break():
return False