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

KeyError: Text on parse_export #1

Open
juwess opened this issue Jan 9, 2023 · 1 comment
Open

KeyError: Text on parse_export #1

juwess opened this issue Jan 9, 2023 · 1 comment

Comments

@juwess
Copy link

juwess commented Jan 9, 2023

Changed code to in line 218 of to_fonduer.py

# text
text = entity["value"].get("text")
if not text:
    text = ""

from

# text
text = entity["value"]["text"]

Otherwise KeyError on entity values without text

@jueri
Copy link
Member

jueri commented Jan 10, 2023

Thanks for opening the issue @juwess .
Can you please elaborate a little further on your problem? It seems like you are trying to import entities without text into fonduer. Is this done on purpose, or maybe due to a malformed label studio export?

At the moment, the text of an entity is inevitably needed for downstream entity matching and can not be left empty.

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