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
- (::String) — HTML version of the string annotation.
#html_formatted=
def html_formatted=(value) -> ::String
- value (::String) — HTML version of the string annotation.
- (::String) — HTML version of the string annotation.
#markups
def markups() -> ::Array<::Google::Cloud::DataQnA::V1alpha::AnnotatedString::SemanticMarkup>
- (::Array<::Google::Cloud::DataQnA::V1alpha::AnnotatedString::SemanticMarkup>) — Semantic version of the string annotation.
#markups=
def markups=(value) -> ::Array<::Google::Cloud::DataQnA::V1alpha::AnnotatedString::SemanticMarkup>
- value (::Array<::Google::Cloud::DataQnA::V1alpha::AnnotatedString::SemanticMarkup>) — Semantic version of the string annotation.
- (::Array<::Google::Cloud::DataQnA::V1alpha::AnnotatedString::SemanticMarkup>) — Semantic version of the string annotation.
#text_formatted
def text_formatted() -> ::String
- (::String) — Text version of the string.
#text_formatted=
def text_formatted=(value) -> ::String
- value (::String) — Text version of the string.
- (::String) — Text version of the string.