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 en detección de teléfono #46

Open
mjvallone opened this issue Aug 3, 2021 · 0 comments
Open

Error en detección de teléfono #46

mjvallone opened this issue Aug 3, 2021 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@mjvallone
Copy link
Member

mjvallone commented Aug 3, 2021

se obtiene el siguiente stack trace, el archivo usado no es compartible

Traceback (most recent call last):
File "tasks.py", line 213, in
globals()args[1]
File "tasks.py", line 83, in anonymize_doc
anonymized_text = anonymize_text(nlp, text, not args.save_file)
File "/users/vdumas/anonimizacion-texto-libre-fix_error_overlaping_spans/model_utils.py", line 133, in anonymize_text
doc = nlp.generate_doc(sanitize_text(text))
File "/users/vdumas/anonimizacion-texto-libre-fix_error_overlaping_spans/model_utils.py", line 30, in generate_doc
return self.nlp(text)
File "/users/vdumas/venv/lib/python3.8/site-packages/spacy/language.py", line 1000, in call
error_handler(name, proc, [doc], e)
File "/users/vdumas/venv/lib/python3.8/site-packages/spacy/util.py", line 1503, in raise_error
raise e
File "/users/vdumas/venv/lib/python3.8/site-packages/spacy/language.py", line 995, in call
doc = proc(doc, **component_cfg.get(name, {}))
File "/users/vdumas/anonimizacion-texto-libre-fix_error_overlaping_spans/pipeline_components/entity_custom.py", line 357, in entity_custom
if is_phone_token(token):
File "/users/vdumas/anonimizacion-texto-libre-fix_error_overlaping_spans/pipeline_components/entity_custom.py", line 301, in is_phone_token
or (token.nbor(-1).text == "(" and token.nbor(1).text == ")")
File "spacy/tokens/token.pyx", line 184, in spacy.tokens.token.Token.nbor
IndexError: [E042] Error accessing doc[0].nbor(-1), for doc of length 19.

@mjvallone mjvallone self-assigned this Aug 3, 2021
@mjvallone mjvallone added the bug Something isn't working label Aug 3, 2021
mjvallone added a commit that referenced this issue Aug 3, 2021
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

1 participant