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

a função mkAdj do AnnotateConllu: variável local lemma não está definida no escopo da função #595

Open
leoalenc opened this issue Sep 26, 2024 · 0 comments
Assignees
Labels
bug Something isn't working morphological parsing Lemmatization and morphological analysis tools This issue relates to Python code unknown-words How to deal with new words

Comments

@leoalenc
Copy link
Contributor

leoalenc commented Sep 26, 2024

Aproveitando a correção dos valores de sent_id dessas sentenças, fiz a primeira revisão das três, que pode ser verificada neste commit. Concordo com a anotação das três. Entretanto, ao revisar a segunda, descobri que a função mkAdj do AnnotateConllu está quebrada, pois a variável local lemma não está definida no escopo da função.

>>> s='''Nhaã ne mbira apisaíma/=prv:x|a.'''
>>> Yauti.pp(s)
Traceback (most recent call last):
  File "<pyshell#11>", line 1, in <module>
    Yauti.pp(s)
  File "C:\Users\Hélio\Documents\GitHub\complin\nheengatu\src\AnnotateConllu.py", line 3254, in pp
    print(parseSentence(s).serialize())
  File "C:\Users\Hélio\Documents\GitHub\complin\nheengatu\src\AnnotateConllu.py", line 3004, in parseSentence
    tk=mkConlluSentence(tokens)
  File "C:\Users\Hélio\Documents\GitHub\complin\nheengatu\src\AnnotateConllu.py", line 2557, in mkConlluSentence
    new=mkPrv(form,xpos)
  File "C:\Users\Hélio\Documents\GitHub\complin\nheengatu\src\AnnotateConllu.py", line 2197, in mkPrv
    new=mkAdj(lemma,None,dic)
  File "C:\Users\Hélio\Documents\GitHub\complin\nheengatu\src\AnnotateConllu.py", line 2123, in mkAdj
    handleOrig(new,lemma,orig, orig_form)
NameError: name 'lemma' is not defined

Originally posted by @heliolbs in #594 (comment)

@leoalenc leoalenc self-assigned this Sep 26, 2024
@leoalenc leoalenc added bug Something isn't working tools This issue relates to Python code morphological parsing Lemmatization and morphological analysis unknown-words How to deal with new words labels Sep 26, 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 morphological parsing Lemmatization and morphological analysis tools This issue relates to Python code unknown-words How to deal with new words
Projects
None yet
Development

No branches or pull requests

1 participant