Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Span-tagging example code [feature request] #38

Open
pseudomonas opened this issue Sep 18, 2022 · 7 comments
Open

Span-tagging example code [feature request] #38

pseudomonas opened this issue Sep 18, 2022 · 7 comments

Comments

@pseudomonas
Copy link

There are as far as I can tell no internal recommenders for spans (the extents of the spans rather than the labels attached to the spans); so any guidance on how to write an external trainable recommender for generic nested spans would be really welcome.

@reckart
Copy link
Member

reckart commented Sep 18, 2022

There are different internal recommenders for different kinds of spans in INCEpTION, e.g.:

  • Sentence Classifier (OpenNLP Document Categorizer) if the span is to be an entire sentence
  • Token Sequence Classifier (OpenNLP POS) if every token is to be assigned a label
  • Multi-Token Sequence Classifier (OpenNLP NER) if the length of the span can vary (1+ tokens)

The label of the recommendation can be empty, but it is always required that a feature exists to which a label could be assigned. There is currently no way to define a recommender for a layer that has no features.

@pseudomonas
Copy link
Author

Hmm. I'm aiming to do nested spans that have similar kinds of properties to phrases. I don't think any of those classifiers do that? I think what I probably need is something like a shift-reduce oracle or something vaguely of that flavour. But I'm far from an expert at this.

@reckart
Copy link
Member

reckart commented Sep 18, 2022

A recommender must be assigned to a string feature and produces suggestions that have a begin, end, label (optional), score (optional) and description (optional). If you need to produce suggestions for multiple features of the same layer, you'd currently need to set up multiple recommenders, one for each feature.

@pseudomonas
Copy link
Author

ah, so arbitrary levels of nesting aren't possible, because you need one recommender per level?

@reckart
Copy link
Member

reckart commented Sep 18, 2022

You should be able to create overlapping suggestions if you needed that.

@reckart
Copy link
Member

reckart commented Sep 18, 2022

Mind that the layer would need to be configured to allow for overlapping if you did that.

@pseudomonas
Copy link
Author

Well, I'll give it a shot. Unless I go for a dependency grammar…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants