-
Notifications
You must be signed in to change notification settings - Fork 14
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
should we refactor for better performance #28
Labels
Type: Documentation
Documentation only changes
Comments
https://excalidraw.com/#json=PKbVfkc-JwDScvZHN8Ysu,jgqaHTMS03q6BsvQRYO1dg |
This statement is correct ... but paints an incomplete picture :) Option const text = "吾輩は猫である。名前はたぬき。";
const japaneseWordSegmenter = new Intl.Segmenter("ja-JP", { granularity: "word" });
[...japaneseWordSegmenter.segment(text)].forEach((s)=>console.log(JSON.stringify(s, null, 4))); ==>
const text = "吾輩は猫である。名前はたぬき。";
const japaneseSentenceSegmenter = new Intl.Segmenter("ja-JP", { granularity: "sentence" });
[...japaneseSentenceSegmenter.segment(text)].forEach((s)=>console.log(JSON.stringify(s, null, 4))); ==>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Since
Intl.Segmenter
(link) is available for most of the users, I think it's better to mention what are the extra features[sentence-splitter](https://github.com/azu/sentence-splitter)
is providing. And it will be better to tell to use one over another with some scenarios so that user can take an informed decision.The text was updated successfully, but these errors were encountered: