Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(246)

Side by Side Diff: components/translate/core/browser/proto/ranker_model.proto

Issue 2565873002: [translate] Add translate ranker model loader. (Closed)
Patch Set: comments from sdefresne Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 //
5 // Experimental Translation Assist Model to allow/suppress translation prompts.
6
7 syntax = "proto2";
8
9 option optimize_for = LITE_RUNTIME;
10
11 import "translate_ranker_model.proto";
12
13 package chrome_intelligence;
14
15 // Metadata for a ranker model instance. This data describes how the ranker
16 // model should be interpreted/used.
17 message RankerModelMetadata {
18 // An identifier denoting the type or purpose of this model.
19 optional string name = 1;
20
21 // An identifier denoting the specific instance of this model. For example:
22 // "Experiment B"
23 optional string label = 2;
24
25 // An identifier, typically a URL, denoting the source from which this model
26 // was obtained. The model referenced with a given source is presumed to be
27 // immutable; this can be used as a cache control mechanism. If the currently
28 // configured model source matches the source of a cached model, and the
29 // cached model has not expired then there is no need to refresh the model.
30 optional string source = 3;
31
32 // The timestamp at which this model was downloaded. This will be set by the
33 // model loader before it caches the model to disk.
34 optional int64 last_modified_sec = 4;
35
36 // The (optional) number of seconds after which this model should be
37 // considered expired. If the value is zero or not set, then the cached
38 // instance of the model never expires. A new download can be triggered by
39 // changing the configured source URL for the model loader.
40 optional int64 cache_duration_sec = 5;
41 }
42
43 // Defines an envelope/wrapper for general models.
44 message RankerModelProto {
45 // Metadata.
46 optional RankerModelMetadata metadata = 1;
47
48 oneof model { TranslateRankerModel translate = 2; }
49 }
OLDNEW
« no previous file with comments | « components/translate/core/browser/proto/BUILD.gn ('k') | components/translate/core/browser/proto/translate_ranker_model.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698