標籤:神經網路 moses nplm
ACL2014的best paper Fast and Robust Neural Network Joint Models for Statistical Machine Translation在SMT中使用深度學習知識,提出了一種neural network joint model(其實就是融合源端語言知識去做語言模型),論文實驗給出的結果宣稱大幅度提高了以往基於n-gram語言模型翻譯系統的翻譯效能。
開源機器翻譯系統moses也實現並整合了上述研究成果。參見[1]中
An implementation of Devlin et al. (2014), a neural network language model that uses a target-side history as well as source-side context, is implemented in Moses as BilingualLM. It uses NPLM as back-end (check its installation instructions).
不過moses自己對他命名為Bilingual Neural LM(雙語神經網路語言模型)。
和其他語言模型一樣,moses將其視為一個翻譯特徵(feature)融合到自己的解碼器中。特徵的整合參見[1]。但是如果心急,僅僅改改moses設定檔mose.ini,在訓練和解碼階段,使用以前普通的moses解碼器(一般都是使用KenLM或者Srilm作為語言模型),moses解碼器會報錯無法識別那個特徵。
參見[1], 正確做法是:
1. 安裝神經網路語言模型工具(a neural network language model toolkit)nplm。
2. 在編譯的時候帶上參數
- --with-nplm=<root dir of the NPLM toolkit>
但是我在安裝過程中遇到問題:
Unable to load Boost.Build: could not find "boost-build.jam"
-----------------------------------------------------
Attempted search from /path/to/mosesdecoder up to the root at /path/to/mosesdecoder/share/boost-build. and in these directories from BOOST_BUILD_PATH and BOOST_ROOT: /usr/share/boost-build
開始,遇到這個問題,我一直以為是boost庫安裝錯誤。參考[2],[3]等,對boost一陣著折騰。沒有任何效果....
參考:
[1] http://www.statmt.org/moses/?n=FactoredTraining.BuildingLanguageModel#ntoc38
[2] http://comments.gmane.org/gmane.comp.nlp.moses.user/6322
[3] http://comments.gmane.org/gmane.comp.nlp.moses.user/11461
著作權聲明:本文為博主原創文章,未經博主允許不得轉載。
[moses筆記]編譯含有nplm的moses解碼器