Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?

引き続き東大の「創造情報学連携講義VII」より賀沢さんの課題1でもある、IBMモデル1の実装を行いました。創造情報学連携講座IBMモデル1のEMアルゴリズムを実装してサンプルデータで結果を確認せよという問題です。 #!/usr/bin/env python from collections import defaultdict def train(corpus): pair = defaultdict(float) for english, forein in corpus: for e in english.split(" "): for f in forein.split(" "): pair[(e,f)] += 1. print 'pair:', pair t = defaultdict(float) for e,f in pair.keys(): t[(e,f)] = 0.25 f
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く