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

[bug] CrossSentenceMention needs start and end character offsets #2

Open
myedibleenso opened this issue May 13, 2024 · 0 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@myedibleenso
Copy link
Member

myedibleenso commented May 13, 2024

Character start and end offsets for CrossSentenceMentions can't be retrieved in a straightforward manner from the Odin Mention JSON we receive from clulab/processors:

start = mjson["characterStartOffset"]

This is because a cross sentence mention involved multiple token intervals.

Proposed solution

  1. Safely retrieve start and end via mjson.get("characterStartOffset", None) and mjson.get("characterEndOffset", None)
  2. Construct CrossSentenceMention's
    start=start,
    end=end,
    using min and max token intervals for anchor and neighbor
  3. Add unit tests (see this example as a reference)
@myedibleenso myedibleenso added the bug Something isn't working label May 13, 2024
@myedibleenso myedibleenso changed the title [bug] CrossSentenceMention needs start and end character offsets [bug] CrossSentenceMention needs start and end character offsets May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants