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

Error when reflexive is last word #8

Open
sfillwo opened this issue Oct 3, 2024 · 0 comments
Open

Error when reflexive is last word #8

sfillwo opened this issue Oct 3, 2024 · 0 comments

Comments

@sfillwo
Copy link

sfillwo commented Oct 3, 2024

from multivalue import Dialects

aave = Dialects.AfricanAmericanVernacular()
output = aave.transform('Your brother probably does not want to tell you himself')

The code above produces the following error:

Traceback (most recent call last):
  File "/user/Documents/test.py", line 5, in <module>
    output = aave.transform('Your brother probably does not want to tell you himself')
  File "/user/lib/python3.10/site-packages/multivalue/BaseDialect.py", line 189, in transform
    return self.convert_sae_to_dialect(string)
  File "/user/lib/python3.10/site-packages/multivalue/BaseDialect.py", line 193, in convert_sae_to_dialect
    self.update(string)
  File "/user/lib/python3.10/site-packages/multivalue/BaseDialect.py", line 218, in update
    self.coref_clusters = self.create_coref_cluster(string)
  File "/user/lib/python3.10/site-packages/multivalue/BaseDialect.py", line 223, in create_coref_cluster
    doc = self.coref(string)
  File "/user/lib/python3.10/site-packages/stanza/pipeline/core.py", line 480, in __call__
    return self.process(doc, processors)
  File "/user/lib/python3.10/site-packages/stanza/pipeline/core.py", line 431, in process
    doc = process(doc)
  File "/user/lib/python3.10/site-packages/stanza/pipeline/coref_processor.py", line 127, in process
    end_word = word_pos[span[1]]
IndexError: list index out of range

This seems to be coming from an issue when the reflexive (e.g. "himself") is the last word in the sentence, which causes an error due to a mismatch in the indexing.

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

1 participant