1
1

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をmacで利用&python3で利用 メモ

Last updated at Posted at 2015-09-21

brew

  • インスコ

    brew install mecab
    brew install mecab-ipadic
    
  • バージョン確認

    $ mecab -v
    mecab of 0.996
    
  • 実行確認

$ mecab
すもももももももものうち
すもも 名詞,一般,,,,,すもも,スモモ,スモモ
も 助詞,係助詞,,,,,も,モ,モ
もも 名詞,一般,,,,,もも,モモ,モモ
も 助詞,係助詞,,,,,も,モ,モ
もも 名詞,一般,,,,,もも,モモ,モモ
の 助詞,連体化,,,,,の,ノ,ノ
うち 名詞,非自立,副詞可能,,,*,うち,ウチ,ウチ
EOS

```

よさそう(´ー`)

pip

  • インスコ

pip install mecab-python3
```

  • 実行確認

print(mecab.parse("すもももももももものうち"))
```

```

$ ipython
In [1]: import MeCab
In [2]: mecab = MeCab.Tagger ("-Ochasen")
In [3]: print(mecab.parse("すもももももももものうち"))
すもも スモモ すもも 名詞-一般
も モ も 助詞-係助詞
もも モモ もも 名詞-一般
も モ も 助詞-係助詞
もも モモ もも 名詞-一般
の ノ の 助詞-連体化
うち ウチ うち 名詞-非自立-副詞可能
EOS

 ```

よさそう(´ー`)

1
1
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
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?