#include <cmath>#include "util.h"#include <sstream>#include "mfstream.h"#include "mempool.h"#include "htable.h"#include "dictionary.h"#include "n_gram.h"#include "ngramtable.h"#include "cmd.h"Go to the source code of this file.
Defines | |
| #define | YES 1 |
| #define | NO 0 |
Functions | |
| void | print_help (int TypeFlag=0) |
| void | usage (const char *msg=0) |
| double | prob (ngramtable *ngt, ngram ng, int size, int cv) |
| double | computePP (ngramtable *train, ngramtable *test, double oovpenalty, double &oovrate, int cv=0) |
| int | main (int argc, char **argv) |
| double computePP | ( | ngramtable * | train, | |
| ngramtable * | test, | |||
| double | oovpenalty, | |||
| double & | oovrate, | |||
| int | cv = 0 | |||
| ) |
Definition at line 104 of file dtsel.cpp.
References CONT, ngramtable::dict, INIT, ngramtable::maxlevel(), dictionary::oovcode(), prob(), ngramtable::scan(), ngram::size, ngram::trans(), and ngram::wordp().
Referenced by main().


| int main | ( | int | argc, | |
| char ** | argv | |||
| ) |
Definition at line 126 of file dtsel.cpp.
References dictionary::BoS(), CMDBOOLTYPE, CMDDOUBLETYPE, CMDINTTYPE, CMDMSG, CMDSTRINGTYPE, CMDSUBRANGETYPE, computePP(), COUNT, DeclareParams(), ngramtable::dict, dictionary::encode(), ngram::freq, GetParams(), dictionary::incflag(), index, MAX_NGRAM, NULL, dictionary::OOV(), dictionary::oovcode(), prob(), ngram::pushc(), ngramtable::put(), ngram::size, dictionary::size(), usage(), verbose, and ngram::wordp().

| void print_help | ( | int | TypeFlag = 0 |
) |
Definition at line 45 of file dtsel.cpp.
References FullPrintParams().

| double prob | ( | ngramtable * | ngt, | |
| ngram | ng, | |||
| int | size, | |||
| int | cv | |||
| ) |
Definition at line 64 of file dtsel.cpp.
References ngramtable::dict, ngram::freq, ngramtable::get(), dictionary::oovcode(), dictionary::size(), ngram::size, ngram::succ, ngramtable::totfreq(), and ngram::wordp().
Referenced by lm::ngram::RuleScore< M >::BeginNonTerminal(), computePP(), Moses::LanguageModelKen< Model >::EvaluateWhenApplied(), Moses::TargetConstituentAdjacencyFeature::EvaluateWhenApplied(), Moses::SpanLength::EvaluateWithSourceContext(), PCN::getCNAlt(), Moses::Model1LexicalTable::GetProbability(), GetScore(), MosesTraining::Syntax::ScoreStsg::LexicalTable::Load(), MosesTraining::LexicalTable::load(), Moses::Model1LexicalTable::Load(), main(), lm::ngram::RuleScore< M >::NonTerminal(), Moses::ChartParserUnknown::Process(), Process(), lm::Read1Gram(), Moses::ConfusionNet::ReadFormat0(), Moses::ConfusionNet::ReadFormat1(), and Moses::Syntax::S2T::OovHandler< RuleTrie >::SynthesizeRuleTrie().


| void usage | ( | const char * | msg = 0 |
) |
Definition at line 53 of file dtsel.cpp.
References print_help().

1.5.9