kpu / kenlm

KenLM: Faster and Smaller Language Model Queries
http://kheafield.com/code/kenlm/
Other
2.5k stars 513 forks source link

Train LM with pip installed kenlm #447

Open bchinnari opened 4 months ago

bchinnari commented 4 months ago

Hello,

I am getting errors installing kenLM, on macOS, with the official git repo. However , I am able to install kenLM quickly using pip. Is there a way to train an LM by importing kenLM library in python.

import kenlm 

I saw kenlm.Model(), kenlm.LM(). But is there a way to get an arpa model out given some text using kenlm library in python.