Skip to content

Instantly share code, notes, and snippets.

@soy-curd
Last active October 4, 2015 10:08
Show Gist options
  • Save soy-curd/9bd41d65c5f039df5bf4 to your computer and use it in GitHub Desktop.
Save soy-curd/9bd41d65c5f039df5bf4 to your computer and use it in GitHub Desktop.

Revisions

  1. soy-curd revised this gist Oct 4, 2015. No changes.
  2. soy-curd created this gist Oct 4, 2015.
    32 changes: 32 additions & 0 deletions shuca_install.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,32 @@


    # md5sumのインストール(KNPのインストールに必要)
    brew install md5sha1sum

    # Juman(形態素解析器)のインストール
    # (http://quruli.ivory.ne.jp/diary/?date=20120310)通りに。
    mkdir juman
    cd juman
    curl -O http://nlp.ist.i.kyoto-u.ac.jp/nl-resource/juman/juman-7.01.tar.bz2
    bzip2 -cd juman-7.01.tar.bz2| tar xvf -
    cd juman-7.01
    ./configure
    make
    sudo make install

    # KNP(構文解析器)のインストール
    # 8G程度あるのでディスク容量注意
    cd ..
    curl -L --retry 8 -O http://nlp.ist.i.kyoto-u.ac.jp/nl-resource/knp/knp-4.14.tar.bz2
    bzip2 -cp knp-4.14.tar.bz2| tar xvf -
    cd knp-4.14
    ./configure
    make && make check
    sudo make install

    # Shucaのインストール
    cd ..
    git clone https://github.com/hitoshin/shuca.git

    cd shuca
    cat ./dat/sample.snt.txt |juman |knp -simple -anaphora | ./lib/Shuca.py