Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unexpected outputs #3

Open
shilik opened this issue Jan 14, 2019 · 0 comments
Open

unexpected outputs #3

shilik opened this issue Jan 14, 2019 · 0 comments

Comments

@shilik
Copy link

shilik commented Jan 14, 2019

Hi @pepebecker
Thanks for the great plugin, I have used it in my nativescript project.
With all the required dependency plugins installed, I have encountered several problems.

  1. the error of './py2zh'
    Module not found: Error: Can't resolve './py2zh' in '/Users/shilik/mobile/text_suggest/node_modules/zhuyin'
    This error disappeared after I changed const py2zh = require("./py2zh") to const py2zh = require("./py2zh.json")

2.Using the example, but yields different results.

const zhuyin = require('zhuyin')
zhuyin('wǒ de māo xǐhuan hē níunǎi')
.then(console.log)
[ 'ㄨㄛˇ', 'ㄉㄜ˙', 'ㄇㄠ', 'ㄒㄧˇ', 'ㄏㄨㄢ˙', 'ㄏㄜ', 'ㄋㄧㄡˊ', 'ㄋㄞˇ' ] should be the output,
but what I got is the following:
[ 'ㄉㄜ˙', 'ㄇ˙', 'ㄛ˙', 'ㄏㄨㄢ˙', 'ㄋ˙', 'ㄋ˙', [length]: 6 ]
Any suggestion?

shilik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant