Skip to content

Commit

Permalink
Merge pull request #82 from Knox-AAU/80-fix-start-and-end-index-of-en…
Browse files Browse the repository at this point in the history
…t-ments

Fixed start and end index
  • Loading branch information
FredTheNoob authored Nov 30, 2023
2 parents 6d6d10e + d3744d1 commit ada3ff2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/GetSpacyData.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ def GetEntities(doc) -> List[Entity]:
entities.append(
Entity(
name=entity.text,
startIndex=entity.start_char,
endIndex=entity.end_char,
startIndex=entity.start_char-entity.sent.start_char,
endIndex=entity.end_char-entity.sent.start_char,
sentence=entity.sent.text,
sentenceStartIndex=entity.sent.start_char,
sentenceEndIndex=entity.sent.end_char,
Expand Down

0 comments on commit ada3ff2

Please sign in to comment.