Skip to content

Commit 36ea0d5

Browse files
committed
fix: include cyrillic for detection
1 parent 714ba75 commit 36ea0d5

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/extraction/rules/cjk.ts

+3
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,8 @@ export class CJKExtrationRule extends ExtractionRule {
1313
// Korean
1414
if (str.match(/\p{Script=Hangul}/u))
1515
return ExtractionScore.MustInclude
16+
// Russian/Cyrillic
17+
if (str.match(/\p{Script=Cyrillic}/u))
18+
return ExtractionScore.MustInclude
1619
}
1720
}

test/unit/extraction/shouldExtract/cjk.test.ts

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ const includes = [
1212
'안녕하십니까',
1313
'再見',
1414
'再见',
15+
'Привет',
1516
]
1617

1718
const excludes = [

0 commit comments

Comments
 (0)