@kensio/pinyinjs 1.7.8 → 1.7.10

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.
Files changed (97) hide show
  1. package/README.md +18 -2
  2. package/data/core.entries +2259 -2259
  3. package/data/core.freq +0 -0
  4. package/data/full.counts +0 -0
  5. package/data/full.entries +2289 -2289
  6. package/data/full.freq +0 -0
  7. package/data/manifest.json +8 -8
  8. package/data/standard.entries +2257 -2257
  9. package/data/standard.freq +0 -0
  10. package/dist/cli/flag-lists.d.ts +2 -1
  11. package/dist/cli/flag-lists.d.ts.map +1 -1
  12. package/dist/cli/flag-lists.js.map +1 -1
  13. package/dist/cli/format-options.d.ts +5 -1
  14. package/dist/cli/format-options.d.ts.map +1 -1
  15. package/dist/cli/format-options.js +9 -2
  16. package/dist/cli/format-options.js.map +1 -1
  17. package/dist/cli/html-commands.d.ts.map +1 -1
  18. package/dist/cli/html-commands.js +15 -3
  19. package/dist/cli/html-commands.js.map +1 -1
  20. package/dist/cli/systems.d.ts +15 -43
  21. package/dist/cli/systems.d.ts.map +1 -1
  22. package/dist/cli/systems.js +9 -12
  23. package/dist/cli/systems.js.map +1 -1
  24. package/dist/decode/guo-rule.d.ts +64 -0
  25. package/dist/decode/guo-rule.d.ts.map +1 -0
  26. package/dist/decode/guo-rule.js +138 -0
  27. package/dist/decode/guo-rule.js.map +1 -0
  28. package/dist/decode/reading-rules.d.ts +1 -0
  29. package/dist/decode/reading-rules.d.ts.map +1 -1
  30. package/dist/decode/reading-rules.js +3 -0
  31. package/dist/decode/reading-rules.js.map +1 -1
  32. package/dist/dictionary/artifact.js +2 -2
  33. package/dist/dictionary/artifact.js.map +1 -1
  34. package/dist/dictionary/frequency-table.d.ts +103 -0
  35. package/dist/dictionary/frequency-table.d.ts.map +1 -1
  36. package/dist/dictionary/frequency-table.js +96 -8
  37. package/dist/dictionary/frequency-table.js.map +1 -1
  38. package/dist/dictionary/merge-types.d.ts +12 -0
  39. package/dist/dictionary/merge-types.d.ts.map +1 -1
  40. package/dist/dictionary/merge-types.js.map +1 -1
  41. package/dist/dictionary/merge-word.d.ts.map +1 -1
  42. package/dist/dictionary/merge-word.js +2 -2
  43. package/dist/dictionary/merge-word.js.map +1 -1
  44. package/dist/dictionary/merge.d.ts.map +1 -1
  45. package/dist/dictionary/merge.js +11 -1
  46. package/dist/dictionary/merge.js.map +1 -1
  47. package/dist/dictionary/name-mass.d.ts +42 -0
  48. package/dist/dictionary/name-mass.d.ts.map +1 -0
  49. package/dist/dictionary/name-mass.js +66 -0
  50. package/dist/dictionary/name-mass.js.map +1 -0
  51. package/dist/dictionary/proper-noun.d.ts +8 -1
  52. package/dist/dictionary/proper-noun.d.ts.map +1 -1
  53. package/dist/dictionary/proper-noun.js +13 -3
  54. package/dist/dictionary/proper-noun.js.map +1 -1
  55. package/dist/dictionary/script-pairings.d.ts +12 -0
  56. package/dist/dictionary/script-pairings.d.ts.map +1 -1
  57. package/dist/dictionary/script-pairings.js +20 -0
  58. package/dist/dictionary/script-pairings.js.map +1 -1
  59. package/dist/dictionary/traditional-carry.d.ts +23 -0
  60. package/dist/dictionary/traditional-carry.d.ts.map +1 -0
  61. package/dist/dictionary/traditional-carry.js +201 -0
  62. package/dist/dictionary/traditional-carry.js.map +1 -0
  63. package/dist/format/annotate.d.ts.map +1 -1
  64. package/dist/format/annotate.js +3 -3
  65. package/dist/format/annotate.js.map +1 -1
  66. package/dist/format/html.d.ts +41 -6
  67. package/dist/format/html.d.ts.map +1 -1
  68. package/dist/format/html.js +34 -83
  69. package/dist/format/html.js.map +1 -1
  70. package/dist/format/language-tag.d.ts +57 -0
  71. package/dist/format/language-tag.d.ts.map +1 -0
  72. package/dist/format/language-tag.js +76 -0
  73. package/dist/format/language-tag.js.map +1 -0
  74. package/dist/format/syllable-span.d.ts +10 -0
  75. package/dist/format/syllable-span.d.ts.map +1 -0
  76. package/dist/format/syllable-span.js +87 -0
  77. package/dist/format/syllable-span.js.map +1 -0
  78. package/dist/format/transcribed.d.ts +36 -0
  79. package/dist/format/transcribed.d.ts.map +1 -0
  80. package/dist/format/transcribed.js +38 -0
  81. package/dist/format/transcribed.js.map +1 -0
  82. package/dist/format/transcription.d.ts.map +1 -1
  83. package/dist/format/transcription.js +7 -19
  84. package/dist/format/transcription.js.map +1 -1
  85. package/dist/index.d.ts +3 -1
  86. package/dist/index.d.ts.map +1 -1
  87. package/dist/index.js +2 -1
  88. package/dist/index.js.map +1 -1
  89. package/dist/transcription/systems.d.ts +82 -0
  90. package/dist/transcription/systems.d.ts.map +1 -0
  91. package/dist/transcription/systems.js +64 -0
  92. package/dist/transcription/systems.js.map +1 -0
  93. package/package.json +2 -2
  94. package/dist/cli/system-table.d.ts +0 -12
  95. package/dist/cli/system-table.d.ts.map +0 -1
  96. package/dist/cli/system-table.js +0 -48
  97. package/dist/cli/system-table.js.map +0 -1
