"SpanRuler" for generating SpanGroup Spans #9353
Replies: 2 comments
-
It's probably not too difficult to convert the entity ruler into a custom component that does something like this: doc.spans[spans_key] = matcher(doc, as_spans=True) |
Beta Was this translation helpful? Give feedback.
-
@adrianeboyd @kinghuang I wrote a class that does exactly that a while ago. My main interest was having overlapping entities. Since there is one more level of grouping/categorizing that comes with the {
'GROUP_NAME': {
'LABEL' : {
'KB_ID' :
[rule_1, rule_2, rule_N],
}
}
} There are also different levels of allowing/prohibiting overlapping of matching If there is an interest in exploring this, I can see if it makes sense to extend Let me know what you think. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm interested in generating span groups using patterns. Something like the EntityRuler, but with matching token sequences stored as Spans in a specified SpanGroup instead of being set as entities.
I've considered writing a SpanCategorizer suggester function that uses Matcher/PhraseMatcher to generate ranges. But, there'd be no way to directly specify the label.
Beta Was this translation helpful? Give feedback.
All reactions