@kensio/pinyinjs 1.7.9 → 1.7.11
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 +2 -0
- package/data/core.freq +0 -0
- package/data/full.entries +118 -118
- package/data/full.freq +0 -0
- package/data/manifest.json +4 -4
- package/data/standard.entries +111 -111
- package/data/standard.freq +0 -0
- package/dist/decode/de-rule.d.ts +4 -4
- package/dist/decode/de-rule.d.ts.map +1 -1
- package/dist/decode/de-rule.js +6 -16
- package/dist/decode/de-rule.js.map +1 -1
- package/dist/decode/edge-context.d.ts +14 -6
- package/dist/decode/edge-context.d.ts.map +1 -1
- package/dist/decode/edge-context.js +25 -0
- package/dist/decode/edge-context.js.map +1 -1
- package/dist/decode/reading-rules.d.ts +1 -0
- package/dist/decode/reading-rules.d.ts.map +1 -1
- package/dist/decode/reading-rules.js +3 -0
- package/dist/decode/reading-rules.js.map +1 -1
- package/dist/decode/rules.d.ts +1 -1
- package/dist/decode/rules.d.ts.map +1 -1
- package/dist/decode/rules.js +1 -1
- package/dist/decode/rules.js.map +1 -1
- package/dist/decode/taxi-rule.d.ts +45 -0
- package/dist/decode/taxi-rule.d.ts.map +1 -0
- package/dist/decode/taxi-rule.js +117 -0
- package/dist/decode/taxi-rule.js.map +1 -0
- package/dist/dictionary/artifact.js +2 -2
- package/dist/dictionary/artifact.js.map +1 -1
- package/dist/dictionary/dictionary.d.ts +14 -0
- package/dist/dictionary/dictionary.d.ts.map +1 -1
- package/dist/dictionary/dictionary.js +17 -0
- package/dist/dictionary/dictionary.js.map +1 -1
- package/dist/dictionary/entry-invariants.d.ts.map +1 -1
- package/dist/dictionary/entry-invariants.js +28 -0
- package/dist/dictionary/entry-invariants.js.map +1 -1
- package/dist/dictionary/frequency-table.d.ts +57 -0
- package/dist/dictionary/frequency-table.d.ts.map +1 -1
- package/dist/dictionary/frequency-table.js +59 -0
- package/dist/dictionary/frequency-table.js.map +1 -1
- package/dist/dictionary/proper-noun.d.ts.map +1 -1
- package/dist/dictionary/proper-noun.js +27 -3
- package/dist/dictionary/proper-noun.js.map +1 -1
- package/dist/dictionary/variant-counts.d.ts +4 -0
- package/dist/dictionary/variant-counts.d.ts.map +1 -1
- package/dist/dictionary/variant-counts.js +4 -0
- package/dist/dictionary/variant-counts.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/search/candidate-query.d.ts +14 -0
- package/dist/search/candidate-query.d.ts.map +1 -1
- package/dist/search/candidate-query.js +23 -2
- package/dist/search/candidate-query.js.map +1 -1
- package/dist/search/reverse-index-format.d.ts +8 -0
- package/dist/search/reverse-index-format.d.ts.map +1 -1
- package/dist/search/reverse-index-format.js +8 -0
- package/dist/search/reverse-index-format.js.map +1 -1
- package/dist/sources/cedict.d.ts +15 -0
- package/dist/sources/cedict.d.ts.map +1 -1
- package/dist/sources/cedict.js +21 -0
- package/dist/sources/cedict.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -620,6 +620,7 @@ dictionary.lookup("頭髮")?.reading; // the same reading, found under 繁體
|
|
|
620
620
|
dictionary.lookup("重複")?.reading; // 重複 and 重覆 are both keys for 重复
|
|
621
621
|
dictionary.hasPrefix("银"); // true, does any word start with this?
|
|
622
622
|
dictionary.readingsOf("行"); // xíng, háng, héng, hàng, likeliest first
|
|
623
|
+
dictionary.frequencyOf("头发"); // 9, how common it is, 0 rarest to 15
|
|
623
624
|
```
|
|
624
625
|
|
|
625
626
|
Both scripts are keys in the same dictionary. A 繁體 word is found directly,
|
|
@@ -869,6 +870,7 @@ This is orthography and not translation. 软件 becomes 軟件, never 軟體. Se
|
|
|
869
870
|
| `joinPieces(pieces)` / `toHtml(pieces)` | render pieces |
|
|
870
871
|
| `isUncertain(confidence)` | was this syllable a guess? |
|
|
871
872
|
| `dictionary.lookup / hasPrefix / readingsOf` | query the dictionary |
|
|
873
|
+
| `dictionary.frequencyOf(word)` | how common a word is, 0 rarest to 15 |
|
|
872
874
|
| `readSyllable` / `writeSyllable` / `isSyllable` | one syllable, no dictionary |
|
|
873
875
|
| `splitSyllables` / `readWord` | split written pinyin |
|
|
874
876
|
| `applySandhi` | 一, 不 and optional third-tone sandhi |
|
package/data/core.freq
CHANGED
|
Binary file
|