garu-ko 0.12.0 → 0.13.0

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/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  - **1.34MB model** bundled in npm package (no CDN needed)
6
6
  - **447KB WASM** engine (182KB gzipped) -- runs in any modern browser
7
- - **F1 96.18%** on 9k human-verified gold testset (ep_norm), **F1 92.09%** on a fixed 2025 spoken-language set
7
+ - **F1 96.18%** on 9k human-verified gold testset (ep_norm), **F1 92.32%** on a fixed 2025 spoken-language set
8
8
  - **~1ms** inference per sentence
9
9
  - **Offline-ready** -- works without network
10
10
  - **[Live Demo](https://garu.zerry.co.kr)** -- try it in your browser
@@ -97,11 +97,16 @@ splitSentences('안녕하세요반갑습니다');
97
97
  // [{ text: '안녕하세요', offset: 0 }, { text: '반갑습니다', offset: 5 }]
98
98
  splitSentences('“안녕하세요반갑습니다”');
99
99
  // [{ text: '“안녕하세요반갑습니다”', offset: 0 }]
100
+ splitSentences('가방에 쏙! 파우치에 쏙! 너무 좋아요ㅎㅎ\n다음에 또 살게요');
101
+ // [{ text: '가방에 쏙!', offset: 0 }, { text: '파우치에 쏙!', offset: 7 },
102
+ // { text: '너무 좋아요ㅎㅎ', offset: 15 }, { text: '다음에 또 살게요', offset: 24 }]
100
103
  ```
101
104
 
102
105
  No morphological analyzer is needed. The Q4 model ships in the package and inference runs offline. Passing an analyzer as `splitSentences(text, garu)` retains the slower morphology-verification path. Results retain original substrings and Unicode codepoint offsets, trimming segment edges. The existing text utilities and default analyzer keep their behavior and do not import this model.
103
106
 
104
- On the inspected, fixed NIKL2025 news set of 9,355 paragraphs, the default call's boundary F1 is 95.91% after whitespace deletion and 96.28% after terminal punctuation deletion as well. On Apple M4, loaded mean latency was 0.020ms in Node and 0.018ms in Chrome (median of seven rounds, 1,250 inputs averaging82.5 codepoints). Node P95 was0.061ms;45µs is not a per-input guarantee. Import and first-call costs are separate. The quote rule was added after inspecting fixed-set errors; reference conventions that split within quotations produce lower scores. See the repository research history for exact evaluation and latency scope.
107
+ Every line break ends a sentence; join hard-wrapped lines (for example text copied from a PDF) before calling. Trailing laughter, emoji and tildes stay with the preceding sentence, and spaced input is never split inside a word.
108
+
109
+ On the inspected, fixed NIKL2025 news set of 9,355 paragraphs, the default call's boundary F1 is 96.56% after whitespace deletion, 96.92% after terminal punctuation deletion as well, and 99.57% with the original spacing. On the held-out Instagram split of the NIKL online posting corpus 2025, paragraph boundary F1 is 77.89% against NIKL labels. Unpunctuated conversational text remains weak: 47.8% on a reviewed sample of 300. On Apple M4 Node, loaded mean latency was about 0.020ms per news paragraph with P95 about 0.06ms (median of seven rounds, 1,250 inputs averaging82.5 codepoints). This is not a per-input guarantee; import and first-call costs are separate. Browser latency was not remeasured for this version. The quote rule was added after inspecting fixed-set errors; reference conventions that split within quotations produce lower scores. See the repository research history for exact evaluation and latency scope.
105
110
 
106
111
  ## API
107
112
 
@@ -212,7 +217,7 @@ garu-ko (가루/Garu) is a browser-native Korean morphological analyzer. A 1.34M
212
217
  No. It runs 100% client-side via WebAssembly. After the initial load there is no backend call, so it works offline and inside browser extensions, service-worker PWAs, and intranet apps.
213
218
 
214
219
  **How accurate is it?**
215
- F1 96.18% on a 9,000-sentence human-verified gold testset (ep_norm), and F1 92.09% on a fixed 2025 spoken-language evaluation set.
220
+ F1 96.18% on a 9,000-sentence human-verified gold testset (ep_norm), and F1 92.32% on a fixed 2025 spoken-language evaluation set.
216
221
 
217
222
  **Which POS tagset does it use?**
218
223
  The Sejong tagset (42 tags) from the National Institute of Korean Language — NNG/NNP for nouns, VV/VA for verbs/adjectives, particles, endings, and symbols.
@@ -9,7 +9,7 @@ export declare const BOUNDARY_MODEL: {
9
9
  readonly conservative_threshold: 1;
10
10
  };
11
11
  readonly sentences: {
12
- readonly scale: 0.048678878752573526;
12
+ readonly scale: 0.046276136287058664;
13
13
  readonly threshold: -0.75;
14
14
  readonly order: 1;
15
15
  };