public sealed class AnnotatedString : IMessage<AnnotatedString>, IEquatable<AnnotatedString>, IDeepCloneable<AnnotatedString>, IBufferMessage, IMessage
Reference documentation and code samples for the Data QnA v1alpha API class 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>"
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eAnnotatedString\u003c/code\u003e class in the Data QnA v1alpha API describes string annotations from both semantic and formatting perspectives, useful for understanding the meaning and presentation of text.\u003c/p\u003e\n"],["\u003cp\u003eThis class provides properties like \u003ccode\u003eHtmlFormatted\u003c/code\u003e and \u003ccode\u003eTextFormatted\u003c/code\u003e to represent the string in HTML and plain text formats, respectively.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eMarkups\u003c/code\u003e property, which is of type \u003ccode\u003eRepeatedField<AnnotatedString.Types.SemanticMarkup>\u003c/code\u003e, is used to store the semantic markups, indicating the meaning of different parts of the string.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eAnnotatedString\u003c/code\u003e class implements several interfaces, including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, providing functionality for message handling, equality comparison, deep cloning, and buffer operations.\u003c/p\u003e\n"]]],[],null,[]]