Skip to content

Annotating BILOU tags from another system #461

@viksit

Description

@viksit

I have a domain specific NER system that generates BILOU tags for a given sentence. What would be the best way to integrate this information into spacy?

In #187, there's an example of how to train the system on new data. But I'm not entirely sure if there's way to do something like,

doc = nlp(u"this is a lion")
custom_ents = get_custom_ents(doc)
# >>  ['0', '0', '0', 'U-ANIMAL']
# function called annotate to combine this information into spacy's tokens/spans
annotate(doc, custom_ents) # how do we write this?
print([(i.text, i.label_) for i in doc.ents])
# >> [(lion, 'ANIMAL')]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBugs and behaviour differing from documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions