@oddmash/juliya 0.4.3 → 0.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/scoring.js +4 -0
- package/package.json +1 -1
package/dist/core/scoring.js
CHANGED
|
@@ -21,8 +21,12 @@ const compounds = {
|
|
|
21
21
|
키보드: ["포커스", "입력"],
|
|
22
22
|
접근: ["가능한"],
|
|
23
23
|
};
|
|
24
|
+
const adverbialModifier = /^[가-힣]+게$/u;
|
|
25
|
+
const predicateHead = /^[가-힣]+(?:거나|지만|면서|도록|고|면|며|다|요|기|지|게|서)[.!?。!?…,;:]?$/u;
|
|
24
26
|
const protectedPair = (fragment, nextWord) => {
|
|
25
27
|
const left = fragment.match(/\S+$/u)?.[0] ?? "";
|
|
28
|
+
if (adverbialModifier.test(left) && !left.endsWith("에게") && predicateHead.test(nextWord))
|
|
29
|
+
return true;
|
|
26
30
|
if (numeralModifier.test(left) && counterHead.test(nextWord))
|
|
27
31
|
return true;
|
|
28
32
|
if (technicalPrefix.test(left) && technicalHead.test(nextWord))
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oddmash/juliya",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "0.4.
|
|
4
|
+
"version": "0.4.4",
|
|
5
5
|
"description": "Locale-aware text wrapping for Korean, English, Japanese and Simplified Chinese",
|
|
6
6
|
"homepage": "https://oddmash.github.io/juliya/",
|
|
7
7
|
"keywords": ["text-wrapping", "line-breaking", "typography", "internationalization", "korean", "japanese", "chinese", "react", "vue", "svelte"],
|