Skip to content

update jsl_modelhandler#776

Merged
ArshaanNazir merged 2 commits intorelease/1.5.0from
entities-bug
Sep 19, 2023
Merged

update jsl_modelhandler#776
ArshaanNazir merged 2 commits intorelease/1.5.0from
entities-bug

Conversation

@Prikshit7766
Copy link
Copy Markdown
Contributor

@Prikshit7766 Prikshit7766 commented Sep 19, 2023

Description

image

when encountering entities labeled as I-LOCATION-OTHER, we are obtaining a list of three elements, namely ['I', 'LOCATION', 'OTHER']. However, this list structure is causing issues when we attempt to unpack and manipulate these elements.

The existing code snippet looks like this:

            bi, tag = self._get_tag(entity["entity"])
            last_bi, last_tag = self._get_tag(entity_group_disagg[-1]["entity"])

Solution :

            entities = self._get_tag(entity["entity"])
            bi = entities[0]
            tag = "-".join(entities[1:])

            last_entities = self._get_tag(entity_group_disagg[-1]["entity"])
            last_tag = "-".join(last_entities[1:])


Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I've added Google style docstrings to my code.
  • I've used pydantic for typing when/where necessary.
  • I have linted my code
  • I have added tests to cover my changes.

Screenshots (if appropriate):

@Prikshit7766 Prikshit7766 added the 🐛 Bug Something isn't working label Sep 19, 2023
@ArshaanNazir ArshaanNazir self-requested a review September 19, 2023 14:34
@ArshaanNazir ArshaanNazir merged commit b670710 into release/1.5.0 Sep 19, 2023
@ArshaanNazir ArshaanNazir deleted the entities-bug branch September 21, 2023 07:41
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

Successfully merging this pull request may close these issues.

2 participants