Analyze text with Azure AI Language

Untitled

การใช้งานเหมือนปกติเลย สร้าง Resource ตามงาน > สร้าง Endpoint + Key เพื่อใช้

Detect language

เป็น REST โดยมีข้อกำหนด

JSON response

Ref: Detect language - Training | Microsoft Learn

{
    "kind": "LanguageDetection",
    "parameters": {
        "modelVersion": "latest"
    },
    "analysisInput":{
        "documents":[
              {
                "id": "1",
                "text": "Hello world",
                "countryHint": "US"
              },
              {
                "id": "2",
                "text": "Bonjour tout le monde"
              }
        ]
    }
}

Extract key phrases

input

{
    "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."
            }
        ]
    }
}

Analyze sentiment