Skip to content

Add raw output mode#72

Open
mistval wants to merge 1 commit into
hexenq:devfrom
mistval:raw-mode
Open

Add raw output mode#72
mistval wants to merge 1 commit into
hexenq:devfrom
mistval:raw-mode

Conversation

@mistval

@mistval mistval commented May 3, 2020

Copy link
Copy Markdown

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