Skip to content

gv22ga/kenlm-cpp-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

kenlm-cpp-example

Basic setup to use kenlm library in cpp

Setup kenlm

git clone https://github.com/kpu/kenlm.git
cd kenlm
mkdir -p build
cd build
cmake ..
make -j 4

If you get any compilations errors, then please check if you have all the dependencies installed link

Run example

Copy example.cpp to the parent directory of kenlm clone
You need to configure the path for your kenlm .binary or .arpa in example.cpp. Read the 'estimation' section of the readme here for instructions to create a kenlm binary.

g++ example.cpp -DKENLM_MAX_ORDER=6 -Ikenlm -Lkenlm/build/lib -lkenlm -lkenlm_util -lz -llzma -lbz2 -o example
./example

Releases

No releases published

Packages

No packages published

Languages