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

Fix output entities #104

Merged
merged 3 commits into from
Aug 11, 2020
Merged

Fix output entities #104

merged 3 commits into from
Aug 11, 2020

Conversation

lfoppiano
Copy link
Collaborator

@lfoppiano lfoppiano commented Aug 7, 2020

I've got the following problem, the current model:

grobid-material.zip

is used to parse string of materials names, more or less full of garbage and manage to get something useful out of it :-)

In the following example: (Mo -x 1 T x ) 3 Sb 7 with  x 0.1 it extracts three entities

  • (Mo -x 1 T x ) 3 Sb 7 as <formula>
  • x as <variable> and
  • 0.1 as <value>

The current master implementation output 0. as the last entity's text. I've started digging and

a) reconstructed the entity text from the original text, and not from the tokens, the current approach concatenates with spaces in the middle which are not always needed.
b) fixed a problem when the entity is laying at the end of the sequence, somehow the last tag is ignored and the start/end offsets are lacking one element.
c) I've followed @oterrier suggestion in #103 and update the joblib import 😂
d) a858404 it's an old modification I've been committed but never pushed months ago, it removes another warning then the sequence is truncated

This might need some additional tests, to run my test case, here the modification in grobidTagger.py (in combination with the material model):

        elif model == 'material':
            someTexts.append("(Mo -x 1 T x ) 3 Sb 7 with  x 0.1")

@lfoppiano lfoppiano added the enhancement New feature or request label Aug 11, 2020
@kermitt2
Copy link
Owner

Thanks Luca

@kermitt2 kermitt2 merged commit 17749b9 into master Aug 11, 2020
@lfoppiano lfoppiano deleted the bugfix/tag_fix_output_entities branch July 12, 2021 07:02
@lfoppiano lfoppiano mentioned this pull request Mar 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants