@kensio/pinyinjs 1.7.4 → 1.7.6
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 +128 -123
- package/data/full.entries +2595 -2595
- package/data/manifest.json +5 -5
- package/data/script.map +66 -3
- package/dist/accuracy/score-case.d.ts +23 -0
- package/dist/accuracy/score-case.d.ts.map +1 -0
- package/dist/accuracy/score-case.js +63 -0
- package/dist/accuracy/score-case.js.map +1 -0
- package/dist/accuracy/score.d.ts +1 -8
- package/dist/accuracy/score.d.ts.map +1 -1
- package/dist/accuracy/score.js +1 -55
- package/dist/accuracy/score.js.map +1 -1
- package/dist/cli/arguments.d.ts +4 -290
- package/dist/cli/arguments.d.ts.map +1 -1
- package/dist/cli/arguments.js +5 -357
- package/dist/cli/arguments.js.map +1 -1
- package/dist/cli/check-command.d.ts +9 -0
- package/dist/cli/check-command.d.ts.map +1 -0
- package/dist/cli/check-command.js +95 -0
- package/dist/cli/check-command.js.map +1 -0
- package/dist/cli/cli-input.d.ts +49 -0
- package/dist/cli/cli-input.d.ts.map +1 -0
- package/dist/cli/cli-input.js +31 -0
- package/dist/cli/cli-input.js.map +1 -0
- package/dist/cli/command.d.ts +97 -0
- package/dist/cli/command.d.ts.map +1 -0
- package/dist/cli/command.js +40 -0
- package/dist/cli/command.js.map +1 -0
- package/dist/cli/commands.d.ts +7 -110
- package/dist/cli/commands.d.ts.map +1 -1
- package/dist/cli/commands.js +14 -991
- package/dist/cli/commands.js.map +1 -1
- package/dist/cli/convert-command.d.ts +6 -0
- package/dist/cli/convert-command.d.ts.map +1 -0
- package/dist/cli/convert-command.js +52 -0
- package/dist/cli/convert-command.js.map +1 -0
- package/dist/cli/environment.d.ts +1 -1
- package/dist/cli/environment.d.ts.map +1 -1
- package/dist/cli/explain-command.d.ts +6 -0
- package/dist/cli/explain-command.d.ts.map +1 -0
- package/dist/cli/explain-command.js +40 -0
- package/dist/cli/explain-command.js.map +1 -0
- package/dist/cli/explain-syllable.d.ts +10 -0
- package/dist/cli/explain-syllable.d.ts.map +1 -0
- package/dist/cli/explain-syllable.js +70 -0
- package/dist/cli/explain-syllable.js.map +1 -0
- package/dist/cli/flag-help.d.ts +18 -0
- package/dist/cli/flag-help.d.ts.map +1 -0
- package/dist/cli/flag-help.js +78 -0
- package/dist/cli/flag-help.js.map +1 -0
- package/dist/cli/flag-lists.d.ts +49 -0
- package/dist/cli/flag-lists.d.ts.map +1 -0
- package/dist/cli/flag-lists.js +58 -0
- package/dist/cli/flag-lists.js.map +1 -0
- package/dist/cli/flag-values.d.ts +44 -0
- package/dist/cli/flag-values.d.ts.map +1 -0
- package/dist/cli/flag-values.js +56 -0
- package/dist/cli/flag-values.js.map +1 -0
- package/dist/cli/flags.d.ts +193 -0
- package/dist/cli/flags.d.ts.map +1 -0
- package/dist/cli/flags.js +133 -0
- package/dist/cli/flags.js.map +1 -0
- package/dist/cli/format-options.d.ts +29 -0
- package/dist/cli/format-options.d.ts.map +1 -0
- package/dist/cli/format-options.js +72 -0
- package/dist/cli/format-options.js.map +1 -0
- package/dist/cli/global-help.d.ts +23 -0
- package/dist/cli/global-help.d.ts.map +1 -0
- package/dist/cli/global-help.js +40 -0
- package/dist/cli/global-help.js.map +1 -0
- package/dist/cli/help.d.ts +1 -1
- package/dist/cli/help.d.ts.map +1 -1
- package/dist/cli/help.js +5 -99
- package/dist/cli/help.js.map +1 -1
- package/dist/cli/html-commands.d.ts +13 -0
- package/dist/cli/html-commands.d.ts.map +1 -0
- package/dist/cli/html-commands.js +49 -0
- package/dist/cli/html-commands.js.map +1 -0
- package/dist/cli/info-command.d.ts +7 -0
- package/dist/cli/info-command.d.ts.map +1 -0
- package/dist/cli/info-command.js +39 -0
- package/dist/cli/info-command.js.map +1 -0
- package/dist/cli/lookup-commands.d.ts +10 -0
- package/dist/cli/lookup-commands.d.ts.map +1 -0
- package/dist/cli/lookup-commands.js +101 -0
- package/dist/cli/lookup-commands.js.map +1 -0
- package/dist/cli/match-command.d.ts +11 -0
- package/dist/cli/match-command.d.ts.map +1 -0
- package/dist/cli/match-command.js +76 -0
- package/dist/cli/match-command.js.map +1 -0
- package/dist/cli/number-command.d.ts +12 -0
- package/dist/cli/number-command.d.ts.map +1 -0
- package/dist/cli/number-command.js +89 -0
- package/dist/cli/number-command.js.map +1 -0
- package/dist/cli/options.d.ts +30 -0
- package/dist/cli/options.d.ts.map +1 -0
- package/dist/cli/options.js +54 -0
- package/dist/cli/options.js.map +1 -0
- package/dist/cli/run-command.d.ts +24 -0
- package/dist/cli/run-command.d.ts.map +1 -0
- package/dist/cli/run-command.js +40 -0
- package/dist/cli/run-command.js.map +1 -0
- package/dist/cli/run.d.ts +4 -42
- package/dist/cli/run.d.ts.map +1 -1
- package/dist/cli/run.js +6 -61
- package/dist/cli/run.js.map +1 -1
- package/dist/cli/script-command.d.ts +10 -0
- package/dist/cli/script-command.d.ts.map +1 -0
- package/dist/cli/script-command.js +58 -0
- package/dist/cli/script-command.js.map +1 -0
- package/dist/cli/segment-command.d.ts +11 -0
- package/dist/cli/segment-command.d.ts.map +1 -0
- package/dist/cli/segment-command.js +53 -0
- package/dist/cli/segment-command.js.map +1 -0
- package/dist/cli/slug-command.d.ts +10 -0
- package/dist/cli/slug-command.d.ts.map +1 -0
- package/dist/cli/slug-command.js +28 -0
- package/dist/cli/slug-command.js.map +1 -0
- package/dist/cli/syllable-command.d.ts +14 -0
- package/dist/cli/syllable-command.d.ts.map +1 -0
- package/dist/cli/syllable-command.js +82 -0
- package/dist/cli/syllable-command.js.map +1 -0
- package/dist/cli/system-table.d.ts +12 -0
- package/dist/cli/system-table.d.ts.map +1 -0
- package/dist/cli/system-table.js +48 -0
- package/dist/cli/system-table.js.map +1 -0
- package/dist/cli/systems.d.ts +57 -0
- package/dist/cli/systems.d.ts.map +1 -0
- package/dist/cli/systems.js +27 -0
- package/dist/cli/systems.js.map +1 -0
- package/dist/cli/transcribe-command.d.ts +18 -0
- package/dist/cli/transcribe-command.d.ts.map +1 -0
- package/dist/cli/transcribe-command.js +86 -0
- package/dist/cli/transcribe-command.js.map +1 -0
- package/dist/cli/transcribe-reading.d.ts +15 -0
- package/dist/cli/transcribe-reading.d.ts.map +1 -0
- package/dist/cli/transcribe-reading.js +90 -0
- package/dist/cli/transcribe-reading.js.map +1 -0
- package/dist/cli/transcribe-rows.d.ts +26 -0
- package/dist/cli/transcribe-rows.d.ts.map +1 -0
- package/dist/cli/transcribe-rows.js +30 -0
- package/dist/cli/transcribe-rows.js.map +1 -0
- package/dist/cli/usage-error.d.ts +9 -0
- package/dist/cli/usage-error.d.ts.map +1 -0
- package/dist/cli/usage-error.js +9 -0
- package/dist/cli/usage-error.js.map +1 -0
- package/dist/decode/alternatives.d.ts +16 -0
- package/dist/decode/alternatives.d.ts.map +1 -0
- package/dist/decode/alternatives.js +31 -0
- package/dist/decode/alternatives.js.map +1 -0
- package/dist/decode/chang-context.d.ts +27 -0
- package/dist/decode/chang-context.d.ts.map +1 -0
- package/dist/decode/chang-context.js +66 -0
- package/dist/decode/chang-context.js.map +1 -0
- package/dist/decode/chang-rule.d.ts +37 -0
- package/dist/decode/chang-rule.d.ts.map +1 -0
- package/dist/decode/chang-rule.js +169 -0
- package/dist/decode/chang-rule.js.map +1 -0
- package/dist/decode/confidence.d.ts +11 -3
- package/dist/decode/confidence.d.ts.map +1 -1
- package/dist/decode/confidence.js +14 -121
- package/dist/decode/confidence.js.map +1 -1
- package/dist/decode/convert-options.d.ts +116 -0
- package/dist/decode/convert-options.d.ts.map +1 -0
- package/dist/decode/convert-options.js +2 -0
- package/dist/decode/convert-options.js.map +1 -0
- package/dist/decode/convert-pipeline.d.ts +18 -0
- package/dist/decode/convert-pipeline.d.ts.map +1 -0
- package/dist/decode/convert-pipeline.js +67 -0
- package/dist/decode/convert-pipeline.js.map +1 -0
- package/dist/decode/convert.d.ts +9 -118
- package/dist/decode/convert.d.ts.map +1 -1
- package/dist/decode/convert.js +5 -453
- package/dist/decode/convert.js.map +1 -1
- package/dist/decode/de-rule.d.ts +54 -0
- package/dist/decode/de-rule.d.ts.map +1 -0
- package/dist/decode/de-rule.js +113 -0
- package/dist/decode/de-rule.js.map +1 -0
- package/dist/decode/decode.d.ts +2 -15
- package/dist/decode/decode.d.ts.map +1 -1
- package/dist/decode/decode.js +2 -121
- package/dist/decode/decode.js.map +1 -1
- package/dist/decode/decoders.d.ts +32 -0
- package/dist/decode/decoders.d.ts.map +1 -0
- package/dist/decode/decoders.js +29 -0
- package/dist/decode/decoders.js.map +1 -0
- package/dist/decode/edge-context.d.ts +38 -0
- package/dist/decode/edge-context.d.ts.map +1 -0
- package/dist/decode/edge-context.js +57 -0
- package/dist/decode/edge-context.js.map +1 -0
- package/dist/decode/hint-lattice.d.ts +45 -0
- package/dist/decode/hint-lattice.d.ts.map +1 -0
- package/dist/decode/hint-lattice.js +154 -0
- package/dist/decode/hint-lattice.js.map +1 -0
- package/dist/decode/hints.d.ts +2 -45
- package/dist/decode/hints.d.ts.map +1 -1
- package/dist/decode/hints.js +1 -139
- package/dist/decode/hints.js.map +1 -1
- package/dist/decode/jiao-rule.d.ts +64 -0
- package/dist/decode/jiao-rule.d.ts.map +1 -0
- package/dist/decode/jiao-rule.js +115 -0
- package/dist/decode/jiao-rule.js.map +1 -0
- package/dist/decode/lattice-costs.d.ts +55 -0
- package/dist/decode/lattice-costs.d.ts.map +1 -0
- package/dist/decode/lattice-costs.js +90 -0
- package/dist/decode/lattice-costs.js.map +1 -0
- package/dist/decode/lattice-edges.d.ts +29 -0
- package/dist/decode/lattice-edges.d.ts.map +1 -0
- package/dist/decode/lattice-edges.js +78 -0
- package/dist/decode/lattice-edges.js.map +1 -0
- package/dist/decode/lattice-slice.d.ts +37 -0
- package/dist/decode/lattice-slice.d.ts.map +1 -0
- package/dist/decode/lattice-slice.js +43 -0
- package/dist/decode/lattice-slice.js.map +1 -0
- package/dist/decode/lattice-types.d.ts +101 -0
- package/dist/decode/lattice-types.d.ts.map +1 -0
- package/dist/decode/lattice-types.js +63 -0
- package/dist/decode/lattice-types.js.map +1 -0
- package/dist/decode/lattice.d.ts +2 -59
- package/dist/decode/lattice.d.ts.map +1 -1
- package/dist/decode/lattice.js +2 -118
- package/dist/decode/lattice.js.map +1 -1
- package/dist/decode/number-pieces.d.ts +62 -0
- package/dist/decode/number-pieces.d.ts.map +1 -0
- package/dist/decode/number-pieces.js +106 -0
- package/dist/decode/number-pieces.js.map +1 -0
- package/dist/decode/numbers.d.ts +53 -0
- package/dist/decode/numbers.d.ts.map +1 -0
- package/dist/decode/numbers.js +69 -0
- package/dist/decode/numbers.js.map +1 -0
- package/dist/decode/pieces.d.ts +78 -0
- package/dist/decode/pieces.d.ts.map +1 -0
- package/dist/decode/pieces.js +136 -0
- package/dist/decode/pieces.js.map +1 -0
- package/dist/decode/polyphone-rules.d.ts +11 -0
- package/dist/decode/polyphone-rules.d.ts.map +1 -0
- package/dist/decode/polyphone-rules.js +11 -0
- package/dist/decode/polyphone-rules.js.map +1 -0
- package/dist/decode/reading-rules.d.ts +3 -126
- package/dist/decode/reading-rules.d.ts.map +1 -1
- package/dist/decode/reading-rules.js +8 -434
- package/dist/decode/reading-rules.js.map +1 -1
- package/dist/decode/rules.d.ts +1 -17
- package/dist/decode/rules.d.ts.map +1 -1
- package/dist/decode/rules.js +1 -43
- package/dist/decode/rules.js.map +1 -1
- package/dist/decode/run-lattice.d.ts +52 -0
- package/dist/decode/run-lattice.d.ts.map +1 -0
- package/dist/decode/run-lattice.js +91 -0
- package/dist/decode/run-lattice.js.map +1 -0
- package/dist/decode/run-words.d.ts +17 -0
- package/dist/decode/run-words.d.ts.map +1 -0
- package/dist/decode/run-words.js +29 -0
- package/dist/decode/run-words.js.map +1 -0
- package/dist/decode/sandhi-input.d.ts +30 -0
- package/dist/decode/sandhi-input.d.ts.map +1 -0
- package/dist/decode/sandhi-input.js +35 -0
- package/dist/decode/sandhi-input.js.map +1 -0
- package/dist/decode/sandhi-tones.d.ts +97 -0
- package/dist/decode/sandhi-tones.d.ts.map +1 -0
- package/dist/decode/sandhi-tones.js +139 -0
- package/dist/decode/sandhi-tones.js.map +1 -0
- package/dist/decode/sandhi.d.ts +10 -7
- package/dist/decode/sandhi.d.ts.map +1 -1
- package/dist/decode/sandhi.js +11 -88
- package/dist/decode/sandhi.js.map +1 -1
- package/dist/decode/script-types.d.ts +76 -0
- package/dist/decode/script-types.d.ts.map +1 -0
- package/dist/decode/script-types.js +35 -0
- package/dist/decode/script-types.js.map +1 -0
- package/dist/decode/script-words.d.ts +32 -0
- package/dist/decode/script-words.d.ts.map +1 -0
- package/dist/decode/script-words.js +77 -0
- package/dist/decode/script-words.js.map +1 -0
- package/dist/decode/script.d.ts +3 -73
- package/dist/decode/script.d.ts.map +1 -1
- package/dist/decode/script.js +3 -109
- package/dist/decode/script.js.map +1 -1
- package/dist/decode/tan-rule.d.ts +68 -0
- package/dist/decode/tan-rule.d.ts.map +1 -0
- package/dist/decode/tan-rule.js +131 -0
- package/dist/decode/tan-rule.js.map +1 -0
- package/dist/decode/write-run.d.ts +21 -0
- package/dist/decode/write-run.d.ts.map +1 -0
- package/dist/decode/write-run.js +42 -0
- package/dist/decode/write-run.js.map +1 -0
- package/dist/dictionary/artifact-claims.d.ts +25 -0
- package/dist/dictionary/artifact-claims.d.ts.map +1 -0
- package/dist/dictionary/artifact-claims.js +47 -0
- package/dist/dictionary/artifact-claims.js.map +1 -0
- package/dist/dictionary/artifact-format.d.ts +86 -0
- package/dist/dictionary/artifact-format.d.ts.map +1 -0
- package/dist/dictionary/artifact-format.js +91 -0
- package/dist/dictionary/artifact-format.js.map +1 -0
- package/dist/dictionary/artifact-read.d.ts +34 -0
- package/dist/dictionary/artifact-read.d.ts.map +1 -0
- package/dist/dictionary/artifact-read.js +114 -0
- package/dist/dictionary/artifact-read.js.map +1 -0
- package/dist/dictionary/artifact.d.ts +4 -63
- package/dist/dictionary/artifact.d.ts.map +1 -1
- package/dist/dictionary/artifact.js +12 -229
- package/dist/dictionary/artifact.js.map +1 -1
- package/dist/dictionary/assertions.d.ts +5 -57
- package/dist/dictionary/assertions.d.ts.map +1 -1
- package/dist/dictionary/assertions.js +4 -317
- package/dist/dictionary/assertions.js.map +1 -1
- package/dist/dictionary/build-assertions.d.ts +12 -0
- package/dist/dictionary/build-assertions.d.ts.map +1 -0
- package/dist/dictionary/build-assertions.js +13 -0
- package/dist/dictionary/build-assertions.js.map +1 -0
- package/dist/dictionary/built-dictionary.d.ts +46 -0
- package/dist/dictionary/built-dictionary.d.ts.map +1 -0
- package/dist/dictionary/built-dictionary.js +97 -0
- package/dist/dictionary/built-dictionary.js.map +1 -0
- package/dist/dictionary/cedict-senses.d.ts +87 -0
- package/dist/dictionary/cedict-senses.d.ts.map +1 -0
- package/dist/dictionary/cedict-senses.js +126 -0
- package/dist/dictionary/cedict-senses.js.map +1 -0
- package/dist/dictionary/character-defaults.d.ts +26 -0
- package/dist/dictionary/character-defaults.d.ts.map +1 -0
- package/dist/dictionary/character-defaults.js +67 -0
- package/dist/dictionary/character-defaults.js.map +1 -0
- package/dist/dictionary/character-readings.d.ts +10 -0
- package/dist/dictionary/character-readings.d.ts.map +1 -0
- package/dist/dictionary/character-readings.js +25 -0
- package/dist/dictionary/character-readings.js.map +1 -0
- package/dist/dictionary/constituent-repair.d.ts +36 -0
- package/dist/dictionary/constituent-repair.d.ts.map +1 -0
- package/dist/dictionary/constituent-repair.js +117 -0
- package/dist/dictionary/constituent-repair.js.map +1 -0
- package/dist/dictionary/dictionary-entry.d.ts +37 -0
- package/dist/dictionary/dictionary-entry.d.ts.map +1 -0
- package/dist/dictionary/dictionary-entry.js +41 -0
- package/dist/dictionary/dictionary-entry.js.map +1 -0
- package/dist/dictionary/dictionary-readings.d.ts +56 -0
- package/dist/dictionary/dictionary-readings.d.ts.map +1 -0
- package/dist/dictionary/dictionary-readings.js +93 -0
- package/dist/dictionary/dictionary-readings.js.map +1 -0
- package/dist/dictionary/dictionary.d.ts +6 -60
- package/dist/dictionary/dictionary.d.ts.map +1 -1
- package/dist/dictionary/dictionary.js +9 -169
- package/dist/dictionary/dictionary.js.map +1 -1
- package/dist/dictionary/entry-invariants.d.ts +3 -0
- package/dist/dictionary/entry-invariants.d.ts.map +1 -0
- package/dist/dictionary/entry-invariants.js +67 -0
- package/dist/dictionary/entry-invariants.js.map +1 -0
- package/dist/dictionary/entry-lines.d.ts +35 -0
- package/dist/dictionary/entry-lines.d.ts.map +1 -0
- package/dist/dictionary/entry-lines.js +70 -0
- package/dist/dictionary/entry-lines.js.map +1 -0
- package/dist/dictionary/erhua-repair.d.ts +26 -0
- package/dist/dictionary/erhua-repair.d.ts.map +1 -0
- package/dist/dictionary/erhua-repair.js +49 -0
- package/dist/dictionary/erhua-repair.js.map +1 -0
- package/dist/dictionary/frequency-tones.d.ts +74 -0
- package/dist/dictionary/frequency-tones.d.ts.map +1 -0
- package/dist/dictionary/frequency-tones.js +128 -0
- package/dist/dictionary/frequency-tones.js.map +1 -0
- package/dist/dictionary/inventory-invariants.d.ts +3 -0
- package/dist/dictionary/inventory-invariants.d.ts.map +1 -0
- package/dist/dictionary/inventory-invariants.js +54 -0
- package/dist/dictionary/inventory-invariants.js.map +1 -0
- package/dist/dictionary/locale-candidates.d.ts +40 -0
- package/dist/dictionary/locale-candidates.d.ts.map +1 -0
- package/dist/dictionary/locale-candidates.js +77 -0
- package/dist/dictionary/locale-candidates.js.map +1 -0
- package/dist/dictionary/locale-segments.d.ts +47 -0
- package/dist/dictionary/locale-segments.d.ts.map +1 -0
- package/dist/dictionary/locale-segments.js +141 -0
- package/dist/dictionary/locale-segments.js.map +1 -0
- package/dist/dictionary/locale.d.ts +1 -21
- package/dist/dictionary/locale.d.ts.map +1 -1
- package/dist/dictionary/locale.js +9 -198
- package/dist/dictionary/locale.js.map +1 -1
- package/dist/dictionary/merge-types.d.ts +127 -0
- package/dist/dictionary/merge-types.d.ts.map +1 -0
- package/dist/dictionary/merge-types.js +35 -0
- package/dist/dictionary/merge-types.js.map +1 -0
- package/dist/dictionary/merge-walk.d.ts +27 -0
- package/dist/dictionary/merge-walk.d.ts.map +1 -0
- package/dist/dictionary/merge-walk.js +49 -0
- package/dist/dictionary/merge-walk.js.map +1 -0
- package/dist/dictionary/merge-word.d.ts +7 -0
- package/dist/dictionary/merge-word.d.ts.map +1 -0
- package/dist/dictionary/merge-word.js +91 -0
- package/dist/dictionary/merge-word.js.map +1 -0
- package/dist/dictionary/merge.d.ts +5 -62
- package/dist/dictionary/merge.d.ts.map +1 -1
- package/dist/dictionary/merge.js +32 -725
- package/dist/dictionary/merge.js.map +1 -1
- package/dist/dictionary/proper-noun.d.ts +28 -0
- package/dist/dictionary/proper-noun.d.ts.map +1 -0
- package/dist/dictionary/proper-noun.js +43 -0
- package/dist/dictionary/proper-noun.js.map +1 -0
- package/dist/dictionary/reading-agreement.d.ts +71 -0
- package/dist/dictionary/reading-agreement.d.ts.map +1 -0
- package/dist/dictionary/reading-agreement.js +156 -0
- package/dist/dictionary/reading-agreement.js.map +1 -0
- package/dist/dictionary/script-conversion.d.ts +28 -0
- package/dist/dictionary/script-conversion.d.ts.map +1 -0
- package/dist/dictionary/script-conversion.js +58 -0
- package/dist/dictionary/script-conversion.js.map +1 -0
- package/dist/dictionary/script-pairings.d.ts +74 -0
- package/dist/dictionary/script-pairings.d.ts.map +1 -0
- package/dist/dictionary/script-pairings.js +120 -0
- package/dist/dictionary/script-pairings.js.map +1 -0
- package/dist/dictionary/script-tables.d.ts.map +1 -1
- package/dist/dictionary/script-tables.js +2 -165
- package/dist/dictionary/script-tables.js.map +1 -1
- package/dist/dictionary/taiwan-reading.d.ts +8 -0
- package/dist/dictionary/taiwan-reading.d.ts.map +1 -0
- package/dist/dictionary/taiwan-reading.js +38 -0
- package/dist/dictionary/taiwan-reading.js.map +1 -0
- package/dist/dictionary/tone-invariants.d.ts +3 -0
- package/dist/dictionary/tone-invariants.d.ts.map +1 -0
- package/dist/dictionary/tone-invariants.js +64 -0
- package/dist/dictionary/tone-invariants.js.map +1 -0
- package/dist/dictionary/traditional-form.d.ts +21 -0
- package/dist/dictionary/traditional-form.d.ts.map +1 -0
- package/dist/dictionary/traditional-form.js +59 -0
- package/dist/dictionary/traditional-form.js.map +1 -0
- package/dist/dictionary/traditional-ranking.d.ts +22 -0
- package/dist/dictionary/traditional-ranking.d.ts.map +1 -0
- package/dist/dictionary/traditional-ranking.js +74 -0
- package/dist/dictionary/traditional-ranking.js.map +1 -0
- package/dist/dictionary/traditional-table.d.ts +51 -0
- package/dist/dictionary/traditional-table.d.ts.map +1 -0
- package/dist/dictionary/traditional-table.js +98 -0
- package/dist/dictionary/traditional-table.js.map +1 -0
- package/dist/dictionary/traditional.d.ts +3 -56
- package/dist/dictionary/traditional.d.ts.map +1 -1
- package/dist/dictionary/traditional.js +3 -186
- package/dist/dictionary/traditional.js.map +1 -1
- package/dist/dictionary/variant-counts.d.ts +39 -0
- package/dist/dictionary/variant-counts.d.ts.map +1 -0
- package/dist/dictionary/variant-counts.js +38 -0
- package/dist/dictionary/variant-counts.js.map +1 -0
- package/dist/dictionary/word-reading.d.ts +26 -0
- package/dist/dictionary/word-reading.d.ts.map +1 -0
- package/dist/dictionary/word-reading.js +76 -0
- package/dist/dictionary/word-reading.js.map +1 -0
- package/dist/dictionary/word-readings.d.ts +15 -0
- package/dist/dictionary/word-readings.d.ts.map +1 -0
- package/dist/dictionary/word-readings.js +41 -0
- package/dist/dictionary/word-readings.js.map +1 -0
- package/dist/format/annotate.d.ts +90 -0
- package/dist/format/annotate.d.ts.map +1 -0
- package/dist/format/annotate.js +168 -0
- package/dist/format/annotate.js.map +1 -0
- package/dist/format/html.d.ts +15 -46
- package/dist/format/html.d.ts.map +1 -1
- package/dist/format/html.js +3 -162
- package/dist/format/html.js.map +1 -1
- package/dist/format/slug-hash.d.ts +51 -0
- package/dist/format/slug-hash.d.ts.map +1 -0
- package/dist/format/slug-hash.js +74 -0
- package/dist/format/slug-hash.js.map +1 -0
- package/dist/format/slug-options.d.ts +98 -0
- package/dist/format/slug-options.d.ts.map +1 -0
- package/dist/format/slug-options.js +2 -0
- package/dist/format/slug-options.js.map +1 -0
- package/dist/format/slug-words.d.ts +27 -0
- package/dist/format/slug-words.d.ts.map +1 -0
- package/dist/format/slug-words.js +0 -0
- package/dist/format/slug-words.js.map +1 -0
- package/dist/format/slug.d.ts +3 -128
- package/dist/format/slug.d.ts.map +1 -1
- package/dist/format/slug.js +0 -0
- package/dist/format/slug.js.map +1 -1
- package/dist/grade/check-readings.d.ts +41 -0
- package/dist/grade/check-readings.d.ts.map +1 -0
- package/dist/grade/check-readings.js +36 -0
- package/dist/grade/check-readings.js.map +1 -0
- package/dist/grade/check.d.ts +4 -4
- package/dist/grade/check.d.ts.map +1 -1
- package/dist/grade/check.js +5 -270
- package/dist/grade/check.js.map +1 -1
- package/dist/grade/pair-syllables.d.ts +48 -0
- package/dist/grade/pair-syllables.d.ts.map +1 -0
- package/dist/grade/pair-syllables.js +71 -0
- package/dist/grade/pair-syllables.js.map +1 -0
- package/dist/grade/reading-syllables.d.ts +62 -0
- package/dist/grade/reading-syllables.d.ts.map +1 -0
- package/dist/grade/reading-syllables.js +58 -0
- package/dist/grade/reading-syllables.js.map +1 -0
- package/dist/grade/reading-tolerance.d.ts +72 -0
- package/dist/grade/reading-tolerance.d.ts.map +1 -0
- package/dist/grade/reading-tolerance.js +107 -0
- package/dist/grade/reading-tolerance.js.map +1 -0
- package/dist/grade/typed-reading.d.ts +28 -0
- package/dist/grade/typed-reading.d.ts.map +1 -0
- package/dist/grade/typed-reading.js +36 -0
- package/dist/grade/typed-reading.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/numerals/numeral-parse.d.ts +32 -0
- package/dist/numerals/numeral-parse.d.ts.map +1 -0
- package/dist/numerals/numeral-parse.js +44 -0
- package/dist/numerals/numeral-parse.js.map +1 -0
- package/dist/numerals/numeral-shapes.d.ts +89 -0
- package/dist/numerals/numeral-shapes.d.ts.map +1 -0
- package/dist/numerals/numeral-shapes.js +99 -0
- package/dist/numerals/numeral-shapes.js.map +1 -0
- package/dist/numerals/numerals.d.ts.map +1 -1
- package/dist/numerals/numerals.js +2 -36
- package/dist/numerals/numerals.js.map +1 -1
- package/dist/numerals/read-numeral.d.ts +76 -0
- package/dist/numerals/read-numeral.d.ts.map +1 -0
- package/dist/numerals/read-numeral.js +88 -0
- package/dist/numerals/read-numeral.js.map +1 -0
- package/dist/numerals/text.d.ts +3 -37
- package/dist/numerals/text.d.ts.map +1 -1
- package/dist/numerals/text.js +3 -254
- package/dist/numerals/text.js.map +1 -1
- package/dist/numerals/time.d.ts +34 -0
- package/dist/numerals/time.d.ts.map +1 -0
- package/dist/numerals/time.js +93 -0
- package/dist/numerals/time.js.map +1 -0
- package/dist/orthography/address-grouping.d.ts +34 -0
- package/dist/orthography/address-grouping.d.ts.map +1 -0
- package/dist/orthography/address-grouping.js +52 -0
- package/dist/orthography/address-grouping.js.map +1 -0
- package/dist/orthography/grouping.d.ts +3 -87
- package/dist/orthography/grouping.d.ts.map +1 -1
- package/dist/orthography/grouping.js +4 -270
- package/dist/orthography/grouping.js.map +1 -1
- package/dist/orthography/place-grouping.d.ts +39 -0
- package/dist/orthography/place-grouping.d.ts.map +1 -0
- package/dist/orthography/place-grouping.js +83 -0
- package/dist/orthography/place-grouping.js.map +1 -0
- package/dist/orthography/word-grouping.d.ts +48 -0
- package/dist/orthography/word-grouping.d.ts.map +1 -0
- package/dist/orthography/word-grouping.js +147 -0
- package/dist/orthography/word-grouping.js.map +1 -0
- package/dist/script/conversion-format.d.ts +22 -0
- package/dist/script/conversion-format.d.ts.map +1 -0
- package/dist/script/conversion-format.js +22 -0
- package/dist/script/conversion-format.js.map +1 -0
- package/dist/script/conversion-read.d.ts +9 -0
- package/dist/script/conversion-read.d.ts.map +1 -0
- package/dist/script/conversion-read.js +69 -0
- package/dist/script/conversion-read.js.map +1 -0
- package/dist/script/conversion-write.d.ts +14 -0
- package/dist/script/conversion-write.d.ts.map +1 -0
- package/dist/script/conversion-write.js +34 -0
- package/dist/script/conversion-write.js.map +1 -0
- package/dist/script/conversion.d.ts +10 -16
- package/dist/script/conversion.d.ts.map +1 -1
- package/dist/script/conversion.js +2 -115
- package/dist/script/conversion.js.map +1 -1
- package/dist/search/candidate-narrowing.d.ts +56 -0
- package/dist/search/candidate-narrowing.d.ts.map +1 -0
- package/dist/search/candidate-narrowing.js +55 -0
- package/dist/search/candidate-narrowing.js.map +1 -0
- package/dist/search/candidate-query.d.ts +25 -0
- package/dist/search/candidate-query.d.ts.map +1 -0
- package/dist/search/candidate-query.js +28 -0
- package/dist/search/candidate-query.js.map +1 -0
- package/dist/search/candidate-writings.d.ts +24 -0
- package/dist/search/candidate-writings.d.ts.map +1 -0
- package/dist/search/candidate-writings.js +114 -0
- package/dist/search/candidate-writings.js.map +1 -0
- package/dist/search/candidates.d.ts +7 -41
- package/dist/search/candidates.d.ts.map +1 -1
- package/dist/search/candidates.js +10 -164
- package/dist/search/candidates.js.map +1 -1
- package/dist/search/match-chunks.d.ts +19 -0
- package/dist/search/match-chunks.d.ts.map +1 -0
- package/dist/search/match-chunks.js +30 -0
- package/dist/search/match-chunks.js.map +1 -0
- package/dist/search/match-ranking.d.ts +39 -0
- package/dist/search/match-ranking.d.ts.map +1 -0
- package/dist/search/match-ranking.js +51 -0
- package/dist/search/match-ranking.js.map +1 -0
- package/dist/search/match-readings.d.ts +43 -0
- package/dist/search/match-readings.d.ts.map +1 -0
- package/dist/search/match-readings.js +83 -0
- package/dist/search/match-readings.js.map +1 -0
- package/dist/search/match-scoring.d.ts +146 -0
- package/dist/search/match-scoring.d.ts.map +1 -0
- package/dist/search/match-scoring.js +114 -0
- package/dist/search/match-scoring.js.map +1 -0
- package/dist/search/match-search.d.ts +28 -0
- package/dist/search/match-search.d.ts.map +1 -0
- package/dist/search/match-search.js +128 -0
- package/dist/search/match-search.js.map +1 -0
- package/dist/search/match.d.ts +5 -36
- package/dist/search/match.d.ts.map +1 -1
- package/dist/search/match.js +2 -379
- package/dist/search/match.js.map +1 -1
- package/dist/search/reverse-index-build.d.ts +30 -0
- package/dist/search/reverse-index-build.d.ts.map +1 -0
- package/dist/search/reverse-index-build.js +72 -0
- package/dist/search/reverse-index-build.js.map +1 -0
- package/dist/search/reverse-index-format.d.ts +60 -0
- package/dist/search/reverse-index-format.d.ts.map +1 -0
- package/dist/search/reverse-index-format.js +54 -0
- package/dist/search/reverse-index-format.js.map +1 -0
- package/dist/search/reverse-index-groups.d.ts +37 -0
- package/dist/search/reverse-index-groups.d.ts.map +1 -0
- package/dist/search/reverse-index-groups.js +71 -0
- package/dist/search/reverse-index-groups.js.map +1 -0
- package/dist/search/reverse-index-passes.d.ts +78 -0
- package/dist/search/reverse-index-passes.d.ts.map +1 -0
- package/dist/search/reverse-index-passes.js +59 -0
- package/dist/search/reverse-index-passes.js.map +1 -0
- package/dist/search/reverse-index-state.d.ts +36 -0
- package/dist/search/reverse-index-state.d.ts.map +1 -0
- package/dist/search/reverse-index-state.js +95 -0
- package/dist/search/reverse-index-state.js.map +1 -0
- package/dist/search/reverse-index.d.ts +8 -67
- package/dist/search/reverse-index.d.ts.map +1 -1
- package/dist/search/reverse-index.js +4 -255
- package/dist/search/reverse-index.js.map +1 -1
- package/dist/sources/unihan-readings.d.ts +58 -0
- package/dist/sources/unihan-readings.d.ts.map +1 -0
- package/dist/sources/unihan-readings.js +95 -0
- package/dist/sources/unihan-readings.js.map +1 -0
- package/dist/sources/unihan.d.ts +6 -9
- package/dist/sources/unihan.d.ts.map +1 -1
- package/dist/sources/unihan.js +2 -85
- package/dist/sources/unihan.js.map +1 -1
- package/dist/syllable/final-tables.d.ts +23 -0
- package/dist/syllable/final-tables.d.ts.map +1 -0
- package/dist/syllable/final-tables.js +50 -0
- package/dist/syllable/final-tables.js.map +1 -0
- package/dist/syllable/inventory.d.ts +8 -42
- package/dist/syllable/inventory.d.ts.map +1 -1
- package/dist/syllable/inventory.js +9 -918
- package/dist/syllable/inventory.js.map +1 -1
- package/dist/syllable/spellings.d.ts +40 -0
- package/dist/syllable/spellings.d.ts.map +1 -0
- package/dist/syllable/spellings.js +469 -0
- package/dist/syllable/spellings.js.map +1 -0
- package/dist/syllable/syllable-parts.d.ts +31 -0
- package/dist/syllable/syllable-parts.d.ts.map +1 -0
- package/dist/syllable/syllable-parts.js +105 -0
- package/dist/syllable/syllable-parts.js.map +1 -0
- package/dist/syllable/syllable.d.ts +1 -14
- package/dist/syllable/syllable.d.ts.map +1 -1
- package/dist/syllable/syllable.js +3 -144
- package/dist/syllable/syllable.js.map +1 -1
- package/dist/syllable/written-tones.d.ts +6 -0
- package/dist/syllable/written-tones.d.ts.map +1 -0
- package/dist/syllable/written-tones.js +453 -0
- package/dist/syllable/written-tones.js.map +1 -0
- package/dist/transcription/bopomofo-parse.d.ts +42 -0
- package/dist/transcription/bopomofo-parse.d.ts.map +1 -0
- package/dist/transcription/bopomofo-parse.js +92 -0
- package/dist/transcription/bopomofo-parse.js.map +1 -0
- package/dist/transcription/bopomofo-reverse.d.ts +31 -0
- package/dist/transcription/bopomofo-reverse.d.ts.map +1 -0
- package/dist/transcription/bopomofo-reverse.js +48 -0
- package/dist/transcription/bopomofo-reverse.js.map +1 -0
- package/dist/transcription/bopomofo-symbols.d.ts +36 -0
- package/dist/transcription/bopomofo-symbols.d.ts.map +1 -0
- package/dist/transcription/bopomofo-symbols.js +41 -0
- package/dist/transcription/bopomofo-symbols.js.map +1 -0
- package/dist/transcription/bopomofo-tables.d.ts +87 -0
- package/dist/transcription/bopomofo-tables.d.ts.map +1 -0
- package/dist/transcription/bopomofo-tables.js +180 -0
- package/dist/transcription/bopomofo-tables.js.map +1 -0
- package/dist/transcription/bopomofo.d.ts +14 -32
- package/dist/transcription/bopomofo.d.ts.map +1 -1
- package/dist/transcription/bopomofo.js +5 -343
- package/dist/transcription/bopomofo.js.map +1 -1
- package/dist/transcription/gwoyeu-first-second.d.ts +36 -0
- package/dist/transcription/gwoyeu-first-second.d.ts.map +1 -0
- package/dist/transcription/gwoyeu-first-second.js +75 -0
- package/dist/transcription/gwoyeu-first-second.js.map +1 -0
- package/dist/transcription/gwoyeu-spelling.d.ts +38 -0
- package/dist/transcription/gwoyeu-spelling.d.ts.map +1 -0
- package/dist/transcription/gwoyeu-spelling.js +124 -0
- package/dist/transcription/gwoyeu-spelling.js.map +1 -0
- package/dist/transcription/gwoyeu-tables.d.ts +93 -0
- package/dist/transcription/gwoyeu-tables.d.ts.map +1 -0
- package/dist/transcription/gwoyeu-tables.js +205 -0
- package/dist/transcription/gwoyeu-tables.js.map +1 -0
- package/dist/transcription/gwoyeu-tonal-forms.d.ts +49 -0
- package/dist/transcription/gwoyeu-tonal-forms.d.ts.map +1 -0
- package/dist/transcription/gwoyeu-tonal-forms.js +89 -0
- package/dist/transcription/gwoyeu-tonal-forms.js.map +1 -0
- package/dist/transcription/gwoyeu-vowels.d.ts +51 -0
- package/dist/transcription/gwoyeu-vowels.d.ts.map +1 -0
- package/dist/transcription/gwoyeu-vowels.js +58 -0
- package/dist/transcription/gwoyeu-vowels.js.map +1 -0
- package/dist/transcription/gwoyeu.d.ts +1 -26
- package/dist/transcription/gwoyeu.d.ts.map +1 -1
- package/dist/transcription/gwoyeu.js +2 -540
- package/dist/transcription/gwoyeu.js.map +1 -1
- package/dist/transcription/ipa-symbols.d.ts +67 -0
- package/dist/transcription/ipa-symbols.d.ts.map +1 -0
- package/dist/transcription/ipa-symbols.js +135 -0
- package/dist/transcription/ipa-symbols.js.map +1 -0
- package/dist/transcription/ipa.d.ts +2 -10
- package/dist/transcription/ipa.d.ts.map +1 -1
- package/dist/transcription/ipa.js +2 -134
- package/dist/transcription/ipa.js.map +1 -1
- package/dist/transcription/wade-giles-index.d.ts +35 -0
- package/dist/transcription/wade-giles-index.d.ts.map +1 -0
- package/dist/transcription/wade-giles-index.js +110 -0
- package/dist/transcription/wade-giles-index.js.map +1 -0
- package/dist/transcription/wade-giles-parse.d.ts +36 -0
- package/dist/transcription/wade-giles-parse.d.ts.map +1 -0
- package/dist/transcription/wade-giles-parse.js +84 -0
- package/dist/transcription/wade-giles-parse.js.map +1 -0
- package/dist/transcription/wade-giles-spelling.d.ts +61 -0
- package/dist/transcription/wade-giles-spelling.d.ts.map +1 -0
- package/dist/transcription/wade-giles-spelling.js +107 -0
- package/dist/transcription/wade-giles-spelling.js.map +1 -0
- package/dist/transcription/wade-giles-syllable.d.ts +29 -0
- package/dist/transcription/wade-giles-syllable.d.ts.map +1 -0
- package/dist/transcription/wade-giles-syllable.js +90 -0
- package/dist/transcription/wade-giles-syllable.js.map +1 -0
- package/dist/transcription/wade-giles-tables.d.ts +80 -0
- package/dist/transcription/wade-giles-tables.d.ts.map +1 -0
- package/dist/transcription/wade-giles-tables.js +178 -0
- package/dist/transcription/wade-giles-tables.js.map +1 -0
- package/dist/transcription/wade-giles.d.ts +9 -60
- package/dist/transcription/wade-giles.d.ts.map +1 -1
- package/dist/transcription/wade-giles.js +6 -543
- package/dist/transcription/wade-giles.js.map +1 -1
- package/dist/transcription/yale-tables.d.ts +54 -0
- package/dist/transcription/yale-tables.d.ts.map +1 -0
- package/dist/transcription/yale-tables.js +125 -0
- package/dist/transcription/yale-tables.js.map +1 -0
- package/dist/transcription/yale.d.ts.map +1 -1
- package/dist/transcription/yale.js +1 -124
- package/dist/transcription/yale.js.map +1 -1
- package/package.json +2 -2
package/data/manifest.json
CHANGED
|
@@ -21,20 +21,20 @@
|
|
|
21
21
|
"keys": "full.keys",
|
|
22
22
|
"readings": "full.entries",
|
|
23
23
|
"frequencies": "full.freq",
|
|
24
|
-
"bytes":
|
|
25
|
-
"compressedBytes":
|
|
24
|
+
"bytes": 9140884,
|
|
25
|
+
"compressedBytes": 2401549
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"script": {
|
|
29
29
|
"file": "script.map",
|
|
30
30
|
"toTraditional": 5944,
|
|
31
31
|
"toSimplified": 6117,
|
|
32
|
-
"traditionalWords":
|
|
32
|
+
"traditionalWords": 2390,
|
|
33
33
|
"simplifiedWords": 849,
|
|
34
34
|
"hansOnly": 5785,
|
|
35
35
|
"hantOnly": 5497,
|
|
36
|
-
"bytes":
|
|
37
|
-
"compressedBytes":
|
|
36
|
+
"bytes": 292980,
|
|
37
|
+
"compressedBytes": 100301
|
|
38
38
|
},
|
|
39
39
|
"sources": [
|
|
40
40
|
"https://www.unicode.org/Public/UCD/latest/ucd/Unihan.zip",
|
package/data/script.map
CHANGED
|
@@ -273,7 +273,7 @@ t 艺 藝
|
|
|
273
273
|
t 担 擔
|
|
274
274
|
t 卧 臥
|
|
275
275
|
t 卷 卷 捲
|
|
276
|
-
t 历 歷
|
|
276
|
+
t 历 歷 曆
|
|
277
277
|
t 厢 廂
|
|
278
278
|
t 愿 願
|
|
279
279
|
t 踪 蹤
|
|
@@ -521,7 +521,7 @@ t 篑 簣
|
|
|
521
521
|
t 类 類
|
|
522
522
|
t 护 護
|
|
523
523
|
t 坏 壞
|
|
524
|
-
t 系 系
|
|
524
|
+
t 系 系 ji4=繫 係
|
|
525
525
|
t 纠 糾
|
|
526
526
|
t 纯 純
|
|
527
527
|
t 络 絡
|
|
@@ -643,7 +643,7 @@ t 裤 褲
|
|
|
643
643
|
t 钢 鋼
|
|
644
644
|
t 镐 鎬
|
|
645
645
|
t 宁 寧
|
|
646
|
-
t 辟 闢
|
|
646
|
+
t 辟 闢 辟
|
|
647
647
|
t 栎 櫟
|
|
648
648
|
t 珰 璫
|
|
649
649
|
t 税 稅
|
|
@@ -12071,6 +12071,7 @@ w 一箭双雕 一箭雙鵰
|
|
|
12071
12071
|
w 一见钟情 一見鍾情
|
|
12072
12072
|
w 丁丁炒面 丁丁炒麵
|
|
12073
12073
|
w 丁丑 丁丑
|
|
12074
|
+
w 丁巳复辟 丁巳復辟
|
|
12074
12075
|
w 丁零当啷 丁零噹啷
|
|
12075
12076
|
w 万事俱备,只欠东风 萬事俱備,只欠東風
|
|
12076
12077
|
w 万历 萬曆
|
|
@@ -12102,12 +12103,14 @@ w 不法分子 不法份子
|
|
|
12102
12103
|
w 不相干 不相干
|
|
12103
12104
|
w 不知就里 不知就裡
|
|
12104
12105
|
w 不知所云 不知所云
|
|
12106
|
+
w 不辟斧钺 不辟斧鉞
|
|
12105
12107
|
w 不锈钢 不銹鋼
|
|
12106
12108
|
w 丑时 丑時
|
|
12107
12109
|
w 丑牛 丑牛
|
|
12108
12110
|
w 丑角 丑角
|
|
12109
12111
|
w 丑鸭 丑鴨
|
|
12110
12112
|
w 世上无难事,只怕有心人 世上無難事,只怕有心人
|
|
12113
|
+
w 世辟 世辟
|
|
12111
12114
|
w 丛冢 叢冢
|
|
12112
12115
|
w 东台 東台
|
|
12113
12116
|
w 东台市 東台市
|
|
@@ -12258,8 +12261,12 @@ w 公布栏 公佈欄
|
|
|
12258
12261
|
w 共轭复数 共軛複數
|
|
12259
12262
|
w 关云长 關云長
|
|
12260
12263
|
w 关征 關征
|
|
12264
|
+
w 关系 關係
|
|
12265
|
+
w 关系代名词 關係代名詞
|
|
12261
12266
|
w 关系到 關係到
|
|
12262
12267
|
w 关系式 關係式
|
|
12268
|
+
w 关系户 關係戶
|
|
12269
|
+
w 关系网 關係網
|
|
12263
12270
|
w 兴冲冲 興沖沖
|
|
12264
12271
|
w 兴高采烈 興高采烈
|
|
12265
12272
|
w 兼并 兼併
|
|
@@ -12369,6 +12376,9 @@ w 划痕 劃痕
|
|
|
12369
12376
|
w 划破 劃破
|
|
12370
12377
|
w 划过 劃過
|
|
12371
12378
|
w 列别杰夫 列別傑夫
|
|
12379
|
+
w 利害关系 利害關係
|
|
12380
|
+
w 利害关系人 利害關係人
|
|
12381
|
+
w 利害关系方 利害關係方
|
|
12372
12382
|
w 利欲 利慾
|
|
12373
12383
|
w 利欲心 利慾心
|
|
12374
12384
|
w 利欲熏心 利慾薰心
|
|
@@ -12417,6 +12427,9 @@ w 制陶工人 製陶工人
|
|
|
12417
12427
|
w 制鞋匠 製鞋匠
|
|
12418
12428
|
w 制鞋工人 製鞋工人
|
|
12419
12429
|
w 前车之鉴 前車之鑑
|
|
12430
|
+
w 割舍了 割舍了
|
|
12431
|
+
w 割舍得 割舍得
|
|
12432
|
+
w 割舍的 割舍的
|
|
12420
12433
|
w 力争上游 力爭上游
|
|
12421
12434
|
w 力征 力征
|
|
12422
12435
|
w 动荡 動盪
|
|
@@ -12518,6 +12531,7 @@ w 发夹 髮夾
|
|
|
12518
12531
|
w 发小儿 髮小兒
|
|
12519
12532
|
w 发布 發佈
|
|
12520
12533
|
w 发布会 發佈會
|
|
12534
|
+
w 发生关系 發生關係
|
|
12521
12535
|
w 发面 發麵
|
|
12522
12536
|
w 受托 受託
|
|
12523
12537
|
w 受托人 受託人
|
|
@@ -12533,6 +12547,7 @@ w 只要功夫深,铁杵磨成针 只要功夫深,鐵杵磨成針
|
|
|
12533
12547
|
w 只见树木,不见森林 只見樹木,不見森林
|
|
12534
12548
|
w 只言片语 只言片語
|
|
12535
12549
|
w 只许州官放火,不许百姓点灯 只許州官放火,不許百姓點燈
|
|
12550
|
+
w 只读存储器 隻讀存儲器
|
|
12536
12551
|
w 叮叮当当 叮叮噹噹
|
|
12537
12552
|
w 叮当 叮噹
|
|
12538
12553
|
w 叮当响 叮噹響
|
|
@@ -12796,6 +12811,7 @@ w 复合母音 複合母音
|
|
|
12796
12811
|
w 复合肥 複合肥
|
|
12797
12812
|
w 复合词 複合詞
|
|
12798
12813
|
w 复听 複聽
|
|
12814
|
+
w 复子明辟 復子明辟
|
|
12799
12815
|
w 复平面 複平面
|
|
12800
12816
|
w 复式 複式
|
|
12801
12817
|
w 复数 複數
|
|
@@ -12820,6 +12836,7 @@ w 复词 複詞
|
|
|
12820
12836
|
w 复试 複試
|
|
12821
12837
|
w 复购 複購
|
|
12822
12838
|
w 复赛 複賽
|
|
12839
|
+
w 复辟 復辟
|
|
12823
12840
|
w 复迭 複迭
|
|
12824
12841
|
w 复述 複述
|
|
12825
12842
|
w 复选框 複選框
|
|
@@ -12949,6 +12966,7 @@ w 尸罗 尸羅
|
|
|
12949
12966
|
w 尼采 尼采
|
|
12950
12967
|
w 尼龙搭扣 尼龍搭釦
|
|
12951
12968
|
w 尾注 尾註
|
|
12969
|
+
w 尾随不舍 尾隨不舍
|
|
12952
12970
|
w 局促 侷促
|
|
12953
12971
|
w 局限 侷限
|
|
12954
12972
|
w 层岩 層巖
|
|
@@ -13054,6 +13072,7 @@ w 开杆 開杆
|
|
|
13054
13072
|
w 开炮 開砲
|
|
13055
13073
|
w 开诚布公 開誠佈公
|
|
13056
13074
|
w 引以为鉴 引以為鑑
|
|
13075
|
+
w 张勋复辟 張勳復辟
|
|
13057
13076
|
w 弥漫星云 瀰漫星雲
|
|
13058
13077
|
w 弩炮 弩砲
|
|
13059
13078
|
w 弯管面 彎管麵
|
|
@@ -13094,6 +13113,7 @@ w 征程 征程
|
|
|
13094
13113
|
w 征衣 征衣
|
|
13095
13114
|
w 征衫 征衫
|
|
13096
13115
|
w 征讨 征討
|
|
13116
|
+
w 征辟 徵辟
|
|
13097
13117
|
w 征途 征途
|
|
13098
13118
|
w 征马 征馬
|
|
13099
13119
|
w 征驾 征駕
|
|
@@ -13127,6 +13147,7 @@ w 怀里 懷裡
|
|
|
13127
13147
|
w 怒冲冲 怒沖沖
|
|
13128
13148
|
w 怒气冲冲 怒氣沖沖
|
|
13129
13149
|
w 性伙伴 性夥伴
|
|
13150
|
+
w 性关系 性關係
|
|
13130
13151
|
w 性欲 性慾
|
|
13131
13152
|
w 性欲高潮 性慾高潮
|
|
13132
13153
|
w 怨气冲天 怨氣沖天
|
|
@@ -13270,9 +13291,11 @@ w 撒马尔干 撒馬爾干
|
|
|
13270
13291
|
w 撤并 撤併
|
|
13271
13292
|
w 擀面杖 擀麵杖
|
|
13272
13293
|
w 操作台 操作台
|
|
13294
|
+
w 攘辟 攘辟
|
|
13273
13295
|
w 支努干 支努干
|
|
13274
13296
|
w 收获节 收穫節
|
|
13275
13297
|
w 收银台 收銀台
|
|
13298
|
+
w 改善关系 改善關係
|
|
13276
13299
|
w 攻占 攻占
|
|
13277
13300
|
w 放在眼里 放在眼裡
|
|
13278
13301
|
w 放松 放鬆
|
|
@@ -13312,12 +13335,14 @@ w 无干 無干
|
|
|
13312
13335
|
w 无筋面粉 無筋麵粉
|
|
13313
13336
|
w 无精打采 無精打采
|
|
13314
13337
|
w 无须 無須
|
|
13338
|
+
w 日佣人 日佣人
|
|
13315
13339
|
w 日历 日曆
|
|
13316
13340
|
w 日志 日誌
|
|
13317
13341
|
w 日本国志 日本國誌
|
|
13318
13342
|
w 日里 日裡
|
|
13319
13343
|
w 旧历 舊曆
|
|
13320
13344
|
w 旧历年 舊曆年
|
|
13345
|
+
w 旧皇历 舊皇曆
|
|
13321
13346
|
w 昆仑 崑崙
|
|
13322
13347
|
w 昆仑山 崑崙山
|
|
13323
13348
|
w 昆仑山脉 崑崙山脈
|
|
@@ -13328,6 +13353,7 @@ w 昆山市 崑山市
|
|
|
13328
13353
|
w 昆曲 崑曲
|
|
13329
13354
|
w 昆腔 崑腔
|
|
13330
13355
|
w 明窗净几 明窗淨几
|
|
13356
|
+
w 明辟 明辟
|
|
13331
13357
|
w 明里暗里 明裡暗裡
|
|
13332
13358
|
w 星历 星曆
|
|
13333
13359
|
w 春光乍泄 春光乍泄
|
|
@@ -13478,6 +13504,8 @@ w 沉淀 沈澱
|
|
|
13478
13504
|
w 沉溺 沈溺
|
|
13479
13505
|
w 沉鱼落雁 沈魚落雁
|
|
13480
13506
|
w 沙坪坝 沙坪垻
|
|
13507
|
+
w 没关系 沒關係
|
|
13508
|
+
w 没有关系 沒有關係
|
|
13481
13509
|
w 没精打采 沒精打采
|
|
13482
13510
|
w 河涌 河涌
|
|
13483
13511
|
w 油泼扯面 油潑扯麵
|
|
@@ -13521,9 +13549,11 @@ w 流里流气 流裡流氣
|
|
|
13521
13549
|
w 测杆 測杆
|
|
13522
13550
|
w 浑仪注 渾儀註
|
|
13523
13551
|
w 浓郁 濃郁
|
|
13552
|
+
w 浙江天台县 浙江天臺縣
|
|
13524
13553
|
w 浮游 浮游
|
|
13525
13554
|
w 浮游生物 浮游生物
|
|
13526
13555
|
w 海于格松 海于格松
|
|
13556
|
+
w 海峡两岸关系协会 海峽兩岸關係協會
|
|
13527
13557
|
w 海淀 海淀
|
|
13528
13558
|
w 海淀区 海淀區
|
|
13529
13559
|
w 海淀图书城 海淀圖書城
|
|
@@ -13657,6 +13687,7 @@ w 生态环境游 生態環境游
|
|
|
13657
13687
|
w 生物制剂 生物製劑
|
|
13658
13688
|
w 生物制品 生物製品
|
|
13659
13689
|
w 生面团 生麵糰
|
|
13690
|
+
w 用尽地 用儘地
|
|
13660
13691
|
w 由表及里 由表及裡
|
|
13661
13692
|
w 电子表 電子錶
|
|
13662
13693
|
w 电影制作 電影製作
|
|
@@ -13686,7 +13717,9 @@ w 白腹隼雕 白腹隼鵰
|
|
|
13686
13717
|
w 白面 白麵
|
|
13687
13718
|
w 白面儿 白麵兒
|
|
13688
13719
|
w 百谷 百穀
|
|
13720
|
+
w 百辟 百辟
|
|
13689
13721
|
w 百里挑一 百裡挑一
|
|
13722
|
+
w 皇历 皇曆
|
|
13690
13723
|
w 皇后 皇后
|
|
13691
13724
|
w 皇后区 皇后區
|
|
13692
13725
|
w 皇后镇 皇后鎮
|
|
@@ -13719,6 +13752,7 @@ w 瞈蒙 瞈矇
|
|
|
13719
13752
|
w 矢志 矢誌
|
|
13720
13753
|
w 知识分子 知識份子
|
|
13721
13754
|
w 矬子里拔将军 矬子裡拔將軍
|
|
13755
|
+
w 短发地 短發地
|
|
13722
13756
|
w 短趾雕 短趾鵰
|
|
13723
13757
|
w 矮子里拔将军 矮子裡拔將軍
|
|
13724
13758
|
w 石台 石台
|
|
@@ -13730,6 +13764,7 @@ w 砚台 硯臺
|
|
|
13730
13764
|
w 砷制剂 砷製劑
|
|
13731
13765
|
w 碑志 碑誌
|
|
13732
13766
|
w 碱水面包 鹼水麵包
|
|
13767
|
+
w 磁流体发电 磁流體髮電
|
|
13733
13768
|
w 磁轨炮 磁軌砲
|
|
13734
13769
|
w 磨制石器 磨製石器
|
|
13735
13770
|
w 示复 示覆
|
|
@@ -13754,6 +13789,10 @@ w 禾谷 禾穀
|
|
|
13754
13789
|
w 秃发 禿發
|
|
13755
13790
|
w 秋千 鞦韆
|
|
13756
13791
|
w 秋征 秋征
|
|
13792
|
+
w 科斗书 科鬥書
|
|
13793
|
+
w 科斗字 科鬥字
|
|
13794
|
+
w 科斗筯 科鬥筯
|
|
13795
|
+
w 科斗籍 科鬥籍
|
|
13757
13796
|
w 秕谷 秕穀
|
|
13758
13797
|
w 秘传 祕傳
|
|
13759
13798
|
w 秘制 秘製
|
|
@@ -13810,6 +13849,7 @@ w 系囚 繫囚
|
|
|
13810
13849
|
w 系放 繫放
|
|
13811
13850
|
w 系数 係數
|
|
13812
13851
|
w 素朴 素樸
|
|
13852
|
+
w 紧跟不舍 緊跟不舍
|
|
13813
13853
|
w 紫云苗族布依族自治县 紫云苗族布依族自治縣
|
|
13814
13854
|
w 紫金山天文台 紫金山天文台
|
|
13815
13855
|
w 繁复 繁複
|
|
@@ -13845,6 +13885,7 @@ w 美中台 美中台
|
|
|
13845
13885
|
w 美体小铺 美體小舖
|
|
13846
13886
|
w 美制 美製
|
|
13847
13887
|
w 美国存托凭证 美國存託憑證
|
|
13888
|
+
w 群辟 群辟
|
|
13848
13889
|
w 羽状复叶 羽狀複葉
|
|
13849
13890
|
w 翻老皇历 翻老皇曆
|
|
13850
13891
|
w 老家伙 老傢伙
|
|
@@ -13871,6 +13912,7 @@ w 肉汤面 肉湯麵
|
|
|
13871
13912
|
w 肉烂在锅里 肉爛在鍋裡
|
|
13872
13913
|
w 肌肉松弛剂 肌肉鬆弛劑
|
|
13873
13914
|
w 股栗 股慄
|
|
13915
|
+
w 肮脏气 骯臟氣
|
|
13874
13916
|
w 肺炎霉浆菌 肺炎黴漿菌
|
|
13875
13917
|
w 背债 揹債
|
|
13876
13918
|
w 背地里 背地裡
|
|
@@ -13883,6 +13925,7 @@ w 胡茬 鬍茬
|
|
|
13883
13925
|
w 胡须 鬍鬚
|
|
13884
13926
|
w 胡髭 鬍髭
|
|
13885
13927
|
w 脆谷乐 脆穀樂
|
|
13928
|
+
w 脏躁症 髒躁症
|
|
13886
13929
|
w 脑力激荡 腦力激盪
|
|
13887
13930
|
w 脑震荡 腦震盪
|
|
13888
13931
|
w 脱肛 脫疘
|
|
@@ -13900,6 +13943,7 @@ w 臭熏熏 臭燻燻
|
|
|
13900
13943
|
w 致密 緻密
|
|
13901
13944
|
w 臾须 臾須
|
|
13902
13945
|
w 舍得一身剐,敢把皇帝拉下马 捨得一身剮,敢把皇帝拉下馬
|
|
13946
|
+
w 舍身饲虎 舍身飼虎
|
|
13903
13947
|
w 舍车保帅 捨車保帥
|
|
13904
13948
|
w 舒卷 舒捲
|
|
13905
13949
|
w 舞娘 舞孃
|
|
@@ -13996,6 +14040,7 @@ w 表针 錶針
|
|
|
13996
14040
|
w 衬里 襯裡
|
|
13997
14041
|
w 袁于令 袁于令
|
|
13998
14042
|
w 裁制 裁製
|
|
14043
|
+
w 裙带关系 裙帶關係
|
|
13999
14044
|
w 褟绦子 褟縧子
|
|
14000
14045
|
w 西历 西曆
|
|
14001
14046
|
w 西岳 西嶽
|
|
@@ -14078,6 +14123,8 @@ w 赞誉 讚譽
|
|
|
14078
14123
|
w 赞许 讚許
|
|
14079
14124
|
w 赞赏 讚賞
|
|
14080
14125
|
w 赞颂 讚頌
|
|
14126
|
+
w 起根发脚 起根發腳
|
|
14127
|
+
w 超友谊关系 超友誼關係
|
|
14081
14128
|
w 趋吉避凶 趨吉避凶
|
|
14082
14129
|
w 跋杯 跋桮
|
|
14083
14130
|
w 跑表 跑錶
|
|
@@ -14086,6 +14133,7 @@ w 跳梁小丑 跳梁小丑
|
|
|
14086
14133
|
w 躲清闲 躲清閑
|
|
14087
14134
|
w 车厘子 車厘子
|
|
14088
14135
|
w 轧制 軋製
|
|
14136
|
+
w 转关系 轉關係
|
|
14089
14137
|
w 转制 轉製
|
|
14090
14138
|
w 转台 轉台
|
|
14091
14139
|
w 转车台 轉車台
|
|
@@ -14097,7 +14145,16 @@ w 轮奸 輪姦
|
|
|
14097
14145
|
w 轻松 輕鬆
|
|
14098
14146
|
w 辛丑 辛丑
|
|
14099
14147
|
w 辛丑条约 辛丑條約
|
|
14148
|
+
w 辟举 辟舉
|
|
14149
|
+
w 辟书 辟書
|
|
14150
|
+
w 辟召 辟召
|
|
14151
|
+
w 辟吏 辟吏
|
|
14152
|
+
w 辟引 辟引
|
|
14153
|
+
w 辟纑 辟纑
|
|
14154
|
+
w 辟言 辟言
|
|
14100
14155
|
w 辟谷 辟穀
|
|
14156
|
+
w 辟邪 辟邪
|
|
14157
|
+
w 辟雍 辟雍
|
|
14101
14158
|
w 辟雍砚 辟雍硯
|
|
14102
14159
|
w 边反卷地 邊反捲地
|
|
14103
14160
|
w 辽沈战役 遼瀋戰役
|
|
@@ -14110,6 +14167,7 @@ w 连三并四 連三併四
|
|
|
14110
14167
|
w 连珠炮 連珠砲
|
|
14111
14168
|
w 连系 連繫
|
|
14112
14169
|
w 连系词 連繫詞
|
|
14170
|
+
w 连辟公府不就 連辟公府不就
|
|
14113
14171
|
w 迷奸 迷姦
|
|
14114
14172
|
w 迷蒙 迷濛
|
|
14115
14173
|
w 选美皇后 選美皇后
|
|
@@ -14318,7 +14376,10 @@ w 面馆 麵館
|
|
|
14318
14376
|
w 革制品 革製品
|
|
14319
14377
|
w 靴隼雕 靴隼鵰
|
|
14320
14378
|
w 鞣制 鞣製
|
|
14379
|
+
w 鞭辟 鞭辟
|
|
14321
14380
|
w 鞭辟入里 鞭闢入裡
|
|
14381
|
+
w 鞭辟向里 鞭辟向里
|
|
14382
|
+
w 鞭辟着里 鞭辟著里
|
|
14322
14383
|
w 韬戈卷甲 韜戈捲甲
|
|
14323
14384
|
w 韵致 韻緻
|
|
14324
14385
|
w 页签 頁籤
|
|
@@ -14360,6 +14421,7 @@ w 骨坛 骨罈
|
|
|
14360
14421
|
w 骨子里 骨子裡
|
|
14361
14422
|
w 骨质疏松 骨質疏鬆
|
|
14362
14423
|
w 骨质疏松症 骨質疏鬆症
|
|
14424
|
+
w 骯脏气 骯臟氣
|
|
14363
14425
|
w 骰钟 骰鍾
|
|
14364
14426
|
w 高台 高台
|
|
14365
14427
|
w 高台县 高台縣
|
|
@@ -14374,6 +14436,7 @@ w 鸡蛋里挑骨头 雞蛋裡挑骨頭
|
|
|
14374
14436
|
w 鹊巢鸠占 鵲巢鳩占
|
|
14375
14437
|
w 麸皮面包 麩皮麵包
|
|
14376
14438
|
w 麻雀虽小,五脏俱全 麻雀雖小,五臟俱全
|
|
14439
|
+
w 黄历 黃曆
|
|
14377
14440
|
w 黄金周 黃金週
|
|
14378
14441
|
w 黄钟毁弃瓦釜雷鸣 黃鐘譭棄瓦釜雷鳴
|
|
14379
14442
|
w 黑嘴松鸡 黑嘴鬆雞
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scoring how a transcription capitalised, against how this library would.
|
|
3
|
+
*
|
|
4
|
+
* Aligned on the toneless spellings so that one dropped syllable is one
|
|
5
|
+
* mistake rather than every syllable after it.
|
|
6
|
+
*/
|
|
7
|
+
import { type AccuracyTally } from "./score.js";
|
|
8
|
+
/**
|
|
9
|
+
* Whether a syllable is written with a capital letter.
|
|
10
|
+
*
|
|
11
|
+
* Comparing the first character against its own lower case settles it without a
|
|
12
|
+
* special case for empty text, which reports as uncapitalised.
|
|
13
|
+
*/
|
|
14
|
+
export declare function isCapitalised(syllable: string): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Compare one conversion against its expected pinyin, adding to a tally.
|
|
17
|
+
*
|
|
18
|
+
* Readings and spacing are scored separately and deliberately: a wrong reading
|
|
19
|
+
* is an error, whereas wrong spacing is merely untidy, so they must not be
|
|
20
|
+
* averaged into a single number that hides which one moved.
|
|
21
|
+
*/
|
|
22
|
+
export declare function scoreCase(expectedText: string, actualText: string, tally?: AccuracyTally): AccuracyTally;
|
|
23
|
+
//# sourceMappingURL=score-case.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"score-case.d.ts","sourceRoot":"","sources":["../../src/accuracy/score-case.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,KAAK,aAAa,EAAc,MAAM,YAAY,CAAC;AAQ5D;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAGvD;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,CACvB,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,EAClB,KAAK,GAAE,aAA4B,GAClC,aAAa,CA6Cf"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scoring how a transcription capitalised, against how this library would.
|
|
3
|
+
*
|
|
4
|
+
* Aligned on the toneless spellings so that one dropped syllable is one
|
|
5
|
+
* mistake rather than every syllable after it.
|
|
6
|
+
*/
|
|
7
|
+
import { emptyTally } from "./score.js";
|
|
8
|
+
import { alignSequences } from "./align.js";
|
|
9
|
+
import { comparableSyllable, tokenisePinyin, tonelessSyllable, } from "./tokenise.js";
|
|
10
|
+
/**
|
|
11
|
+
* Whether a syllable is written with a capital letter.
|
|
12
|
+
*
|
|
13
|
+
* Comparing the first character against its own lower case settles it without a
|
|
14
|
+
* special case for empty text, which reports as uncapitalised.
|
|
15
|
+
*/
|
|
16
|
+
export function isCapitalised(syllable) {
|
|
17
|
+
const first = syllable.slice(0, 1);
|
|
18
|
+
return first !== first.toLowerCase();
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Compare one conversion against its expected pinyin, adding to a tally.
|
|
22
|
+
*
|
|
23
|
+
* Readings and spacing are scored separately and deliberately: a wrong reading
|
|
24
|
+
* is an error, whereas wrong spacing is merely untidy, so they must not be
|
|
25
|
+
* averaged into a single number that hides which one moved.
|
|
26
|
+
*/
|
|
27
|
+
export function scoreCase(expectedText, actualText, tally = emptyTally()) {
|
|
28
|
+
const expected = tokenisePinyin(expectedText);
|
|
29
|
+
const actual = tokenisePinyin(actualText);
|
|
30
|
+
tally.cases++;
|
|
31
|
+
if (expectedText.trim() === actualText.trim()) {
|
|
32
|
+
tally.exact++;
|
|
33
|
+
}
|
|
34
|
+
tally.expectedSyllables += expected.syllables.length;
|
|
35
|
+
tally.actualSyllables += actual.syllables.length;
|
|
36
|
+
tally.expectedBoundaries += expected.wordStarts.size;
|
|
37
|
+
tally.actualBoundaries += actual.wordStarts.size;
|
|
38
|
+
// Align on toneless readings so that a wrong tone costs a tone rather than
|
|
39
|
+
// knocking every later syllable out of step.
|
|
40
|
+
const pairs = alignSequences(expected.syllables.map((syllable) => tonelessSyllable(syllable)), actual.syllables.map((syllable) => tonelessSyllable(syllable)));
|
|
41
|
+
const actualToExpected = new Map();
|
|
42
|
+
for (const pair of pairs) {
|
|
43
|
+
actualToExpected.set(pair.actual, pair.expected);
|
|
44
|
+
const expectedSyllable = expected.syllables[pair.expected] ?? "";
|
|
45
|
+
const actualSyllable = actual.syllables[pair.actual] ?? "";
|
|
46
|
+
tally.bases++;
|
|
47
|
+
if (comparableSyllable(expectedSyllable) ===
|
|
48
|
+
comparableSyllable(actualSyllable)) {
|
|
49
|
+
tally.readings++;
|
|
50
|
+
}
|
|
51
|
+
if (isCapitalised(expectedSyllable) === isCapitalised(actualSyllable)) {
|
|
52
|
+
tally.capitals++;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
for (const start of actual.wordStarts) {
|
|
56
|
+
const mapped = actualToExpected.get(start);
|
|
57
|
+
if (mapped !== undefined && expected.wordStarts.has(mapped)) {
|
|
58
|
+
tally.boundaryHits++;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return tally;
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=score-case.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"score-case.js","sourceRoot":"","sources":["../../src/accuracy/score-case.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAsB,UAAU,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,gBAAgB,GACjB,MAAM,eAAe,CAAC;AAEvB;;;;;GAKG;AACH,MAAM,UAAU,aAAa,CAAC,QAAgB;IAC5C,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACnC,OAAO,KAAK,KAAK,KAAK,CAAC,WAAW,EAAE,CAAC;AACvC,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,SAAS,CACvB,YAAoB,EACpB,UAAkB,EAClB,KAAK,GAAkB,UAAU,EAAE;IAEnC,MAAM,QAAQ,GAAG,cAAc,CAAC,YAAY,CAAC,CAAC;IAC9C,MAAM,MAAM,GAAG,cAAc,CAAC,UAAU,CAAC,CAAC;IAE1C,KAAK,CAAC,KAAK,EAAE,CAAC;IACd,IAAI,YAAY,CAAC,IAAI,EAAE,KAAK,UAAU,CAAC,IAAI,EAAE,EAAE,CAAC;QAC9C,KAAK,CAAC,KAAK,EAAE,CAAC;IAChB,CAAC;IACD,KAAK,CAAC,iBAAiB,IAAI,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC;IACrD,KAAK,CAAC,eAAe,IAAI,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC;IACjD,KAAK,CAAC,kBAAkB,IAAI,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC;IACrD,KAAK,CAAC,gBAAgB,IAAI,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC;IAEjD,2EAA2E;IAC3E,6CAA6C;IAC7C,MAAM,KAAK,GAAG,cAAc,CAC1B,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC,EAChE,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC,CAC/D,CAAC;IAEF,MAAM,gBAAgB,GAAG,IAAI,GAAG,EAAkB,CAAC;IACnD,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,gBAAgB,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;QACjD,MAAM,gBAAgB,GAAG,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;QACjE,MAAM,cAAc,GAAG,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;QAC3D,KAAK,CAAC,KAAK,EAAE,CAAC;QACd,IACE,kBAAkB,CAAC,gBAAgB,CAAC;YACpC,kBAAkB,CAAC,cAAc,CAAC,EAClC,CAAC;YACD,KAAK,CAAC,QAAQ,EAAE,CAAC;QACnB,CAAC;QACD,IAAI,aAAa,CAAC,gBAAgB,CAAC,KAAK,aAAa,CAAC,cAAc,CAAC,EAAE,CAAC;YACtE,KAAK,CAAC,QAAQ,EAAE,CAAC;QACnB,CAAC;IACH,CAAC;IAED,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;QACtC,MAAM,MAAM,GAAG,gBAAgB,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAC3C,IAAI,MAAM,KAAK,SAAS,IAAI,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;YAC5D,KAAK,CAAC,YAAY,EAAE,CAAC;QACvB,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
|
package/dist/accuracy/score.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { scoreCase } from "./score-case.js";
|
|
1
2
|
/**
|
|
2
3
|
* Raw tallies from comparing conversions against their expected pinyin.
|
|
3
4
|
*
|
|
@@ -24,14 +25,6 @@ export interface AccuracyTally {
|
|
|
24
25
|
* An empty tally, ready to accumulate into.
|
|
25
26
|
*/
|
|
26
27
|
export declare function emptyTally(): AccuracyTally;
|
|
27
|
-
/**
|
|
28
|
-
* Compare one conversion against its expected pinyin, adding to a tally.
|
|
29
|
-
*
|
|
30
|
-
* Readings and spacing are scored separately and deliberately: a wrong reading
|
|
31
|
-
* is an error, whereas wrong spacing is merely untidy, so they must not be
|
|
32
|
-
* averaged into a single number that hides which one moved.
|
|
33
|
-
*/
|
|
34
|
-
export declare function scoreCase(expectedText: string, actualText: string, tally?: AccuracyTally): AccuracyTally;
|
|
35
28
|
/**
|
|
36
29
|
* Accuracy percentages derived from a tally.
|
|
37
30
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"score.d.ts","sourceRoot":"","sources":["../../src/accuracy/score.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"score.d.ts","sourceRoot":"","sources":["../../src/accuracy/score.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,iBAAiB,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,MAAM,CAAC;IACxB,+DAA+D;IAC/D,KAAK,EAAE,MAAM,CAAC;IACd,uDAAuD;IACvD,QAAQ,EAAE,MAAM,CAAC;IACjB,0DAA0D;IAC1D,QAAQ,EAAE,MAAM,CAAC;IACjB,wEAAwE;IACxE,YAAY,EAAE,MAAM,CAAC;IACrB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED;;GAEG;AACH,wBAAgB,UAAU,IAAI,aAAa,CAa1C;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,0EAA0E;IAC1E,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,gDAAgD;IAChD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,uDAAuD;IACvD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,0EAA0E;IAC1E,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,0DAA0D;IAC1D,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,+BAA+B;IAC/B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AASD;;GAEG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,aAAa,GAAG,cAAc,CAkB3D"}
|
package/dist/accuracy/score.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { comparableSyllable, tokenisePinyin, tonelessSyllable, } from "./tokenise.js";
|
|
1
|
+
export { scoreCase } from "./score-case.js";
|
|
3
2
|
/**
|
|
4
3
|
* An empty tally, ready to accumulate into.
|
|
5
4
|
*/
|
|
@@ -17,59 +16,6 @@ export function emptyTally() {
|
|
|
17
16
|
actualBoundaries: 0,
|
|
18
17
|
};
|
|
19
18
|
}
|
|
20
|
-
/**
|
|
21
|
-
* Whether a syllable is written with a capital letter.
|
|
22
|
-
*
|
|
23
|
-
* Comparing the first character against its own lower case settles it without a
|
|
24
|
-
* special case for empty text, which reports as uncapitalised.
|
|
25
|
-
*/
|
|
26
|
-
function isCapitalised(syllable) {
|
|
27
|
-
const first = syllable.slice(0, 1);
|
|
28
|
-
return first !== first.toLowerCase();
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Compare one conversion against its expected pinyin, adding to a tally.
|
|
32
|
-
*
|
|
33
|
-
* Readings and spacing are scored separately and deliberately: a wrong reading
|
|
34
|
-
* is an error, whereas wrong spacing is merely untidy, so they must not be
|
|
35
|
-
* averaged into a single number that hides which one moved.
|
|
36
|
-
*/
|
|
37
|
-
export function scoreCase(expectedText, actualText, tally = emptyTally()) {
|
|
38
|
-
const expected = tokenisePinyin(expectedText);
|
|
39
|
-
const actual = tokenisePinyin(actualText);
|
|
40
|
-
tally.cases++;
|
|
41
|
-
if (expectedText.trim() === actualText.trim()) {
|
|
42
|
-
tally.exact++;
|
|
43
|
-
}
|
|
44
|
-
tally.expectedSyllables += expected.syllables.length;
|
|
45
|
-
tally.actualSyllables += actual.syllables.length;
|
|
46
|
-
tally.expectedBoundaries += expected.wordStarts.size;
|
|
47
|
-
tally.actualBoundaries += actual.wordStarts.size;
|
|
48
|
-
// Align on toneless readings so that a wrong tone costs a tone rather than
|
|
49
|
-
// knocking every later syllable out of step.
|
|
50
|
-
const pairs = alignSequences(expected.syllables.map((syllable) => tonelessSyllable(syllable)), actual.syllables.map((syllable) => tonelessSyllable(syllable)));
|
|
51
|
-
const actualToExpected = new Map();
|
|
52
|
-
for (const pair of pairs) {
|
|
53
|
-
actualToExpected.set(pair.actual, pair.expected);
|
|
54
|
-
const expectedSyllable = expected.syllables[pair.expected] ?? "";
|
|
55
|
-
const actualSyllable = actual.syllables[pair.actual] ?? "";
|
|
56
|
-
tally.bases++;
|
|
57
|
-
if (comparableSyllable(expectedSyllable) ===
|
|
58
|
-
comparableSyllable(actualSyllable)) {
|
|
59
|
-
tally.readings++;
|
|
60
|
-
}
|
|
61
|
-
if (isCapitalised(expectedSyllable) === isCapitalised(actualSyllable)) {
|
|
62
|
-
tally.capitals++;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
for (const start of actual.wordStarts) {
|
|
66
|
-
const mapped = actualToExpected.get(start);
|
|
67
|
-
if (mapped !== undefined && expected.wordStarts.has(mapped)) {
|
|
68
|
-
tally.boundaryHits++;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
return tally;
|
|
72
|
-
}
|
|
73
19
|
/**
|
|
74
20
|
* Turn counts into percentages, guarding against division by zero.
|
|
75
21
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"score.js","sourceRoot":"","sources":["../../src/accuracy/score.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"score.js","sourceRoot":"","sources":["../../src/accuracy/score.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAwB5C;;GAEG;AACH,MAAM,UAAU,UAAU;IACxB,OAAO;QACL,KAAK,EAAE,CAAC;QACR,KAAK,EAAE,CAAC;QACR,iBAAiB,EAAE,CAAC;QACpB,eAAe,EAAE,CAAC;QAClB,KAAK,EAAE,CAAC;QACR,QAAQ,EAAE,CAAC;QACX,QAAQ,EAAE,CAAC;QACX,YAAY,EAAE,CAAC;QACf,kBAAkB,EAAE,CAAC;QACrB,gBAAgB,EAAE,CAAC;KACpB,CAAC;AACJ,CAAC;AAoBD;;GAEG;AACH,SAAS,KAAK,CAAC,SAAiB,EAAE,WAAmB;IACnD,OAAO,WAAW,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,SAAS,CAAC,GAAG,WAAW,CAAC;AACjE,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,MAAM,CAAC,KAAoB;IACzC,MAAM,SAAS,GAAG,KAAK,CAAC,KAAK,CAAC,YAAY,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAC;IACpE,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,YAAY,EAAE,KAAK,CAAC,kBAAkB,CAAC,CAAC;IACnE,MAAM,KAAK,GAAG,SAAS,GAAG,MAAM,CAAC;IAEjC,8EAA8E;IAC9E,2EAA2E;IAC3E,0DAA0D;IAC1D,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,iBAAiB,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC;IAE3E,OAAO;QACL,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC;QACtC,QAAQ,EAAE,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,SAAS,CAAC;QAC1C,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,SAAS,CAAC;QACpC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,KAAK,CAAC;QACzC,QAAQ,EAAE,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,SAAS,CAAC;QAC1C,OAAO,EAAE,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,GAAG,MAAM,CAAC,GAAG,KAAK;KAC5D,CAAC;AACJ,CAAC"}
|