diff options
author | Barry Haddow <barry.haddow@gmail.com> | 2011-11-23 19:31:16 +0400 |
---|---|---|
committer | Barry Haddow <barry.haddow@gmail.com> | 2011-11-23 19:31:16 +0400 |
commit | 66c29e01c42ce48b77f62e4100c77f5f7701dcc5 (patch) | |
tree | 674f8e0ad5937d705a39f9ed80926125b407ab08 /scripts/training/memscore/phraselm.h | |
parent | 791831b0ce557be7490ecccde380df66a86b9589 (diff) |
Move from scripts to contrib
Diffstat (limited to 'scripts/training/memscore/phraselm.h')
-rw-r--r-- | scripts/training/memscore/phraselm.h | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/scripts/training/memscore/phraselm.h b/scripts/training/memscore/phraselm.h deleted file mode 100644 index 62e8f08d4..000000000 --- a/scripts/training/memscore/phraselm.h +++ /dev/null @@ -1,45 +0,0 @@ -// memscore - in-memory phrase scoring for Statistical Machine Translation -// Christian Hardmeier, FBK-irst, Trento, 2010 -// $Id$ - -#ifndef PHRASELM_H -#define PHRASELM_H - -#include <cassert> - -#include "memscore.h" -#include "phrasetable.h" -#include "statistic.h" - -class lmtable; - -class PhraseLanguageModel : public PhraseStatistic -{ -protected: - String lmfile_; - Count score_idx_; - - PhraseInfoList *phrase_info_list_; - - void compute_lmscores(PhraseInfoList &phrase_info_list, bool closed_world); - -public: - PhraseLanguageModel(String lmfile) : lmfile_(lmfile) {} - - virtual void attach(PhraseInfoList &pilist); - virtual void compute_statistic(); - - virtual Score get_score(PhraseInfo &pi) { - assert(computation_done_); - return pi.data(score_idx_); - } -}; - -class ClosedPhraseLanguageModel : public PhraseLanguageModel -{ -public: - ClosedPhraseLanguageModel(String lmfile) : PhraseLanguageModel(lmfile) {} - virtual void compute_statistic(); -}; - -#endif |