From 95cfeaf3c73eb7459e46a8f94b602d334ccdd580 Mon Sep 17 00:00:00 2001 From: Taku Kudo Date: Tue, 15 Oct 2024 07:51:25 +0000 Subject: [PATCH] Suppress false-positive corrections with surrounding context. When TC is triggered, this module aggregates at most top 6 (3+3) literal and TC candidates with the same key. Then, run NSC reranker to decide literal-on-top. This feature has multiple mode 1. Only runs literal-on-top while keeping the original ranking. 2. Promote the predicted literal candidate that has the highest reranker score. 3. Promotes the predicted TC candidate too. PiperOrigin-RevId: 685995877 --- src/protocol/commands.proto | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/protocol/commands.proto b/src/protocol/commands.proto index ef7099a80..58a8af574 100644 --- a/src/protocol/commands.proto +++ b/src/protocol/commands.proto @@ -573,7 +573,7 @@ message Capability { [default = NO_TEXT_DELETION_CAPABILITY]; } -// Next ID: 100 +// Next ID: 102 // Bundles together some Android experiment flags so that they can be easily // retrieved throughout the native code. These flags are generally specific to // the decoder, and are made available when the decoder is initialized. @@ -597,6 +597,15 @@ message DecoderExperimentParams { // If zero, the previous implementation is used. optional int32 typing_correction_result_reranker_mode = 95 [default = 0]; + // Promote TC/Literal if w * tc_reranker_score + (1.0 - w) lm_diff > 0.0. + optional float typing_correction_result_reranker_interpolation_weight = 100 + [default = 0.0]; + + // Runs Literal-at-least second when original_tc_score + w * tc_reranker_score + // > 0.0. otherwise, runs literal-on-top. + optional float typing_correction_result_reranker_literal_on_top_weight = 101 + [default = 0.0]; + // Uses the typing correction in user history predictor. The size specifies // the maximum number of typing corrections used for query lookup. // When zero, typing_correction is not used.