2013年3月29日星期五

cdec一些細節

1) 讀取cdec.ini文件
line484: decoder.cc
DecoderImpl::DecoderImpl() at decoder.cc:484
Decoder::Decoder() at decoder.cc:740
main() at cdec.cc:14

2) 讀取weight.init文件
line15:weights.cc
Weights::InitFromFile() at weights.cc
DecoderImpl::DecoderImpl() at decoder.cc:571

Decoder::Decoder() at decoder.cc:740
main() at cdec.cc:14

3) 讀取language model文件
line91: ff_factory.h:92
FactoryRegistry::Create() at ff_factory.h:92
make_ff() at decoder.cc:131
DecoderImpl::DecoderImpl() at decoder.cc:604
Decoder::Decoder() at decoder.cc:740
main() at cdec.cc:14

4) 添加glue grammar
line51: scfg_translator.cc
GlueGrammar::GlueGrammar() at scfg_translator.cc:51
SCFGTranslatorImpl::SCFGTranslatorImpl() at scfg_translator.cc:134
SCFGTranslator::SCFGTranslator() at scfg_translator.cc:345
DecoderImpl::DecoderImpl() at decoder.cc:667
Decoder::Decoder() at decoder.cc:740
main() at cdec.cc:14


5) 讀取grammar文件
line303: rule_lexer.ll
RuleLexer::ReadRules() at rule_lexer.ll:303
TextGrammar::ReadFromStream() at grammar.cc:123
TextGrammar::ReadFromFile() at grammar.cc:119
TextGrammar::TextGrammar() at grammar.cc:80
SCFGTranslator::ProcessMarkupHintsImpl() at scfg_translator.cc:363
Translator::ProcessMarkupHints() at translator.cc:21
DecoderImpl::Decoder() at decoder.cc:791
Decoder::Decoder() at decoder.cc:746
main() at cdec.cc:30

6) input sentence轉換為lattice structure
line58: lattice.cc
LatticeTools::ConvertTextOrPLF() at lattice.cc:58
SCFGTranslatorImpl::Translate() at scfg_translator.cc:186
SCFGTranslator::TranslateImpl() at scfg_translator.cc:354
Translator::Translate() at translator.cc:33
DecoderImpl::Decode() at decoder.cc:794
Decoder::Decode() at decoder.cc:746
main() at cdec.cc:30

7) 添加pass through grammar
line65: scfg_translator.cc
PassThroughGrammar::PassThroughGrammar() at scfg_translator.cc:65
SCFGTranslatorImpl::Translate() at scfg_translator.cc:190
SCFGTranslator::TranslateImpl() at scfg_translator.cc:354
Translator::Translate() at translator.cc:33
DecoderImpl::Decode() at decoder.cc:794
Decoder::Decode() at decoder.cc:746
main() at cdec.cc:30



没有评论: