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

Add raw output mode #72

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open

Add raw output mode #72

wants to merge 1 commit into from

Conversation

mistval
Copy link

@mistval mistval commented May 3, 2020

Hello,

This PR adds a raw output mode which outputs the results in a JS object, for example:

// raw
await kuroshiro.convert("感じ取れたら手を繋ごう、重なるのは人生のライン and レミリア最高!", {mode:"raw", to:"hiragana"});
// result:
// [
//   { text: '感', reading: 'かん' },
//   { text: 'じ' },
//   { text: '取', reading: 'と' },
//   { text: 'れたら' },
//   { text: '手', reading: 'て' },
//   { text: 'を' },
//   { text: '繋', reading: 'つな' },
//   { text: 'ごう、' },
//   { text: '重', reading: 'かさ' },
//   { text: 'なるのは' },
//   { text: '人生', reading: 'じんせい' },
//   { text: 'のライン and レミリア' },
//   { text: '最高', reading: 'さいこう' },
//   { text: '!' }
// ]

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

Successfully merging this pull request may close these issues.

2 participants