BigQuery Data QnA V1alpha API - Class Google::Cloud::DataQnA::V1alpha::AnnotatedString (v0.6.0)

Reference documentation and code samples for the BigQuery Data QnA V1alpha API class Google::Cloud::DataQnA::V1alpha::AnnotatedString.

Describes string annotation from both semantic and formatting perspectives. Example:

User Query:

top countries by population in Africa

0 4 14 17 28 31 37

Table Data:

  • "country" - dimension
  • "population" - metric
  • "Africa" - value in the "continent" column

text_formatted = "top countries by population in Africa"

html_formatted = "top <b>countries</b> by <b>population</b> in <i>Africa</i>"

markups = [ \{DIMENSION, 4, 12}, // 'countries' \{METRIC, 17, 26}, // 'population' \{FILTER, 31, 36} // 'Africa' ]

Note that html formattings for 'DIMENSION' and 'METRIC' are the same, while semantic markups are different.

Inherits

  • Object

Extended By

  • Google::Protobuf::MessageExts::ClassMethods

Includes

  • Google::Protobuf::MessageExts

Methods

#html_formatted

def html_formatted() -> ::String
Returns
  • (::String) — HTML version of the string annotation.

#html_formatted=

def html_formatted=(value) -> ::String
Parameter
  • value (::String) — HTML version of the string annotation.
Returns
  • (::String) — HTML version of the string annotation.

#markups

def markups() -> ::Array<::Google::Cloud::DataQnA::V1alpha::AnnotatedString::SemanticMarkup>
Returns

#markups=

def markups=(value) -> ::Array<::Google::Cloud::DataQnA::V1alpha::AnnotatedString::SemanticMarkup>
Parameter
Returns

#text_formatted

def text_formatted() -> ::String
Returns
  • (::String) — Text version of the string.

#text_formatted=

def text_formatted=(value) -> ::String
Parameter
  • value (::String) — Text version of the string.
Returns
  • (::String) — Text version of the string.