7
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

mecabで分かち書きコマンド

Last updated at Posted at 2016-10-11

検索でヒットしなかったから投稿
当たり前すぎて書かれないだけかもしれない笑

mecabで分かち書き

$mecab -Owakati

というコマンドで入力待ちになるので、分かち書きしたい文章を打つとしてくれる。

こんにちは。 今日は寒いですね
こんにちは 今日 は 寒い です ね

出力

$ mecab -Owakati >> mecab.txt

というコマンドで出力も出来る。

python

# coding: UTF-8
import MeCab
mt = MeCab.Tagger("-Owakati")
print(mt.parse("こんにちは。今日は寒いですね"))


# => こんにちは 。 今日 は 寒い です ね 
7
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?