Skip to content
Discussion options

You must be logged in to vote

You're right that there aren't any Token attributes associated with Doc.spans, since this is stored internally at the doc level rather than the token level.

As an initial workaround you could add a custom token attribute to look up whether the span label is present or to return all the span labels.

If you want to hard-code the attribute, you can add a custom getter that checks for this attribute.

If you want it to be a little more general (but even slower), you can add a custom extension that returns the set of labels and use IS_SUPERSET to check whether the set of labels is a superset of the individual label you're interested in for the pattern.

This is all slow and not generalized well,…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@monWork
Comment options

Answer selected by monWork
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat / matcher Feature: Token, phrase and dependency matcher feat / spancat Feature: Span Categorizer
2 participants