* Update ner.pyx to expect brackets from gold_tuples

This commit is contained in:
Matthew Honnibal 2015-05-06 16:27:01 +02:00
parent 0ad72a77ce
commit aff9359a8d
1 changed files with 2 additions and 1 deletions

View File

@ -73,7 +73,8 @@ cdef class BiluoPushDown(TransitionSystem):
move_labels = {MISSING: {'': True}, BEGIN: {}, IN: {}, LAST: {}, UNIT: {}, move_labels = {MISSING: {'': True}, BEGIN: {}, IN: {}, LAST: {}, UNIT: {},
OUT: {'': True}} OUT: {'': True}}
moves = ('M', 'B', 'I', 'L', 'U') moves = ('M', 'B', 'I', 'L', 'U')
for (raw_text, toks, (ids, words, tags, heads, labels, biluo)) in gold_tuples: for (raw_text, toks, tuples, ctnt) in gold_tuples:
ids, words, tags, heads, labels, biluo = tuples
for i, ner_tag in enumerate(biluo): for i, ner_tag in enumerate(biluo):
if ner_tag != 'O' and ner_tag != '-': if ner_tag != 'O' and ner_tag != '-':
if ner_tag.count('-') != 1: if ner_tag.count('-') != 1: