Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Failed to load latest commit information.
src コマンドラインオプションとその使い方
README.md 実験設定の説明追加
waf added waf
wscript added wscript

README.md

SimpleHMM

Objective

To practice writing codes about Forward-Backward Algorithm.

Current Features

Implemented three algorithm including viterbi, forward(backward), and forward-backward algorithm.

Usage

./wscript configure
./wscript build

Example

# simple viterbi example
./build/default/src/simple_hmm_example 

wget http://www.phontron.com/data/nonparametric-exercise-ja-1.tar.gz
tar zxvf nonparametric-exercise-ja-1.tar.gz
mv nonparametric-exercise-ja-1 data
cd data
ruby -e 'output_file = File.open("gold.txt", "w"); File.open("wiki-sample.wordpart") {|file| file.each{|line| output_file.print line.chomp! + " "}}; output_file.puts'
# see command line option
./build/default/src/simple_hmm -helppackage
./build/default/src/simple_hmm -ITER=10 > data/result.txt
cd data
./grade-bayes-hmm.pl gold.txt result.txt

Experimental Result

Setting as follows:

  • Number of hidden state = 30
  • Number of iteration = 200
  • Training data and test data are same data(For simplicity). Accuracy Log Likelihood

TODO

  • Treatment with unkown words
  • Handling multi-sentence(regarding multi-sentence as one sentence now)
Something went wrong with that request. Please try again.