Hi,
This isn't really a moses question, so please follow up with me if you
need support for KenLM. The model.score function is declared as:
def score(self, sentence, bos = True, eos = True)
Thus if you want the same as running query with null,
model.score(sentence, False, False)
Kenneth
On 03/26/2015 04:55 PM, Arda Tezcan wrote:
> Hi,
> I was wondering if the python api for KENLM supports also querying just
> strings?
> As far as I could see from the description it seems to let you query
> only sentences (but maybe I missed something):
>
> sentence = 'this is a sentence .'
> print(model.score(sentence))
>
>
> If I query a (non-sentence) string with this function I get much lower
> scores compared to querying directly from the command line with the
> “null” option (which gives the expected results).
> Is it possible that “score” function is maybe adding sentence boundaries
> to the input string before querying?
>
> Thanks in advance,
> Arda
>
>
> _______________________________________________
> 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