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

ListEntityPlugin produces incorrect scores #84

Closed
ltbringer opened this issue Sep 25, 2021 · 0 comments · Fixed by #85
Closed

ListEntityPlugin produces incorrect scores #84

ltbringer opened this issue Sep 25, 2021 · 0 comments · Fixed by #85
Assignees
Labels
bug Something isn't working

Comments

@ltbringer
Copy link
Contributor

Describe the bug
An entity present in 9/10 transcripts should have score = 0.9 but we see 0.1

To Reproduce
Steps to reproduce the behavior:

- description: "Bug found on 23rd September 2021 double aggregation deletes entities."
  input:
    - text: "I have paid online"
      entities:
        - type: "payment"
          value: "online"
    - text: "I have read online"
      entities:
        - type: "payment"
          value: "online"
    - text: "I had paid online"
      entities:
        - type: "payment"
          value: "online"
    - text: "I have to read online"
      entities:
        - type: "payment"
          value: "online"
    - text: "I have did online"
      entities:
        - type: "payment"
          value: "online"
    - text: "I have bed online"
      entities:
        - type: "payment"
          value: "online"
    - text: "I have dead online"
      entities:
        - type: "payment"
          value: "online"
    - text: "I have date online"
      entities:
        - type: "payment"
          value: "online"
    - text: "I have paid on line"
    - text: "I have trade online"
      entities:
        - type: "payment"
          value: "online"
  config:
    style: "regex"
    candidates:
      payment:
        online:
        - online|debit card|credit card|bhim upi|upi|amazon pay
        - ऑनलाइन|डेबिट वार्ड|क्रेडिट कार्ड|भीम उपआयी|उपआयी|अमेज़न पे
  expected:
    - type: "payment"
      value: "online"
      score: 0.9
  1. add the above in tests/plugin/text/test_list_entity_plugin/test_cases.yaml
  2. Run make test.

Expected behavior
A clear and concise description of what you expected to happen.

Additional context
This block performs aggregation and then EntityExtractor's aggregation is called later here. This seems to be causing the scores to be recalculated incorrectly.

@ltbringer ltbringer added the bug Something isn't working label Sep 25, 2021
@ltbringer ltbringer self-assigned this Sep 26, 2021
@ltbringer ltbringer linked a pull request Sep 26, 2021 that will close this issue
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 a pull request may close this issue.

1 participant