gives errors with libc++ 3.8.0:
gmake[2]: Entering directory '/wrkdirs/usr/ports/chinese/sunpinyin/work'
slmpack lm_sc.3gm.arpa dict.utf8 lm_sc.3gm
Loading lexicon...done.
Loading ARPA slm...
Writing out...done!
slmthread lm_sc.3gm lm_sc.t3g.orig
Loading original slm...
first pass...
Compressing pr values...65536 float values ==> 65536 values
Compressing bow values...16384 float values ==> 16384 values
Threading the new model...Assertion failed: (prit != pr_map.end()), function main, file src/slm/thread/slmthread.cpp, line 364.
/wrkdirs/usr/ports/chinese/sunpinyin/work/sunpinyin-a8bd811/src/sunpinyin-dictgen.mk:51: recipe for target 'lm_sc.t3g.orig' failed
This is because the code mostly uses floats, but in some parts it uses
log(), exp(), etc, which return doubles. During the parts where it does
lookups in std::map<float, int> constructs, this leads to it not being
able to find the expected entries. Fix this by using logf(), expf() and
similar, which explicitly return floats.
Approved by: lichray@gmail.com (maintainer)
PR: 209369
MFH: 2016Q2