mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-26 21:42:19 +03:00
new LBLLM based on LanguageModel class
This commit is contained in:
parent
b753f26d67
commit
08be3b6b4f
@ -12,10 +12,6 @@
|
||||
#include "lbl/process_identifier.h"
|
||||
#include "lbl/query_cache.h"
|
||||
|
||||
#include "lbl/cdec_lbl_mapper.h"
|
||||
#include "lbl/cdec_rule_converter.h"
|
||||
#include "lbl/cdec_state_converter.h"
|
||||
|
||||
#include "Mapper.h"
|
||||
|
||||
namespace Moses
|
||||
@ -76,6 +72,9 @@ public:
|
||||
ids = mapper->convert(contextFactor);
|
||||
int word = ids.back();
|
||||
|
||||
size_t context_width = m_nGramOrder - 1;
|
||||
ids.resize(context_width, kUNKNOWN);
|
||||
|
||||
double score;
|
||||
score = model.predict(word, ids);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user