- Notifications
You must be signed in to change notification settings - Fork5
Yet another sentence-level tokenizer for the Japanese text
License
NotificationsYou must be signed in to change notification settings
ikegami-yukino/sengiri
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Yet another sentence-level tokenizer for the Japanese text
- MeCab
- emoji
$ pip install sengiri
importsengiriprint(sengiri.tokenize('うーん🤔🤔🤔どうしよう'))#=>['うーん🤔🤔🤔', 'どうしよう']print(sengiri.tokenize('モー娘。のコンサートに行った。'))#=>['モー娘。のコンサートに行った。']print(sengiri.tokenize('ありがとう^^ 助かります。'))#=>['ありがとう^^', '助かります。']print(sengiri.tokenize('顔文字テスト(*´ω`*)うまくいくかな?'))#=>['顔文字テスト(*´ω`*)うまくいくかな?']# I recommend using the NEologd dictionary.print(sengiri.tokenize('顔文字テスト(*´ω`*)うまくいくかな?',mecab_args='-d /usr/local/lib/mecab/dic/mecab-ipadic-neologd'))#=>['顔文字テスト(*´ω`*)', 'うまくいくかな?']print(sengiri.tokenize('子供が大変なことになった。''(後で聞いたのだが、脅されたらしい)''(脅迫はやめてほしいと言っているのに)'))#=>['子供が大変なことになった。', '(後で聞いたのだが、脅されたらしい)', '(脅迫はやめてほしいと言っているのに)']print(sengiri.tokenize('楽しかったw また遊ぼwww'))#=>['楽しかったw', 'また遊ぼwww']print(sengiri.tokenize('http://www.inpaku.go.jp/'))#=>['http://www.inpaku.go.jp/']
About
Yet another sentence-level tokenizer for the Japanese text
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.
Contributors2
Uh oh!
There was an error while loading.Please reload this page.