Skip to content

Commit c983a30

Browse files
committed
Fix incorrect end index in detection result (#247)
1 parent aa64a7c commit c983a30

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lingua/detector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ def detect_multiple_languages_of(self, text: str) -> list[DetectionResult]:
546546
if i == last_index and current_language is not None:
547547
result = DetectionResult(
548548
start_index=current_start_index,
549-
end_index=current_end_index,
549+
end_index=len(text),
550550
word_count=word_count,
551551
language=current_language,
552552
)

0 commit comments

Comments
 (0)