spacy-pattern-builder icon indicating copy to clipboard operation
spacy-pattern-builder copied to clipboard

Fix depth not computed for second run.

Open sai-prasanna opened this issue 4 years ago • 0 comments

Token depth is set to default None by spacy when set_extension is called once.

We were computing depth only when attribute is not present. This causes an error when we try to pattern match with another sentence.

Fixed this by following few spacy best practices for extensions.

sai-prasanna avatar Feb 08 '20 04:02 sai-prasanna