| Property | Data type | Description |
|---|---|---|
position | rect | 文档中该文本字符串所在矩形区域的坐标。 |
confidence | confidence | 该字符串文本被正确识别的置信度。基于构成该字符串的各个单词的置信度计算。 |
text | string | 元素的字符串值。 |
charParams | object | 与字体格式相关的参数。 |
words | object array | 由构成该文本字符串的单词组成的数组。元素顺序与阅读顺序完全一致。 |
CharParams 元素
| Property | Data type | Description |
|---|---|---|
bold | boolean | 表示字体样式为粗体。 |
italic | boolean | 表示字体样式为斜体。 |
underlined | boolean | 表示字体样式为下划线。 |
strikeout | boolean | 表示字体样式为删除线。 |
smallCaps | boolean | 表示字体为小型大写。 |
superscript | boolean | 表示上标字体属性。 |
subscript | boolean | 表示下标字体属性。 |
scaling | integer | 字体缩放(默认值为 1000)。 |
spacing | integer | 字符间距,单位为 twip(1/20 pt,1/1440 inch)。 |
fontSize | integer | 字体大小属性,单位为 twip(1/20 pt,1/1440 inch)。 |
fontName | string | 字体名称。 |
color | string | 字体颜色(6 位十六进制格式 RRGGBB)。 |
lang | string | 字符语言。由语言和国家/地区部分组成,请参阅 ISO 639 和 ISO 3166。 |
Words 数组元素
| 属性 | 数据类型 | 说明 |
|---|---|---|
position | rect | 单词在文档中所在矩形区域的坐标。 |
confidence | confidence | 该单词被正确识别的置信度等级。基于构成该单词的字符置信度值计算。 |
text | string | 该单词的字符串值。 |
chars | object array | 构成该单词的字符数组。数组中的元素按阅读顺序排列。 |
chars 数组元素
| Property | Data type | Description |
|---|---|---|
confidence | confidence | 该字符被正确识别的置信度。 |
text | string | 该字符的字符串值。 |
position | rect | 文档中该字符所在矩形区域的坐标。 |
