0
0

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 1 year has passed since last update.

VSCodeでテキストマイニング用の環境構築を速攻で作る

Last updated at Posted at 2023-08-17

この記事は何?

VSCodeで初めてのテキストマイニングに挑戦、その学習ログです。
「pythonによるテキストマイニング入門」(山内長承)を参考図書に、環境構築してみます。

環境

VSCode
※そもそもVSCodeをインストールしていない場合は▶こちら参照

必要なパッケージをインストール

numpy、scipy、matplotlib、pandas、sklearnはインストールされている前提

# まずpipコマンドをアップグレード
python -m pip install --upgrade pip setuptools
# 軸のラベル、凡例を日本語文字列にする
pip install japanize-matplotlib
# 回帰分析のモジュールに使用
pip install statsmodels
# Word2Vec、意味解析を行う用
pip install gensim
# 自然言語処理パッケージ
pip install nltk

【注意】ダウンロードにかなり時間かかる

import nltk
nltk.download()

以下の小窓が出てくるので、Downloadをクリック
※この切り抜きはDownloadをクリックした後
image.png

# ここ別にしなくてよし
# ダウンロード完了したら、jeitaをimportしファイル内容を確認
from nltk.corpus import jeita
jeita.readme()
jeita.fileids()

MeCabもインストール

# 形態素解析
pip install mecab-python3

これでいったん環境は整ったはず

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?