Update grammar check mojo api and service client.
1. Uprev mojo api of grammar check from chromeos. The mojom interface is generated with the script "chromeos/services/machine_learning/public/mojom/roll_mojoms.sh" from https://chromium-review.googlesource.com/c/chromiumos/platform2/+/2611147 this change need to be submitted after it. 2. The new api will return correction fragments, so update the service client accordingly, now the grammar correct results are parsed from fragments. 3. Don't show grammar error when the proposal is to delete the whole sentence, i.e. when result->candidates.at(0)->text.empty() is true. 4. Update unit tests, in ServiceConnectionTest, move LoadGrammarModel test before soda test so that it won't crash. Bug: 1132699 Test: Passed unit tests, also manually tested on nocturne. Change-Id: I85529f3a26f134e5eea7785bae5ac9c7f9e776f8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2612788 Commit-Queue: Jing Wang <jiwan@chromium.org> Reviewed-by:Daniel Cheng <dcheng@chromium.org> Reviewed-by:
Honglin Yu <honglinyu@chromium.org> Reviewed-by:
Darren Shen <shend@chromium.org> Cr-Commit-Position: refs/heads/master@{#845006}
Showing
Please register or sign in to comment