bojone / word-discovery

速度更快、效果更好的中文新词发现
508 stars 103 forks source link

ValueError: Failed to count ngrams by KenLM. #5

Open currenttime opened 4 years ago

currenttime commented 4 years ago

memory参数调大调小都不行,预料并不大,done=32512 ,一直报这个错误。

bojone commented 4 years ago

你把raise ValueError('Failed to count ngrams by KenLM.')那一句注释掉,看看能跑出正常结果不?

wwt1991wwz commented 4 years ago

报相同的错误 ./count_ngrams: error while loading shared libraries: libboost_program_options.so.1.58.0: cannot open shared object file: No such file or directory

bojone commented 4 years ago

那就自己重新编译count_ngrams。

lorylee commented 4 years ago

请问如何重新编译count_ngrams,会的东西比较少,还请多指教

YingZhuY commented 3 years ago

下载库后编译:(cd 到 kenlm 目录下)

mkdir -p build
cd build
cmake ..
make -j 4

编译完成后会生成 count_ngrams 文件。 运行前需要将 build/bin 目录下的 count_ngrams 文件复制到当前 word_discovery.py 相同目录下,即可。

Zhya1124 commented 2 years ago

@YingZhuY CMake Error at /opt/homebrew/Cellar/cmake/3.21.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find Boost (missing: Boost_INCLUDE_DIR program_options system thread unit_test_framework) (Required is at least version "1.41.0") Call Stack (most recent call first): /opt/homebrew/Cellar/cmake/3.21.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE) /opt/homebrew/Cellar/cmake/3.21.2/share/cmake/Modules/FindBoost.cmake:2345 (find_package_handle_standard_args) CMakeLists.txt:85 (find_package) cmake不成功怎么办……

wuyi98 commented 2 years ago

+10086.。。。

Vickshine commented 2 years ago

cmake ..

brew install boost