libtextclassifier: fix a "divide-by-zero" bug. Fix the bug and be consistent with upstream's CL: cl/309912555 BUG=chromium:1077405 TEST=unit test of ml-serivce passed. Change-Id: I6084e011cb5819c889f47add17d7c72bf9b26831 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/libtextclassifier/+/2181935 Reviewed-by: Lukas Zilka <[email protected]> Reviewed-by: Andrew Moylan <[email protected]> Commit-Queue: Honglin Yu <[email protected]> Tested-by: Honglin Yu <[email protected]>
A library for on-device text classification (address, telephone number, emails etc.).
To use libtextclassifier, one also needs to install a flatbuffer model defined in “model.fbs”. For simplicity, this model file will be installed in the ebuild of ml-service.
And libtextclassifier currently depends on the chrome-icu package which requires explicitly initializing the icu data, just like chrome.
The ml-service is currently the only user of this library. If another library in Chrome OS also wants to use it, please let the owners of ml-service and libtextclassifier know because then,