Class: Google::Apis::TranslateV3::GlossaryConfig
- Inherits:
-
Object
- Object
- Google::Apis::TranslateV3::GlossaryConfig
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/translate_v3/classes.rb,
lib/google/apis/translate_v3/representations.rb,
lib/google/apis/translate_v3/representations.rb
Overview
Configures which glossary is used for a specific target language and defines options for applying that glossary.
Instance Attribute Summary collapse
-
#contextual_translation_enabled ⇒ Boolean
(also: #contextual_translation_enabled?)
Optional.
-
#glossary ⇒ String
Required.
-
#ignore_case ⇒ Boolean
(also: #ignore_case?)
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GlossaryConfig
constructor
A new instance of GlossaryConfig.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GlossaryConfig
Returns a new instance of GlossaryConfig.
1093 1094 1095 |
# File 'lib/google/apis/translate_v3/classes.rb', line 1093 def initialize(**args) update!(**args) end |
Instance Attribute Details
#contextual_translation_enabled ⇒ Boolean Also known as: contextual_translation_enabled?
Optional. If set to true, the glossary will be used for contextual translation.
Corresponds to the JSON property contextualTranslationEnabled
1076 1077 1078 |
# File 'lib/google/apis/translate_v3/classes.rb', line 1076 def contextual_translation_enabled @contextual_translation_enabled end |
#glossary ⇒ String
Required. The glossary to be applied for this translation. The format
depends on the glossary: - User-provided custom glossary: projects/project-
number-or-id/locations/location-id/glossaries/glossary-id`
Corresponds to the JSON propertyglossary`
1084 1085 1086 |
# File 'lib/google/apis/translate_v3/classes.rb', line 1084 def glossary @glossary end |
#ignore_case ⇒ Boolean Also known as: ignore_case?
Optional. Indicates match is case insensitive. The default value is false if
missing.
Corresponds to the JSON property ignoreCase
1090 1091 1092 |
# File 'lib/google/apis/translate_v3/classes.rb', line 1090 def ignore_case @ignore_case end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1098 1099 1100 1101 1102 |
# File 'lib/google/apis/translate_v3/classes.rb', line 1098 def update!(**args) @contextual_translation_enabled = args[:contextual_translation_enabled] if args.key?(:contextual_translation_enabled) @glossary = args[:glossary] if args.key?(:glossary) @ignore_case = args[:ignore_case] if args.key?(:ignore_case) end |