LoginSignup
6
1

More than 5 years have passed since last update.

TreeTagerをMacで使えるようにする. ( Install編)

Posted at

はじめに

MacでTreeTaggerを使いたいと思い、インストールしてみましたが色々とめんどくさかったのでメモ。

環境

  • Mac OSX 10.11.6

注意!!

これから手順通りにやっていきますが、以下のことを守ってください。

  • わかりやすい場所 ( Desktop等 )にTreeTagger という名前でフォルダを作っておく
  • ダウンロードしたファイルは 全て そのフォルダに入れる
  • ダウンロードしたファイルは 解凍しない

TreeTaggerのインストール

まずは 公式サイトから必要なファイル群をダウンロードしてきます。

Download the tagger package for your system (PC-Linux, Mac OS-X (Intel-CPU), PC-Linux (version for older kernels)).

1.png

自分の環境にあったパッケージをダウンロードしろと書いてありますが、今回はMacなので Mac OS-X (Intel-CPU) を選択。

2.png

Download the tagging scripts into the same directory.
Download the installation script install-tagger.sh.

tagging scripts , install-tagger.sh をダウンロードします。

スクリーンショット_2016-10-09_16_58_40.png

Download the parameter files for the languages you want to process.

最後に parameter files をダウンロードします。今回は英語なので、英語のパラメータファイルをダウンロードします。

3.png

English Parameter file をクリックしてダウンロードします。


全てインストールし終えると、以下の状態になっていると思います。

スクリーンショット_2016-10-09_17_11_03.png

まずは、このフォルダをアプリケーションフォルダに移動しましょう。 ( ずっとDesktopにあると汚いので )

次にターミナルで、このフォルダを開き、以下のコマンドを叩きます。

sh install-tagger.sh

(~/Desktop/TreeTagger) RINDO ~> sh install-tagger.sh

Mac OS-X version of TreeTagger for Intel CPUs installed.
Tagging scripts installed.
English parameter file (Linux, UTF8) installed.
Path variables modified in tagging scripts.

You might want to add /Applications/TreeTagger/cmd and /Applications/TreeTagger/bin to the PATH variable so that you do not need to specify the full path to run the tagging scripts.

これで公式にある

スクリーンショット 2016-10-09 17.17.07.png

が実行できるようになります。

PATHを通す

echo 'Hello world!' | cmd/tree-tagger-english は実行できるようになりましたが、 cdすると使えないのでPATHを通していきます。

引き続きターミナルで作業してきます。

$ vim ~/.bash_profile

# 以下の行を追加
export PATH=$PATH:/Applications/TreeTagger/cmd
export PATH=$PATH:/Applications/TreeTagger/bin

追加し終わったら、以下のコマンドを叩きます。

source ~/.bash_profile

これで、以下のようにして使うことができます。

echo 'Hello world!' | tree-tagger-english 
6
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
6
1