i6_core.lib.lm

class i6_core.lib.lm.Lm(lm_path)

Interface to access the ngrams of an LM. Currently supports only LMs in arpa format.

Parameters:

lm_path (str) – Path to the LM file, currently supports only arpa files

get_ngrams(n)

returns all the ngrams of order n

load_arpa()
i6_core.lib.lm.not_ngrams(text: str)