chartbeat-labs / textacy

NLP, before and after spaCy
https://textacy.readthedocs.io
Other
2.21k stars 249 forks source link

Undefined variable in textacy.spacier.utils.merge_spans #225

Closed popelucha closed 5 years ago

popelucha commented 5 years ago

variable ents is not defined

Expected Behavior

for start_char, end_char, label in ents: <- ents is not defined

Current Behavior

Possible Solution

should be doc.ents

Steps to Reproduce (for bugs)

Context

Your Environment

bdewilde commented 5 years ago

Thanks for the bug report. I think it should actually be ents => spans, where spans is defined in the preceding line: https://github.com/chartbeat-labs/textacy/blob/master/textacy/spacier/utils.py#L97

Does that seem right to you?

popelucha commented 5 years ago

Thanks for the bug report. I think it should actually be ents => spans, where spans is defined in the preceding line: https://github.com/chartbeat-labs/textacy/blob/master/textacy/spacier/utils.py#L97

Does that seem right to you?

Absolutely, thanks for reviewing it.