commit | 8deeca979cebbd55099d64f8c04c95b4ece8bfa1 | [log] [tgz] |
---|---|---|
author | George Burgess IV <gbiv@google.com> | Wed Sep 06 20:24:13 2023 |
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Oct 04 00:23:39 2023 |
tree | b87f4c53fa542b0620715e7f4911e3e15eb5d4a8 | |
parent | 5452b202f7d8d804c180680076b4dfe830e6b20d [diff] |
unilib: fix overflow bugs Two changes in one: - Clang will soon turn this code into an error, so add `static_cast`s to signal that the change of value (referenced in comments) is OK. - Trade `>=` for `>`, since the former will incorrectly reject values at `numeric_limits<T>::max()`. Do the same for `min`. BUG=b:296451257 TEST=emerge-brya libtextclassifer Change-Id: Id1a44bd1e6406b21a17106eed6ccdfaf8ad767b6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/libtextclassifier/+/4847326 Reviewed-by: Andrew Moylan <amoylan@chromium.org> Commit-Queue: George Burgess <gbiv@chromium.org> Tested-by: George Burgess <gbiv@chromium.org>
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,