a) 总调用部分(主函数):moses-cmd/src/Main.cpp (The main function)
b) 解码器初始入口部分(Initialize the decoder):
i. 参数设置:
moses/src/Parameter.cpp (specifies parameters)
ii. 模型数据加载:
moses/src/StaticData.cpp (contains globals, loads tables)
c) 句子翻译处理部分(Process a sentence):
i. 解码器算法实现总调度:
Manager.cpp (implements the decoding algorithm)
ii. 翻译选项处理:
TranslationOptionCollection.cpp (contains translation options)
iii. 部分翻译处理:
Hypothesis.cpp(represents partial translation)?
iv. 包含翻译假设,实现剪枝:
HypothesisStack.cpp (contain viable hypotheses, implements pruning)
d) 结果输出:moses-cmd/src/Main.cpp(Output results)
i. 输出最佳翻译结果:
moses-cmd/src/IOStream::OutputBestHypo (print best translation)
ii. n-best生成及输出:
(n-best lists generated in Manager.cpp, output in IOStream.cpp)
注:原创文章,转载请注明出处“我爱自然语言处理”:www.52nlp.cn
本文链接地址:
https://www.52nlp.cn/moses-basic-framework/
[...] (1). https://www.52nlp.cn/moses-basic-framework [...]