synonymset.proto 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. // Copyright 2022 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. syntax = "proto3";
  15. package google.cloud.contentwarehouse.v1;
  16. import "google/api/resource.proto";
  17. option go_package = "google.golang.org/genproto/googleapis/cloud/contentwarehouse/v1;contentwarehouse";
  18. option java_multiple_files = true;
  19. option java_outer_classname = "SynonymSetProto";
  20. option java_package = "com.google.cloud.contentwarehouse.v1";
  21. // Represents a list of synonyms for a given context.
  22. // For example a context "sales" could contain:
  23. // Synonym 1: sale, invoice, bill, order
  24. // Synonym 2: money, credit, finance, payment
  25. // Synonym 3: shipping, freight, transport
  26. // Each SynonymSets should be disjoint
  27. message SynonymSet {
  28. option (google.api.resource) = {
  29. type: "contentwarehouse.googleapis.com/SynonymSet"
  30. pattern: "projects/{project}/locations/{location}/synonymSets/{context}"
  31. };
  32. // Represents a list of words given by the customer
  33. // All these words are synonyms of each other.
  34. message Synonym {
  35. // For example: sale, invoice, bill, order
  36. repeated string words = 1;
  37. }
  38. // The resource name of the SynonymSet
  39. // This is mandatory for google.api.resource.
  40. // Format:
  41. // projects/{project_number}/locations/{location}/synonymSets/{context}.
  42. string name = 1;
  43. // This is a freeform field. Example contexts can be "sales," "engineering,"
  44. // "real estate," "accounting," etc.
  45. // The context can be supplied during search requests.
  46. string context = 2;
  47. // List of Synonyms for the context.
  48. repeated Synonym synonyms = 3;
  49. }