擷取關鍵詞組
關鍵片語擷取是評估文件的文字過程,然後識別文件上下文中的主要內容。
關鍵片語擷取最適合用於較大的檔(可分析的大小上限為5,120個字元)。
如同語言偵測,REST 介面可讓您提交一或多個文件進行分析。
{
"kind": "KeyPhraseExtraction",
"parameters": {
"modelVersion": "latest"
},
"analysisInput":{
"documents":[
{
"id": "1",
"language": "en",
"text": "You must be the change you wish
to see in the world."
},
{
"id": "2",
"language": "en",
"text": "The journey of a thousand miles
begins with a single step."
}
]
}
}
回應包含每個檔案中偵測到的關鍵片語清單:
{
"kind": "KeyPhraseExtractionResults",
"results": {
"documents": [
{
"id": "1",
"keyPhrases": [
"change",
"world"
],
"warnings": []
},
{
"id": "2",
"keyPhrases": [
"miles",
"single step",
"journey"
],
"warnings": []
}
],
"errors": [],
"modelVersion": "2021-06-01"
}
}