下列 JSON 會 verbose
參數設定為 false
:
"entities": {
"geographyV2": [
{
"value": "the sphinx",
"type": "poi"
},
{
"value": "gizah",
"type": "city"
},
{
"value": "egypt",
"type": "countryRegion"
},
{
"value": "africa",
"type": "continent"
},
{
"value": "texas",
"type": "state"
}
]
}
在上述 JSON 中,poi
是景點的縮寫。
下列 JSON 會 verbose
參數設定為 true
:
"entities": {
"geographyV2": [
{
"value": "the sphinx",
"type": "poi"
},
{
"value": "gizah",
"type": "city"
},
{
"value": "egypt",
"type": "countryRegion"
},
{
"value": "africa",
"type": "continent"
},
{
"value": "texas",
"type": "state"
}
],
"$instance": {
"geographyV2": [
{
"type": "builtin.geographyV2.poi",
"text": "the sphinx",
"startIndex": 18,
"length": 10,
"modelTypeId": 2,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
]
},
{
"type": "builtin.geographyV2.city",
"text": "gizah",
"startIndex": 32,
"length": 5,
"modelTypeId": 2,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
]
},
{
"type": "builtin.geographyV2.countryRegion",
"text": "egypt",
"startIndex": 38,
"length": 5,
"modelTypeId": 2,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
]
},
{
"type": "builtin.geographyV2.continent",
"text": "africa",
"startIndex": 47,
"length": 6,
"modelTypeId": 2,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
]
},
{
"type": "builtin.geographyV2.state",
"text": "texas",
"startIndex": 72,
"length": 5,
"modelTypeId": 2,
"modelType": "Prebuilt Entity Extractor",
"recognitionSources": [
"model"
]
}
]
}
}
下列範例顯示 builtin.geographyV2 實體的解析。
"entities": [
{
"entity": "the sphinx",
"type": "builtin.geographyV2.poi",
"startIndex": 18,
"endIndex": 27
},
{
"entity": "gizah",
"type": "builtin.geographyV2.city",
"startIndex": 32,
"endIndex": 36
},
{
"entity": "egypt",
"type": "builtin.geographyV2.countryRegion",
"startIndex": 38,
"endIndex": 42
},
{
"entity": "africa",
"type": "builtin.geographyV2.continent",
"startIndex": 47,
"endIndex": 52
},
{
"entity": "texas",
"type": "builtin.geographyV2.state",
"startIndex": 72,
"endIndex": 76
},
{
"entity": "carol",
"type": "builtin.personName",
"startIndex": 0,
"endIndex": 4
}
]