word-discovery icon indicating copy to clipboard operation
word-discovery copied to clipboard

ValueError: Failed to count ngrams by KenLM.

Open currenttime opened this issue 5 years ago • 8 comments

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

currenttime avatar Jan 13 '20 09:01 currenttime

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

bojone avatar Jan 13 '20 10:01 bojone

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

wwt1991wwz avatar Mar 17 '20 07:03 wwt1991wwz

那就自己重新编译count_ngrams。

bojone avatar Mar 17 '20 08:03 bojone

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

lorylee avatar Sep 02 '20 10:09 lorylee

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

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

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

YingZhuY avatar Mar 17 '21 11:03 YingZhuY

@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不成功怎么办……

Zhya1124 avatar Jan 03 '22 06:01 Zhya1124

+10086.。。。

wuyi98 avatar Apr 10 '22 06:04 wuyi98

cmake ..

brew install boost

Vickshine avatar May 15 '22 11:05 Vickshine