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

Feature/1856 support regex based recommendations #2000

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

HerrKrishna
Copy link

@HerrKrishna HerrKrishna commented Feb 11, 2021

What's in the PR

  • This is a first version just to let you have a look if this is going into the right direction.
  • I will add unit tests next

How to test manually

  • Setup a new Regex Recommender for the Named Entity Layer, and value feature
  • Check the "Always active" box.
  • Select the document that I have attached. It contains lemma annotations.
  • Add a Named Entity annotation
  • Enter a regex
  • Now you should get recommendations for all the lemmas that fit your regex.

Bundestag_08-1.zip

HerrKrishna and others added 5 commits February 8, 2021 11:39
Pulled from original-repository to be up-to-date
- Add a first unfinished version of the regex recommender
- fix NullPointerException when accepting/rejecting a recommendation
@ukp-svc-jenkins
Copy link

Can one of the admins verify this patch?

@HerrKrishna HerrKrishna marked this pull request as draft February 11, 2021 14:39
@reckart
Copy link
Member

reckart commented Feb 15, 2021

Thanks for the PR. I have had a look at the code and it looks quite interesting. You appear to have the need to show a popup as part of accepting an annotation and that currently seems to work only if INCEpTION is run as a standalone version in a graphical desktop environment. This requirement is something I need to think about - i.e. if/how this can be handled in such a way that it works in a purely browser-based environment.

HerrKrishna and others added 5 commits February 16, 2021 00:12
- fix a few confusing variable names
- add a few comments
- now the accepted and rejected counts in the regex Counter get incremented when we accept or reject a recommendation
fix a bug that led to NoSuchElementException when accepting or rejecting a recommendation that doesn't come from regexrecommender
let the old RegexCounter write its states to the gazeteer when a new RegexCounter is created.
- fix a bug that occured when more than one RegexRecommenders were used at the same time
- make sure the gazeteer writes in utf-8 to avoid encoding related bugs
- remove some print statements that were used for debugging
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

Successfully merging this pull request may close these issues.

3 participants