Skip to content

Commit

Permalink
#1 Use lemma instead of full token for entity
Browse files Browse the repository at this point in the history
  • Loading branch information
numblr committed Nov 28, 2022
1 parent 95609fc commit afbd937
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cltl/nlp/spacy_nlp.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def _analyze_entities(self, doc):
type = EntityType.OBJECT

if type:
entities.append(Entity(token.text, type, (token.idx, token.idx + len(token.text))))
entities.append(Entity(token.lemma_.lower(), type, (token.idx, token.idx + len(token.text))))

predicates[head_id][token.dep_] = token.lemma_

Expand Down

0 comments on commit afbd937

Please sign in to comment.