mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 10:31:47 +00:00
feat: use tiny-pinyin instead of pinyin
This commit is contained in:
@ -290,7 +290,6 @@
|
|||||||
"node-html-parser": "7.0.1",
|
"node-html-parser": "7.0.1",
|
||||||
"node-id3": "0.2.9",
|
"node-id3": "0.2.9",
|
||||||
"peerjs": "1.5.4",
|
"peerjs": "1.5.4",
|
||||||
"pinyin": "4.0.0-alpha.2",
|
|
||||||
"segmentit": "2.0.3",
|
"segmentit": "2.0.3",
|
||||||
"semver": "7.7.2",
|
"semver": "7.7.2",
|
||||||
"serve": "14.2.4",
|
"serve": "14.2.4",
|
||||||
@ -300,6 +299,7 @@
|
|||||||
"solid-js": "1.9.7",
|
"solid-js": "1.9.7",
|
||||||
"solid-styled-components": "0.28.5",
|
"solid-styled-components": "0.28.5",
|
||||||
"solid-transition-group": "0.3.0",
|
"solid-transition-group": "0.3.0",
|
||||||
|
"tiny-pinyin": "1.3.2",
|
||||||
"ts-morph": "26.0.0",
|
"ts-morph": "26.0.0",
|
||||||
"vudio": "2.1.1",
|
"vudio": "2.1.1",
|
||||||
"x11": "2.3.0",
|
"x11": "2.3.0",
|
||||||
|
|||||||
46
pnpm-lock.yaml
generated
46
pnpm-lock.yaml
generated
@ -186,9 +186,6 @@ importers:
|
|||||||
peerjs:
|
peerjs:
|
||||||
specifier: 1.5.4
|
specifier: 1.5.4
|
||||||
version: 1.5.4
|
version: 1.5.4
|
||||||
pinyin:
|
|
||||||
specifier: 4.0.0-alpha.2
|
|
||||||
version: 4.0.0-alpha.2(segmentit@2.0.3)
|
|
||||||
segmentit:
|
segmentit:
|
||||||
specifier: 2.0.3
|
specifier: 2.0.3
|
||||||
version: 2.0.3
|
version: 2.0.3
|
||||||
@ -216,6 +213,9 @@ importers:
|
|||||||
solid-transition-group:
|
solid-transition-group:
|
||||||
specifier: 0.3.0
|
specifier: 0.3.0
|
||||||
version: 0.3.0(solid-js@1.9.7)
|
version: 0.3.0(solid-js@1.9.7)
|
||||||
|
tiny-pinyin:
|
||||||
|
specifier: 1.3.2
|
||||||
|
version: 1.3.2
|
||||||
ts-morph:
|
ts-morph:
|
||||||
specifier: 26.0.0
|
specifier: 26.0.0
|
||||||
version: 26.0.0
|
version: 26.0.0
|
||||||
@ -1950,10 +1950,6 @@ packages:
|
|||||||
resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==}
|
resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==}
|
||||||
engines: {node: '>= 0.8'}
|
engines: {node: '>= 0.8'}
|
||||||
|
|
||||||
commander@1.1.1:
|
|
||||||
resolution: {integrity: sha512-71Rod2AhcH3JhkBikVpNd0pA+fWsmAaVoti6OR38T76chA7vE3pSerS0Jor4wDw+tOueD2zLVvFOw5H0Rcj7rA==}
|
|
||||||
engines: {node: '>= 0.6.x'}
|
|
||||||
|
|
||||||
commander@5.1.0:
|
commander@5.1.0:
|
||||||
resolution: {integrity: sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==}
|
resolution: {integrity: sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==}
|
||||||
engines: {node: '>= 6'}
|
engines: {node: '>= 6'}
|
||||||
@ -3223,9 +3219,6 @@ packages:
|
|||||||
keyboardevents-areequal@0.2.2:
|
keyboardevents-areequal@0.2.2:
|
||||||
resolution: {integrity: sha512-Nv+Kr33T0mEjxR500q+I6IWisOQ0lK1GGOncV0kWE6n4KFmpcu7RUX5/2B0EUtX51Cb0HjZ9VJsSY3u4cBa0kw==}
|
resolution: {integrity: sha512-Nv+Kr33T0mEjxR500q+I6IWisOQ0lK1GGOncV0kWE6n4KFmpcu7RUX5/2B0EUtX51Cb0HjZ9VJsSY3u4cBa0kw==}
|
||||||
|
|
||||||
keypress@0.1.0:
|
|
||||||
resolution: {integrity: sha512-x0yf9PL/nx9Nw9oLL8ZVErFAk85/lslwEP7Vz7s5SI1ODXZIgit3C5qyWjw4DxOuO/3Hb4866SQh28a1V1d+WA==}
|
|
||||||
|
|
||||||
keyv@4.5.4:
|
keyv@4.5.4:
|
||||||
resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==}
|
resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==}
|
||||||
|
|
||||||
@ -3836,22 +3829,6 @@ packages:
|
|||||||
resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==}
|
resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==}
|
||||||
engines: {node: '>=12'}
|
engines: {node: '>=12'}
|
||||||
|
|
||||||
pinyin@4.0.0-alpha.2:
|
|
||||||
resolution: {integrity: sha512-SED2wWr1X0QwH6rXIDgg20zS1mAk0AVMO8eM3KomUlOYzC8mNMWZnspZWhhI0M8MBIbF2xwa+5r30jTSjAqNsg==}
|
|
||||||
engines: {install-node: ^18.0.0}
|
|
||||||
hasBin: true
|
|
||||||
peerDependencies:
|
|
||||||
'@node-rs/jieba': ^1.6.0
|
|
||||||
nodejieba: 2.5.2
|
|
||||||
segmentit: ^2.0.3
|
|
||||||
peerDependenciesMeta:
|
|
||||||
'@node-rs/jieba':
|
|
||||||
optional: true
|
|
||||||
nodejieba:
|
|
||||||
optional: true
|
|
||||||
segmentit:
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
pixelmatch@5.3.0:
|
pixelmatch@5.3.0:
|
||||||
resolution: {integrity: sha512-o8mkY4E/+LNUf6LzX96ht6k6CEDi65k9G2rjMtBe9Oo+VPKSvl+0GKHuH/AlG+GA5LPG/i5hrekkxUc3s2HU+Q==}
|
resolution: {integrity: sha512-o8mkY4E/+LNUf6LzX96ht6k6CEDi65k9G2rjMtBe9Oo+VPKSvl+0GKHuH/AlG+GA5LPG/i5hrekkxUc3s2HU+Q==}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
@ -4441,6 +4418,9 @@ packages:
|
|||||||
tiny-async-pool@1.3.0:
|
tiny-async-pool@1.3.0:
|
||||||
resolution: {integrity: sha512-01EAw5EDrcVrdgyCLgoSPvqznC0sVxDSVeiOz09FUpjh71G79VCqneOr+xvt7T1r76CF6ZZfPjHorN2+d+3mqA==}
|
resolution: {integrity: sha512-01EAw5EDrcVrdgyCLgoSPvqznC0sVxDSVeiOz09FUpjh71G79VCqneOr+xvt7T1r76CF6ZZfPjHorN2+d+3mqA==}
|
||||||
|
|
||||||
|
tiny-pinyin@1.3.2:
|
||||||
|
resolution: {integrity: sha512-uHNGu4evFt/8eNLldazeAM1M8JrMc1jshhJJfVRARTN3yT8HEEibofeQ7QETWQ5ISBjd6fKtTVBCC/+mGS6FpA==}
|
||||||
|
|
||||||
tiny-typed-emitter@2.1.0:
|
tiny-typed-emitter@2.1.0:
|
||||||
resolution: {integrity: sha512-qVtvMxeXbVej0cQWKqVSSAHmKZEHAvxdF8HEUBFWts8h+xEo5m/lEiPakuyZ3BnCBjOD8i24kzNOiOLLgsSxhA==}
|
resolution: {integrity: sha512-qVtvMxeXbVej0cQWKqVSSAHmKZEHAvxdF8HEUBFWts8h+xEo5m/lEiPakuyZ3BnCBjOD8i24kzNOiOLLgsSxhA==}
|
||||||
|
|
||||||
@ -6611,10 +6591,6 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
delayed-stream: 1.0.0
|
delayed-stream: 1.0.0
|
||||||
|
|
||||||
commander@1.1.1:
|
|
||||||
dependencies:
|
|
||||||
keypress: 0.1.0
|
|
||||||
|
|
||||||
commander@5.1.0: {}
|
commander@5.1.0: {}
|
||||||
|
|
||||||
commander@9.5.0:
|
commander@9.5.0:
|
||||||
@ -8140,8 +8116,6 @@ snapshots:
|
|||||||
|
|
||||||
keyboardevents-areequal@0.2.2: {}
|
keyboardevents-areequal@0.2.2: {}
|
||||||
|
|
||||||
keypress@0.1.0: {}
|
|
||||||
|
|
||||||
keyv@4.5.4:
|
keyv@4.5.4:
|
||||||
dependencies:
|
dependencies:
|
||||||
json-buffer: 3.0.1
|
json-buffer: 3.0.1
|
||||||
@ -8718,12 +8692,6 @@ snapshots:
|
|||||||
|
|
||||||
picomatch@4.0.2: {}
|
picomatch@4.0.2: {}
|
||||||
|
|
||||||
pinyin@4.0.0-alpha.2(segmentit@2.0.3):
|
|
||||||
dependencies:
|
|
||||||
commander: 1.1.1
|
|
||||||
optionalDependencies:
|
|
||||||
segmentit: 2.0.3
|
|
||||||
|
|
||||||
pixelmatch@5.3.0:
|
pixelmatch@5.3.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
pngjs: 6.0.0
|
pngjs: 6.0.0
|
||||||
@ -9381,6 +9349,8 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
semver: 5.7.2
|
semver: 5.7.2
|
||||||
|
|
||||||
|
tiny-pinyin@1.3.2: {}
|
||||||
|
|
||||||
tiny-typed-emitter@2.1.0: {}
|
tiny-typed-emitter@2.1.0: {}
|
||||||
|
|
||||||
tinycolor2@1.6.0: {}
|
tinycolor2@1.6.0: {}
|
||||||
|
|||||||
@ -6,7 +6,7 @@ import Kuroshiro from 'kuroshiro';
|
|||||||
import { romanize as esHangulRomanize } from 'es-hangul';
|
import { romanize as esHangulRomanize } from 'es-hangul';
|
||||||
import hanja from 'hanja';
|
import hanja from 'hanja';
|
||||||
|
|
||||||
import pinyin from 'pinyin/esm/pinyin';
|
import pinyin from 'tiny-pinyin';
|
||||||
|
|
||||||
import { lazy } from 'lazy-var';
|
import { lazy } from 'lazy-var';
|
||||||
|
|
||||||
@ -183,10 +183,4 @@ export const romanizeJapaneseOrHangul = async (line: string) =>
|
|||||||
romanizeHangul(await romanizeJapanese(line));
|
romanizeHangul(await romanizeJapanese(line));
|
||||||
|
|
||||||
export const romanizeChinese = (line: string) =>
|
export const romanizeChinese = (line: string) =>
|
||||||
pinyin(line, {
|
pinyin.convertToPinyin(line, ' ', true);
|
||||||
heteronym: true,
|
|
||||||
segment: true,
|
|
||||||
group: true,
|
|
||||||
})
|
|
||||||
.flat()
|
|
||||||
.join(' ');
|
|
||||||
|
|||||||
Reference in New Issue
Block a user