Repository navigation
Commit 09c8a1c
fix(text): drop whitespace tokens from the Chinese word splitter (#2492)
jieba.cut keeps the spaces between words as tokens, so every zh heuristic
filter counted them as words, and SymbolsToWordsFilter divided by the
length of a stripped space and raised ZeroDivisionError on any document
with a space.
Closes #2491
Signed-off-by: usmanmateen <74776275+usmanmateen@users.noreply.github.com>
Co-authored-by: Sarah Yurick <53962159+sarahyurick@users.noreply.github.com>1 parent 3cd0436 commit 09c8a1c
2 files changed
Lines changed: 27 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
505 | 505 | | |
506 | 506 | | |
507 | 507 | | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
508 | 520 | | |
509 | 521 | | |
510 | 522 | | |
| |||
728 | 740 | | |
729 | 741 | | |
730 | 742 | | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
731 | 756 | | |
732 | 757 | | |
733 | 758 | | |
| |||
0 commit comments