mirror of https://github.com/explosion/spaCy.git
fix all references to BILUO annotation format (#3797)
This commit is contained in:
parent
a7fd42d937
commit
26c37c5a4d
|
@ -532,7 +532,7 @@ cdef class GoldParse:
|
|||
self.labels[i] = deps[i2j_multi[i]]
|
||||
# Now set NER...This is annoying because if we've split
|
||||
# got an entity word split into two, we need to adjust the
|
||||
# BILOU tags. We can't have BB or LL etc.
|
||||
# BILUO tags. We can't have BB or LL etc.
|
||||
# Case 1: O -- easy.
|
||||
ner_tag = entities[i2j_multi[i]]
|
||||
if ner_tag == "O":
|
||||
|
|
|
@ -127,7 +127,7 @@ cdef class PhraseMatcher:
|
|||
and self.attr not in (DEP, POS, TAG, LEMMA):
|
||||
string_attr = self.vocab.strings[self.attr]
|
||||
user_warning(Warnings.W012.format(key=key, attr=string_attr))
|
||||
tags = get_bilou(length)
|
||||
tags = get_biluo(length)
|
||||
phrase_key = <attr_t*>mem.alloc(length, sizeof(attr_t))
|
||||
for i, tag in enumerate(tags):
|
||||
attr_value = self.get_lex_value(doc, i)
|
||||
|
@ -230,7 +230,7 @@ cdef class PhraseMatcher:
|
|||
return "matcher:{}-{}".format(string_attr_name, string_attr_value)
|
||||
|
||||
|
||||
def get_bilou(length):
|
||||
def get_biluo(length):
|
||||
if length == 0:
|
||||
raise ValueError(Errors.E127)
|
||||
elif length == 1:
|
||||
|
|
|
@ -510,7 +510,7 @@ described in any single publication. The model is a greedy transition-based
|
|||
parser guided by a linear model whose weights are learned using the averaged
|
||||
perceptron loss, via the
|
||||
[dynamic oracle](http://www.aclweb.org/anthology/C12-1059) imitation learning
|
||||
strategy. The transition system is equivalent to the BILOU tagging scheme.
|
||||
strategy. The transition system is equivalent to the BILUO tagging scheme.
|
||||
|
||||
## Models and training data {#training}
|
||||
|
||||
|
|
Loading…
Reference in New Issue