Hi Huyen Hieu Hoang http://www.hoang.co.uk/hieu
On 5 December 2015 at 04:32, Vu Thuong Huyen <[email protected]> wrote: > Hi all, > > I’m integrating my LM in Mosesdecoder. I followed the SRI.cpp and > NeuralLMWrapper.cpp. I don’t know how to assign value for *finalState > variable. Could you explain for me how does it affect when decoding? I > logged out the context when the system call “GetValue” function in my LM > and in SRILM LM, the number of contexts were different. > The set the finalState to a pointer that represent the context. For example, if you have a trigram LM, and the last trigram was 'a b c', then the finaState should represent 'b c'. SRI and IRST store their LM in a tree, the finalState is the memory address of node that stores the bigram 'b c'. KENLM isn't a trie, it sets the finalState to a hash of the words 'b c' > > > LMResult LanguageModelSRI::GetValue(VocabIndex wordId, VocabIndex > *context) const > > { > > LMResult ret; > > ret.score = FloorScore(TransformLMScore(m_srilmModel->wordProb( wordId, > context))); > > ret.unknown = (wordId == m_unknownId); > > return ret; > > } > > > > > Which is value of *ret.score*? Log Probability or Probability? > log probability > > > Best Regards, > > Huyen. > > > > _______________________________________________ > Moses-support mailing list > [email protected] > http://mailman.mit.edu/mailman/listinfo/moses-support > >
_______________________________________________ Moses-support mailing list [email protected] http://mailman.mit.edu/mailman/listinfo/moses-support