@@ -0,0 +1,57 @@
1
+ /**
2
+ * What a written reading declares itself to be, in BCP 47.
3
+ *
4
+ * One place that knows the subtags and the order they go in, since the tag is
5
+ * the same question whether the reading is pinyin or one of the five systems
6
+ * that can stand in for it.
7
+ */
8
+ import { type Locale } from "../script/script.js";
9
+ import type { TranscriptionSystem } from "../transcription/systems.js";
10
+ /**
11
+ * The BCP 47 region subtag for a reading standard.
12
+ */
13
+ export declare function regionOf(locale: Locale): string;
14
+ /**
15
+ * What a syllable declares itself to be, in the system it was written in.
16
+ *
17
+ * A syllable element holds Mandarin written in some script that is not the `zh`
18
+ * of the surrounding page and not the `en` of a page that quotes it, and
19
+ * nothing about `yín` on its own says so. The tag is what a screen reader
20
+ * consults before deciding how to pronounce it, and what a browser consults for
21
+ * hyphenation and font selection. Without one, `xíng` is read as whatever the
22
+ * page around it claims to be, which is how pinyin ends up spoken as English.
23
+ *
24
+ * The subtags are registered and mean exactly this. The script is `Latn` for a
25
+ * romanisation and `Bopo` for bopomofo, the region is the reading standard, and
26
+ * the variant names the system where the IANA registry has one. It has `pinyin`
27
+ * and `wadegile`, both with the prefix `zh-Latn`, and `fonipa` for the IPA.
28
+ *
29
+ * | System | `zh-CN` | `zh-TW` |
30
+ * | --- | --- | --- |
31
+ * | pinyin | `zh-Latn-CN-pinyin` | `zh-Latn-TW-pinyin` |
32
+ * | bopomofo | `zh-Bopo-CN` | `zh-Bopo-TW` |
33
+ * | Wade-Giles | `zh-Latn-CN-wadegile` | `zh-Latn-TW-wadegile` |
34
+ * | Yale | `zh-Latn-CN` | `zh-Latn-TW` |
35
+ * | Gwoyeu Romatzyh | `zh-Latn-CN` | `zh-Latn-TW` |
36
+ * | IPA | `zh-Latn-CN-fonipa` | `zh-Latn-TW-fonipa` |
37
+ *
38
+ * **The region is carried by every one of them**, because the distinction it
39
+ * marks is in the reading rather than in the spelling. 垃圾 is `lājī` under
40
+ * `zh-CN` and `lèsè` under `zh-TW`, and it is two different words in bopomofo
41
+ * for the same reason, so the region is read off {@link ConvertOptions.locale}
42
+ * rather than guessed at.
43
+ *
44
+ * Yale and Gwoyeu Romatzyh name themselves nowhere, the registry having no
45
+ * variant for either, so both go out saying only that they are Mandarin in the
46
+ * Latin alphabet. See {@link TranscriptionSystem.variant}.
47
+ *
48
+ * Tone notation does not enter into it. `hang2` is pinyin spelt with a tone
49
+ * number, not another romanisation, so it takes the same tag as `háng`.
50
+ *
51
+ * The cost is the tag repeated on every syllable, which is the price of
52
+ * wrapping nothing around the whole conversion. A caller who would rather
53
+ * declare it once can set `lang: false` and put the same tag on a wrapper of
54
+ * their own, which is inherited by everything inside it.
55
+ */
56
+ export declare function languageTag(locale?: Locale, system?: TranscriptionSystem): string;
57
+ //# sourceMappingURL=language-tag.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"language-tag.d.ts","sourceRoot":"","sources":["../../src/format/language-tag.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAkB,KAAK,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AASvE;;GAEG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAS/C;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,wBAAgB,WAAW,CACzB,MAAM,GAAE,MAAuB,EAC/B,MAAM,CAAC,EAAE,mBAAmB,GAC3B,MAAM,CAKR"}
@@ -0,0 +1,76 @@
1
+ /**
2
+ * What a written reading declares itself to be, in BCP 47.
3
+ *
4
+ * One place that knows the subtags and the order they go in, since the tag is
5
+ * the same question whether the reading is pinyin or one of the five systems
6
+ * that can stand in for it.
7
+ */
8
+ import { DEFAULT_LOCALE } from "../script/script.js";
9
+ /**
10
+ * The pinyin variant's script and its own subtag, which a conversion writes by
11
+ * default.
12
+ */
13
+ const PINYIN_SCRIPT = "Latn";
14
+ const PINYIN_VARIANT = "pinyin";
15
+ /**
16
+ * The BCP 47 region subtag for a reading standard.
17
+ */
18
+ export function regionOf(locale) {
19
+ switch (locale) {
20
+ case "zh-CN": {
21
+ return "CN";
22
+ }
23
+ case "zh-TW": {
24
+ return "TW";
25
+ }
26
+ }
27
+ }
28
+ /**
29
+ * What a syllable declares itself to be, in the system it was written in.
30
+ *
31
+ * A syllable element holds Mandarin written in some script that is not the `zh`
32
+ * of the surrounding page and not the `en` of a page that quotes it, and
33
+ * nothing about `yín` on its own says so. The tag is what a screen reader
34
+ * consults before deciding how to pronounce it, and what a browser consults for
35
+ * hyphenation and font selection. Without one, `xíng` is read as whatever the
36
+ * page around it claims to be, which is how pinyin ends up spoken as English.
37
+ *
38
+ * The subtags are registered and mean exactly this. The script is `Latn` for a
39
+ * romanisation and `Bopo` for bopomofo, the region is the reading standard, and
40
+ * the variant names the system where the IANA registry has one. It has `pinyin`
41
+ * and `wadegile`, both with the prefix `zh-Latn`, and `fonipa` for the IPA.
42
+ *
43
+ * | System | `zh-CN` | `zh-TW` |
44
+ * | --- | --- | --- |
45
+ * | pinyin | `zh-Latn-CN-pinyin` | `zh-Latn-TW-pinyin` |
46
+ * | bopomofo | `zh-Bopo-CN` | `zh-Bopo-TW` |
47
+ * | Wade-Giles | `zh-Latn-CN-wadegile` | `zh-Latn-TW-wadegile` |
48
+ * | Yale | `zh-Latn-CN` | `zh-Latn-TW` |
49
+ * | Gwoyeu Romatzyh | `zh-Latn-CN` | `zh-Latn-TW` |
50
+ * | IPA | `zh-Latn-CN-fonipa` | `zh-Latn-TW-fonipa` |
51
+ *
52
+ * **The region is carried by every one of them**, because the distinction it
53
+ * marks is in the reading rather than in the spelling. 垃圾 is `lājī` under
54
+ * `zh-CN` and `lèsè` under `zh-TW`, and it is two different words in bopomofo
55
+ * for the same reason, so the region is read off {@link ConvertOptions.locale}
56
+ * rather than guessed at.
57
+ *
58
+ * Yale and Gwoyeu Romatzyh name themselves nowhere, the registry having no
59
+ * variant for either, so both go out saying only that they are Mandarin in the
60
+ * Latin alphabet. See {@link TranscriptionSystem.variant}.
61
+ *
62
+ * Tone notation does not enter into it. `hang2` is pinyin spelt with a tone
63
+ * number, not another romanisation, so it takes the same tag as `háng`.
64
+ *
65
+ * The cost is the tag repeated on every syllable, which is the price of
66
+ * wrapping nothing around the whole conversion. A caller who would rather
67
+ * declare it once can set `lang: false` and put the same tag on a wrapper of
68
+ * their own, which is inherited by everything inside it.
69
+ */
70
+ export function languageTag(locale = DEFAULT_LOCALE, system) {
71
+ const script = system?.script ?? PINYIN_SCRIPT;
72
+ const variant = system === undefined ? PINYIN_VARIANT : system.variant;
73
+ const tag = `zh-${script}-${regionOf(locale)}`;
74
+ return variant === undefined ? tag : `${tag}-${variant}`;
75
+ }
76
+ //# sourceMappingURL=language-tag.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"language-tag.js","sourceRoot":"","sources":["../../src/format/language-tag.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,cAAc,EAAe,MAAM,qBAAqB,CAAC;AAGlE;;;GAGG;AACH,MAAM,aAAa,GAAG,MAAM,CAAC;AAC7B,MAAM,cAAc,GAAG,QAAQ,CAAC;AAEhC;;GAEG;AACH,MAAM,UAAU,QAAQ,CAAC,MAAc;IACrC,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,OAAO,EAAE,CAAC;YACb,OAAO,IAAI,CAAC;QACd,CAAC;QACD,KAAK,OAAO,EAAE,CAAC;YACb,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;AACH,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,MAAM,UAAU,WAAW,CACzB,MAAM,GAAW,cAAc,EAC/B,MAA4B;IAE5B,MAAM,MAAM,GAAG,MAAM,EAAE,MAAM,IAAI,aAAa,CAAC;IAC/C,MAAM,OAAO,GAAG,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC;IACvE,MAAM,GAAG,GAAG,MAAM,MAAM,IAAI,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;IAC/C,OAAO,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,IAAI,OAAO,EAAE,CAAC;AAC3D,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { ConvertedPiece } from "../decode/convert.js";
2
+ import { type HtmlOptions } from "./html.js";
3
+ /**
4
+ * Mark up one piece of a conversion.
5
+ *
6
+ * A piece that is pinyin's own mark writes nothing where a transcription is
7
+ * asked for, since {@link writePieces} puts the system's own join in its place.
8
+ */
9
+ export declare function writePiece(piece: ConvertedPiece, options: HtmlOptions): string;
10
+ //# sourceMappingURL=syllable-span.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"syllable-span.d.ts","sourceRoot":"","sources":["../../src/format/syllable-span.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAG3D,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC;AAuDrD;;;;;GAKG;AACH,wBAAgB,UAAU,CACxB,KAAK,EAAE,cAAc,EACrB,OAAO,EAAE,WAAW,GACnB,MAAM,CAiCR"}
@@ -0,0 +1,87 @@
1
+ /**
2
+ * One syllable of a conversion, as the element that carries it.
3
+ *
4
+ * The classes, the language tag and the attribute naming what the decode
5
+ * rejected all hang off a single syllable, so they are decided in one place and
6
+ * `html.ts` is left with the run.
7
+ */
8
+ import { isUncertain } from "../decode/confidence.js";
9
+ import { READING_CHARGE } from "../decode/lattice.js";
10
+ import { writeSyllable } from "../syllable/syllable.js";
11
+ import { escape } from "./html.js";
12
+ import { languageTag } from "./language-tag.js";
13
+ import { capitalised, isCapitalised, isPinyinMark } from "./transcribed.js";
14
+ /**
15
+ * The class every syllable carries, whatever else it carries.
16
+ */
17
+ const SYLLABLE_CLASS = "py-syllable";
18
+ const UNCERTAIN_CLASS = "py-uncertain";
19
+ /**
20
+ * The readings a syllable was chosen over, as the reader would write them.
21
+ *
22
+ * Only the ones that made it uncertain: a rival dearer than
23
+ * {@link READING_CHARGE} could only be taken by breaking a dictionary word
24
+ * apart, so it was never really in the running and listing it would suggest
25
+ * otherwise.
26
+ */
27
+ function alternativesOf(confidence, options) {
28
+ const written = confidence.alternatives
29
+ .filter((alternative) => alternative.cost < READING_CHARGE)
30
+ .map((alternative) => alternative.reading
31
+ .map((syllable) => writeSyllable(syllable, options.notation))
32
+ .join(""));
33
+ return [...new Set(written)];
34
+ }
35
+ /**
36
+ * How one syllable is written, in pinyin or in the system that replaces it.
37
+ *
38
+ * The capital comes from the pinyin the conversion settled rather than from the
39
+ * syllable, for the reason {@link isCapitalised} gives, and only the systems
40
+ * that write capitals at all take it.
41
+ */
42
+ function readingOf(piece, syllable, options) {
43
+ const { transcription } = options;
44
+ if (transcription === undefined) {
45
+ return piece.text;
46
+ }
47
+ const written = transcription.write(syllable, options.notation !== "none");
48
+ return transcription.capitals && isCapitalised(piece.text)
49
+ ? capitalised(written)
50
+ : written;
51
+ }
52
+ /**
53
+ * Mark up one piece of a conversion.
54
+ *
55
+ * A piece that is pinyin's own mark writes nothing where a transcription is
56
+ * asked for, since {@link writePieces} puts the system's own join in its place.
57
+ */
58
+ export function writePiece(piece, options) {
59
+ const { toneClasses = true, markUncertain = true, lang = true } = options;
60
+ if (piece.syllable === undefined) {
61
+ return options.transcription !== undefined && isPinyinMark(piece)
62
+ ? ""
63
+ : escape(piece.text);
64
+ }
65
+ const classes = [SYLLABLE_CLASS];
66
+ if (toneClasses && piece.syllable.tone !== undefined) {
67
+ classes.push(`py-tone-${String(piece.syllable.tone)}`);
68
+ }
69
+ const alternatives = markUncertain &&
70
+ piece.confidence !== undefined &&
71
+ isUncertain(piece.confidence)
72
+ ? alternativesOf(piece.confidence, options)
73
+ : [];
74
+ if (alternatives.length > 0) {
75
+ classes.push(UNCERTAIN_CLASS);
76
+ }
77
+ const attributes = [`class="${classes.join(" ")}"`];
78
+ if (lang) {
79
+ attributes.push(`lang="${languageTag(options.locale, options.transcription)}"`);
80
+ }
81
+ if (alternatives.length > 0) {
82
+ attributes.push(`data-alternatives="${escape(alternatives.join(" "))}"`);
83
+ }
84
+ const reading = readingOf(piece, piece.syllable, options);
85
+ return `<span ${attributes.join(" ")}>${escape(reading)}</span>`;
86
+ }
87
+ //# sourceMappingURL=syllable-span.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"syllable-span.js","sourceRoot":"","sources":["../../src/format/syllable-span.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,WAAW,EAA0B,MAAM,yBAAyB,CAAC;AAE9E,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAiB,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAE,MAAM,EAAoB,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,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CAAC,CAAC;IAC3E,CAAC;IACD,MAAM,OAAO,GAAG,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC1D,OAAO,SAAS,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC;AACnE,CAAC"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * What the two transcription paths agree about.
3
+ *
4
+ * `toTranscription` writes a string and `toHtml` writes markup, and both have
5
+ * to put the capitals back and both have to decide what becomes of pinyin's own
6
+ * orthography. Keeping the answers here is what stops the two from drifting.
7
+ */
8
+ import type { ConvertedPiece } from "../decode/convert.js";
9
+ /**
10
+ * Whether a piece was written with a capital.
11
+ *
12
+ * Read off the text the conversion produced rather than recomputed, because
13
+ * capitalisation is settled by `convertPieces` against the whole sentence (a
14
+ * proper noun, or the first word after a full stop) and none of that survives
15
+ * in a bare syllable.
16
+ */
17
+ export declare function isCapitalised(text: string): boolean;
18
+ /**
19
+ * Put a capital back on a transcribed word.
20
+ */
21
+ export declare function capitalised(text: string): string;
22
+ /**
23
+ * Whether a piece is a mark pinyin writes and another system does not.
24
+ *
25
+ * The hyphen of `gāngān-jìngjìng` is the whole of it. GB/T 16159 puts it inside
26
+ * one orthographic word, and every other system joins the syllables of a word
27
+ * its own way. Wade-Giles hyphenates all of them, bopomofo spaces them, Yale
28
+ * and Gwoyeu Romatzyh and the IPA run them together, so carrying pinyin's mark
29
+ * across writes `ㄍㄢ ㄍㄢ-ㄐㄧㄥˋ ㄐㄧㄥˋ`, a hyphen in a script that has none.
30
+ *
31
+ * A piece naming no source is pinyin's own, which is the distinction
32
+ * `sourcePiece` exists to draw. The space between two words is pinyin's too and
33
+ * is kept, since every system puts one there.
34
+ */
35
+ export declare function isPinyinMark(piece: ConvertedPiece): boolean;
36
+ //# sourceMappingURL=transcribed.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transcribed.d.ts","sourceRoot":"","sources":["../../src/format/transcribed.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAGnD;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAGhD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,cAAc,GAAG,OAAO,CAM3D"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Whether a piece was written with a capital.
3
+ *
4
+ * Read off the text the conversion produced rather than recomputed, because
5
+ * capitalisation is settled by `convertPieces` against the whole sentence (a
6
+ * proper noun, or the first word after a full stop) and none of that survives
7
+ * in a bare syllable.
8
+ */
9
+ export function isCapitalised(text) {
10
+ const first = /\p{L}/u.exec(text)?.[0];
11
+ return first !== undefined && first !== first.toLowerCase();
12
+ }
13
+ /**
14
+ * Put a capital back on a transcribed word.
15
+ */
16
+ export function capitalised(text) {
17
+ // Not global: only the first letter of the word takes the capital.
18
+ return text.replace(/\p{L}/u, (letter) => letter.toUpperCase());
19
+ }
20
+ /**
21
+ * Whether a piece is a mark pinyin writes and another system does not.
22
+ *
23
+ * The hyphen of `gāngān-jìngjìng` is the whole of it. GB/T 16159 puts it inside
24
+ * one orthographic word, and every other system joins the syllables of a word
25
+ * its own way. Wade-Giles hyphenates all of them, bopomofo spaces them, Yale
26
+ * and Gwoyeu Romatzyh and the IPA run them together, so carrying pinyin's mark
27
+ * across writes `ㄍㄢ ㄍㄢ-ㄐㄧㄥˋ ㄐㄧㄥˋ`, a hyphen in a script that has none.
28
+ *
29
+ * A piece naming no source is pinyin's own, which is the distinction
30
+ * `sourcePiece` exists to draw. The space between two words is pinyin's too and
31
+ * is kept, since every system puts one there.
32
+ */
33
+ export function isPinyinMark(piece) {
34
+ return (piece.syllable === undefined &&
35
+ piece.source === undefined &&
36
+ piece.text.trim() !== "");
37
+ }
38
+ //# sourceMappingURL=transcribed.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transcribed.js","sourceRoot":"","sources":["../../src/format/transcribed.ts"],"names":[],"mappings":"AASA;;;;;;;GAOG;AACH,MAAM,UAAU,aAAa,CAAC,IAAY;IACxC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACvC,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,KAAK,CAAC,WAAW,EAAE,CAAC;AAC9D,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,IAAY;IACtC,mEAAmE;IACnE,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC;AAClE,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,YAAY,CAAC,KAAqB;IAChD,OAAO,CACL,KAAK,CAAC,QAAQ,KAAK,SAAS;QAC5B,KAAK,CAAC,MAAM,KAAK,SAAS;QAC1B,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,CACzB,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"transcription.d.ts","sourceRoot":"","sources":["../../src/format/transcription.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,cAAc,EAEpB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAE9D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD;;;;;;;;GAQG;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,SAAS,EAAE,SAAS,QAAQ,EAAE,KAAK,MAAM,CAAC;AAEnE;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;CAC7B;AAuBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,SAAS,cAAc,EAAE,EACjC,SAAS,EAAE,SAAS,EACpB,OAAO,GAAE,oBAAyB,GACjC,MAAM,CA6BR;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,UAAU,EACtB,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,cAAmB,GAC3B,MAAM,CASR"}
1
+ {"version":3,"file":"transcription.d.ts","sourceRoot":"","sources":["../../src/format/transcription.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,cAAc,EAEpB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAE9D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAGxD;;;;;;;;GAQG;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,SAAS,EAAE,SAAS,QAAQ,EAAE,KAAK,MAAM,CAAC;AAEnE;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,SAAS,cAAc,EAAE,EACjC,SAAS,EAAE,SAAS,EACpB,OAAO,GAAE,oBAAyB,GACjC,MAAM,CAmCR;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,UAAU,EACtB,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,cAAmB,GAC3B,MAAM,CASR"}
@@ -1,24 +1,6 @@
1
1
  import { convertPieces, } from "../decode/convert.js";
2
2
  import { writeWadeGilesWord } from "../transcription/wade-giles.js";
3
- /**
4
- * Whether a piece was written with a capital.
5
- *
6
- * Read off the text the conversion produced rather than recomputed, because
7
- * capitalisation is settled by {@link convertPieces} against the whole sentence
8
- * — a proper noun, or the first word after a full stop — and none of that
9
- * survives in a bare {@link Syllable}.
10
- */
11
- function isCapitalised(text) {
12
- const first = /\p{L}/u.exec(text)?.[0];
13
- return first !== undefined && first !== first.toLowerCase();
14
- }
15
- /**
16
- * Put a capital back on a transcribed word.
17
- */
18
- function capitalised(text) {
19
- // Not global: only the first letter of the word takes the capital.
20
- return text.replace(/\p{L}/u, (letter) => letter.toUpperCase());
21
- }
3
+ import { capitalised, isCapitalised, isPinyinMark } from "./transcribed.js";
22
4
  /**
23
5
  * Write a conversion in another transcription system, word by word.
24
6
  *
@@ -64,6 +46,12 @@ export function toTranscription(pieces, writeWord, options = {}) {
64
46
  };
65
47
  for (const piece of pieces) {
66
48
  if (piece.syllable === undefined) {
49
+ // A mark pinyin writes and this system does not is dropped rather than
50
+ // ending the word, so the system's own join covers it. See
51
+ // {@link isPinyinMark}.
52
+ if (isPinyinMark(piece)) {
53
+ continue;
54
+ }
67
55
  flush();
68
56
  written.push(piece.text);
69
57
  continue;
@@ -1 +1 @@
1
- {"version":3,"file":"transcription.js","sourceRoot":"","sources":["../../src/format/transcription.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,aAAa,GACd,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAiCpE;;;;;;;GAOG;AACH,SAAS,aAAa,CAAC,IAAY;IACjC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACvC,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,KAAK,CAAC,WAAW,EAAE,CAAC;AAC9D,CAAC;AAED;;GAEG;AACH,SAAS,WAAW,CAAC,IAAY;IA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AC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;QAC9D,IAAI,GAAG,EAAE,CAAC;QACV,UAAU,GAAG,KAAK,CAAC;IACrB,CAAC,CAAC;IAEF,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,IAAI,KAAK,CAAC,QAAQ,KAAK,SAAS,EAAE,CAAC;YACjC,uEAAuE;YACvE,2DAA2D;YAC3D,wBAAwB;YACxB,IAAI,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC;gBACxB,SAAS;YACX,CAAC;YACD,KAAK,EAAE,CAAC;YACR,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YACzB,SAAS;QACX,CAAC;QACD,wEAAwE;QACxE,yDAAyD;QACzD,UAAU,KAAK,IAAI,CAAC,MAAM,KAAK,CAAC,IAAI,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC9D,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC5B,CAAC;IACD,KAAK,EAAE,CAAC;IACR,OAAO,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC1B,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,kBAAkB,CAChC,UAAsB,EACtB,IAAY,EACZ,OAAO,GAAmB,EAAE;IAE5B,OAAO,eAAe,CACpB,aAAa,CAAC,UAAU,EAAE,IAAI,EAAE,OAAO,CAAC,EACxC,CAAC,SAAS,EAAE,EAAE,CACZ,kBAAkB,CAChB,SAAS,EACT,OAAO,CAAC,QAAQ,KAAK,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CACrD,CACJ,CAAC;AACJ,CAAC"}
package/dist/index.d.ts CHANGED
@@ -51,7 +51,7 @@ export type { ReadingProjection, ReadingUnit } from "./decode/locking.js";
51
51
  export { applyEdgeRules, tagOf, wordEndingAt, wordStartingAt, } from "./decode/rules.js";
52
52
  export type { EdgeContext, EdgeRule, EdgeVerdict } from "./decode/rules.js";
53
53
  export type { PositionalReading, ReadingHint, ReadingHints, WordReading, } from "./decode/hints.js";
54
- export { ADJECTIVAL_CHANG, ATTESTED_ERHUA, COUNTED_MEASURE, MODAL_DE, PARTICLE_DE, PLAYING_TAN, POTENTIAL_DE, READING_RULES, TEACHING_JIAO, } from "./decode/reading-rules.js";
54
+ export { ADJECTIVAL_CHANG, ATTESTED_ERHUA, COUNTED_MEASURE, EXPERIENTIAL_GUO, MODAL_DE, PARTICLE_DE, PLAYING_TAN, POTENTIAL_DE, READING_RULES, TEACHING_JIAO, } from "./decode/reading-rules.js";
55
55
  export { readingCost, shortestPath, spacingCost } from "./decode/viterbi.js";
56
56
  export type { CostOf } from "./decode/viterbi.js";
57
57
  export type { DecodedWord, ScoredWord, WordSeparator } from "./decode/word.js";
@@ -69,6 +69,8 @@ export type { YaleOptions } from "./transcription/yale.js";
69
69
  export { readGwoyeu, writeGwoyeu, writeGwoyeuWord, } from "./transcription/gwoyeu.js";
70
70
  export { readIpa, writeIpa, writeIpaSymbols, writeIpaWord, } from "./transcription/ipa.js";
71
71
  export type { IpaOptions } from "./transcription/ipa.js";
72
+ export { BOPOMOFO, GWOYEU, IPA, TRANSCRIPTION_SYSTEMS, transcriptionSystemNamed, WADE_GILES, YALE, } from "./transcription/systems.js";
73
+ export type { TranscriptionSystem, TranscriptionSystemName, } from "./transcription/systems.js";
72
74
  export { segment } from "./decode/segment.js";
73
75
  export type { Segment } from "./decode/segment.js";
74
76
  export { match } from "./search/match.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,aAAa,EACb,aAAa,EACb,aAAa,EACb,oBAAoB,EACpB,YAAY,GACb,MAAM,0BAA0B,CAAC;AAClC,YAAY,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CA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B,EACjB,eAAe,EACf,gBAAgB,GACjB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,cAAc,EACd,cAAc,EACd,cAAc,GACf,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EACL,MAAM,EACN,QAAQ,EACR,OAAO,EACP,SAAS,EACT,gBAAgB,GACjB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAE9D,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE/D,OAAO,EACL,UAAU,EACV,eAAe,EACf,YAAY,EACZ,aAAa,EACb,qBAAqB,GACtB,MAAM,wBAAwB,CAAC;AAChC,YAAY,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAErE,OAAO,EACL,aAAa,EACb,cAAc,EACd,aAAa,GACd,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAC/E,YAAY,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC"}
package/dist/index.js CHANGED
@@ -31,7 +31,7 @@ export { buildScriptTables } from "./dictionary/script-tables.js";
31
31
  export { allEdges, buildLattice, cutPoints, READING_CHARGE, } from "./decode/lattice.js";
32
32
  export { isSettled, projectReadings, settledUnits, unitsOf, } from "./decode/locking.js";
33
33
  export { applyEdgeRules, tagOf, wordEndingAt, wordStartingAt, } from "./decode/rules.js";
34
- export { ADJECTIVAL_CHANG, ATTESTED_ERHUA, COUNTED_MEASURE, MODAL_DE, PARTICLE_DE, PLAYING_TAN, POTENTIAL_DE, READING_RULES, TEACHING_JIAO, } from "./decode/reading-rules.js";
34
+ export { ADJECTIVAL_CHANG, ATTESTED_ERHUA, COUNTED_MEASURE, EXPERIENTIAL_GUO, MODAL_DE, PARTICLE_DE, PLAYING_TAN, POTENTIAL_DE, READING_RULES, TEACHING_JIAO, } from "./decode/reading-rules.js";
35
35
  export { readingCost, shortestPath, spacingCost } from "./decode/viterbi.js";
36
36
  export { cardinalHanzi, LARGEST_CARDINAL } from "./numerals/cardinal.js";
37
37
  export { DIGIT_CHARACTERS, numeralSyllable, QUANTITY_CHARACTERS, UNIT_VALUES, yaoSyllable, } from "./numerals/characters.js";
@@ -41,6 +41,7 @@ export { readWadeGiles, readWadeGilesLoosely, writeWadeGiles, writeWadeGilesSpel
41
41
  export { readYale, writeYale, writeYaleSpelling, writeYaleWord, } from "./transcription/yale.js";
42
42
  export { readGwoyeu, writeGwoyeu, writeGwoyeuWord, } from "./transcription/gwoyeu.js";
43
43
  export { readIpa, writeIpa, writeIpaSymbols, writeIpaWord, } from "./transcription/ipa.js";
44
+ export { BOPOMOFO, GWOYEU, IPA, TRANSCRIPTION_SYSTEMS, transcriptionSystemNamed, WADE_GILES, YALE, } from "./transcription/systems.js";
44
45
  export { segment } from "./decode/segment.js";
45
46
  export { match } from "./search/match.js";
46
47
  export { candidates, homophonesOf } from "./search/candidates.js";
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,aAAa,EACb,aAAa,EACb,aAAa,EACb,oBAAoB,EACpB,YAAY,GACb,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,UAAU,GACX,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAGtE,OAAO,EACL,WAAW,EACX,SAAS,EACT,kBAAkB,EAClB,SAAS,GACV,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,iBAAiB,EACjB,cAAc,GACf,MAAM,iCAAiC,C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AAGtD,OAAO,EACL,kBAAkB,EAClB,uBAAuB,GACxB,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE9E,OAAO,EACL,YAAY,EACZ,cAAc,EACd,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,OAAO,GACR,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,OAAO,EACP,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,gBAAgB,GACjB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,cAAc,EACd,cAAc,EACd,cAAc,GACf,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EACL,MAAM,EACN,QAAQ,EACR,OAAO,EACP,SAAS,EACT,gBAAgB,GACjB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE/D,OAAO,EACL,UAAU,EACV,eAAe,EACf,YAAY,EACZ,aAAa,EACb,qBAAqB,GACtB,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EACL,aAAa,EACb,cAAc,EACd,aAAa,GACd,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,82 @@
1
+ /**
2
+ * The five systems a reading can be written in, as a table.
3
+ *
4
+ * Each entry takes a `write*Word` helper apart into the syllable write and the
5
+ * separator it joins on, so that a caller can put its own markup, colour or
6
+ * annotation around one syllable at a time. That duplicates five separators,
7
+ * and `systems.test.ts` holds each pair against the helper it stands in for
8
+ * over the whole inventory in both tone states.
9
+ *
10
+ * Every field here is a fact about the system rather than about any one output.
11
+ * The CLI walks the table to paint a column per syllable and `toHtml` walks it
12
+ * to write a span per syllable, and neither needs to know anything else.
13
+ */
14
+ import type { Syllable } from "../syllable/syllable.js";
15
+ /**
16
+ * What each system is called, in the CLI and anywhere else it is named.
17
+ */
18
+ export type TranscriptionSystemName = "bopomofo" | "wade-giles" | "yale" | "gwoyeu" | "ipa";
19
+ /**
20
+ * How one system writes a reading, and what it declares itself to be.
21
+ */
22
+ export interface TranscriptionSystem {
23
+ /** What `--from` and `--system` call it. */
24
+ readonly name: TranscriptionSystemName;
25
+ /**
26
+ * One syllable, with its tone or without it.
27
+ *
28
+ * `hasTones` is false where the caller asked for no tone notation. Only
29
+ * Wade-Giles, Yale and IPA can honour it, since each of those writes the
30
+ * tone separately from the syllable. Bopomofo marks it with a symbol of the
31
+ * script and Gwoyeu Romatzyh spells it into the syllable, so for those two
32
+ * there is nothing to leave off and the flag is ignored rather than
33
+ * approximated.
34
+ */
35
+ readonly write: (syllable: Syllable, hasTones: boolean) => string;
36
+ /** What the system writes between two syllables of one word. */
37
+ readonly separator: string;
38
+ /** A whole word, which is {@link write} and {@link separator} together. */
39
+ readonly word: (syllables: readonly Syllable[], hasTones: boolean) => string;
40
+ /**
41
+ * Whether the system writes the capitals the conversion settled.
42
+ *
43
+ * The three romanisations do, since a romanisation is a way of writing
44
+ * Chinese in the Latin alphabet and inherits what that alphabet does with a
45
+ * proper noun. IPA and bopomofo do not, for the reasons
46
+ * {@link import("../format/transcription.js").TranscriptionOptions} gives.
47
+ */
48
+ readonly capitals: boolean;
49
+ /**
50
+ * The BCP 47 script subtag of what the system writes.
51
+ *
52
+ * `Latn` for the romanisations and the IPA, `Bopo` for bopomofo. Both are
53
+ * registered script subtags, and the pair of them is the whole of the script
54
+ * axis this package writes on.
55
+ */
56
+ readonly script: string;
57
+ /**
58
+ * The BCP 47 variant subtag naming the system, where one is registered.
59
+ *
60
+ * The IANA registry has `wadegile` for Wade-Giles and `fonipa` for the IPA,
61
+ * alongside the `pinyin` a conversion carries by default. It has **none for
62
+ * Yale and none for Gwoyeu Romatzyh**, so those two go out as `zh-Latn` and
63
+ * the tag says Mandarin in the Latin alphabet without naming which
64
+ * romanisation. Inventing a private-use subtag would say more and mean less,
65
+ * since nothing consuming the tag would know it.
66
+ */
67
+ readonly variant?: string;
68
+ }
69
+ export declare const BOPOMOFO: TranscriptionSystem;
70
+ export declare const WADE_GILES: TranscriptionSystem;
71
+ export declare const YALE: TranscriptionSystem;
72
+ export declare const GWOYEU: TranscriptionSystem;
73
+ export declare const IPA: TranscriptionSystem;
74
+ /**
75
+ * Every system, in the order the `transcribe` table writes its columns.
76
+ */
77
+ export declare const TRANSCRIPTION_SYSTEMS: readonly TranscriptionSystem[];
78
+ /**
79
+ * The system a name stands for, or undefined for a name that is not one.
80
+ */
81
+ export declare function transcriptionSystemNamed(name: string | undefined): TranscriptionSystem | undefined;
82
+ //# sourceMappingURL=systems.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"systems.d.ts","sourceRoot":"","sources":["../../src/transcription/systems.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAOxD;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAC/B,UAAU,GACV,YAAY,GACZ,MAAM,GACN,QAAQ,GACR,KAAK,CAAC;AAEV;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,4CAA4C;IAC5C,QAAQ,CAAC,IAAI,EAAE,uBAAuB,CAAC;IACvC;;;;;;;;;OASG;IACH,QAAQ,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,KAAK,MAAM,CAAC;IAClE,gEAAgE;IAChE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,2EAA2E;IAC3E,QAAQ,CAAC,IAAI,EAAE,CAAC,SAAS,EAAE,SAAS,QAAQ,EAAE,EAAE,QAAQ,EAAE,OAAO,KAAK,MAAM,CAAC;IAC7E;;;;;;;OAOG;IACH,QAAQ,CAAC,QAAQ,EAA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