Class: Google::Cloud::Dialogflow::V2::Intent::TrainingPhrase

Inherits:
Object
  • Object
show all
Defined in:
lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/intent.rb

Overview

Represents an example or template that the agent is trained on.

Defined Under Namespace

Modules: Type Classes: Part

Instance Attribute Summary collapse

Instance Attribute Details

#nameString

Returns Required. The unique identifier of this training phrase.

Returns:

  • (String)

    Required. The unique identifier of this training phrase.



130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
# File 'lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/intent.rb', line 130

class TrainingPhrase
  # Represents a part of a training phrase.
  # @!attribute [rw] text
  #   @return [String]
  #     Required. The text corresponding to the example or template,
  #     if there are no annotations. For
  #     annotated examples, it is the text for one of the example's parts.
  # @!attribute [rw] entity_type
  #   @return [String]
  #     Optional. The entity type name prefixed with +@+. This field is
  #     required for the annotated part of the text and applies only to
  #     examples.
  # @!attribute [rw] alias
  #   @return [String]
  #     Optional. The parameter name for the value extracted from the
  #     annotated part of the example.
  # @!attribute [rw] user_defined
  #   @return [true, false]
  #     Optional. Indicates whether the text was manually annotated by the
  #     developer.
  class Part; end

  # Represents different types of training phrases.
  module Type
    # Not specified. This value should never be used.
    TYPE_UNSPECIFIED = 0

    # Examples do not contain @-prefixed entity type names, but example parts
    # can be annotated with entity types.
    EXAMPLE = 1

    # Templates are not annotated with entity types, but they can contain
    # @-prefixed entity type names as substrings.
    TEMPLATE = 2
  end
end

#partsArray<Google::Cloud::Dialogflow::V2::Intent::TrainingPhrase::Part>

Returns Required. The collection of training phrase parts (can be annotated). Fields: +entity_type+, +alias+ and +user_defined+ should be populated only for the annotated parts of the training phrase.

Returns:



130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
# File 'lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/intent.rb', line 130

class TrainingPhrase
  # Represents a part of a training phrase.
  # @!attribute [rw] text
  #   @return [String]
  #     Required. The text corresponding to the example or template,
  #     if there are no annotations. For
  #     annotated examples, it is the text for one of the example's parts.
  # @!attribute [rw] entity_type
  #   @return [String]
  #     Optional. The entity type name prefixed with +@+. This field is
  #     required for the annotated part of the text and applies only to
  #     examples.
  # @!attribute [rw] alias
  #   @return [String]
  #     Optional. The parameter name for the value extracted from the
  #     annotated part of the example.
  # @!attribute [rw] user_defined
  #   @return [true, false]
  #     Optional. Indicates whether the text was manually annotated by the
  #     developer.
  class Part; end

  # Represents different types of training phrases.
  module Type
    # Not specified. This value should never be used.
    TYPE_UNSPECIFIED = 0

    # Examples do not contain @-prefixed entity type names, but example parts
    # can be annotated with entity types.
    EXAMPLE = 1

    # Templates are not annotated with entity types, but they can contain
    # @-prefixed entity type names as substrings.
    TEMPLATE = 2
  end
end

#times_added_countInteger

Returns Optional. Indicates how many times this example or template was added to the intent. Each time a developer adds an existing sample by editing an intent or training, this counter is increased.

Returns:

  • (Integer)

    Optional. Indicates how many times this example or template was added to the intent. Each time a developer adds an existing sample by editing an intent or training, this counter is increased.



130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
# File 'lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/intent.rb', line 130

class TrainingPhrase
  # Represents a part of a training phrase.
  # @!attribute [rw] text
  #   @return [String]
  #     Required. The text corresponding to the example or template,
  #     if there are no annotations. For
  #     annotated examples, it is the text for one of the example's parts.
  # @!attribute [rw] entity_type
  #   @return [String]
  #     Optional. The entity type name prefixed with +@+. This field is
  #     required for the annotated part of the text and applies only to
  #     examples.
  # @!attribute [rw] alias
  #   @return [String]
  #     Optional. The parameter name for the value extracted from the
  #     annotated part of the example.
  # @!attribute [rw] user_defined
  #   @return [true, false]
  #     Optional. Indicates whether the text was manually annotated by the
  #     developer.
  class Part; end

  # Represents different types of training phrases.
  module Type
    # Not specified. This value should never be used.
    TYPE_UNSPECIFIED = 0

    # Examples do not contain @-prefixed entity type names, but example parts
    # can be annotated with entity types.
    EXAMPLE = 1

    # Templates are not annotated with entity types, but they can contain
    # @-prefixed entity type names as substrings.
    TEMPLATE = 2
  end
end

#typeGoogle::Cloud::Dialogflow::V2::Intent::TrainingPhrase::Type

Returns Required. The type of the training phrase.

Returns:



130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
# File 'lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/intent.rb', line 130

class TrainingPhrase
  # Represents a part of a training phrase.
  # @!attribute [rw] text
  #   @return [String]
  #     Required. The text corresponding to the example or template,
  #     if there are no annotations. For
  #     annotated examples, it is the text for one of the example's parts.
  # @!attribute [rw] entity_type
  #   @return [String]
  #     Optional. The entity type name prefixed with +@+. This field is
  #     required for the annotated part of the text and applies only to
  #     examples.
  # @!attribute [rw] alias
  #   @return [String]
  #     Optional. The parameter name for the value extracted from the
  #     annotated part of the example.
  # @!attribute [rw] user_defined
  #   @return [true, false]
  #     Optional. Indicates whether the text was manually annotated by the
  #     developer.
  class Part; end

  # Represents different types of training phrases.
  module Type
    # Not specified. This value should never be used.
    TYPE_UNSPECIFIED = 0

    # Examples do not contain @-prefixed entity type names, but example parts
    # can be annotated with entity types.
    EXAMPLE = 1

    # Templates are not annotated with entity types, but they can contain
    # @-prefixed entity type names as substrings.
    TEMPLATE = 2
  end
end