• Jing Wang's avatar
    Integrate grammar check into spell check component. · 5a85be43
    Jing Wang authored
    Implemented a first version of grammar check client, which just throw
    the entire requested text to grammar service and if it returns with any
    suggestion other than the original text, we will mark the whole sentence
    and show the suggestion in context menu.
    
    Design doc of the feature: go/cros-grammar
    Screenshot of the feature:
    https://screenshot.googleplex.com/BqkRhx6BYC2LPiF
    
    This feature is ChromeOS only and is hidden behind a by-default disabled
    flag. When the flag is enabled, and when enhanced spell check is
    enabled, we will call grammar check when enhanced spell checker detects
    no spell errors and display grammar error if we find any.
    
    It is not ideal to always check the entire input and mark the whole
    sentence. The feature is to be improved in the follow-up CLs, but I
    think this is good enough as a first version.
    
    Bug: 1132699
    Test: tested on DUT
    Change-Id: Ie2a8ca99e2f6910e9eef6bb3c7eb5da980a4db92
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2585245
    Commit-Queue: Jing Wang <jiwan@chromium.org>
    Reviewed-by: default avatarTim Volodine <timvolodine@chromium.org>
    Reviewed-by: default avatarDarren Shen <shend@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#840062}
    5a85be43
grammar_service_client.cc 3.08 KB