Delen via


Text Moderation - Detect Language

Met deze bewerking wordt de taal van de invoerinhoud gedetecteerd. Het retourneert de ISO 639-3-code voor de overheersende taal in de ingediende tekst. Er worden meer dan 110 talen ondersteund.

POST {Endpoint}/contentmoderator/moderate/v1.0/ProcessText/DetectLanguage

URI-parameters

Name In Vereist Type Description
Endpoint
path True

string

Ondersteunde Azure Cognitive Services-eindpunten (protocol- en hostnaam, zoals https://westus.api.cognitive.microsoft.com).

Aanvraagkoptekst

Media Types: "text/plain", "text/html", "text/xml", "text/markdown"

Name Vereist Type Description
Ocp-Apim-Subscription-Key True

string

Content-Type True

string

Inhoudstype.

Aanvraagbody

Media Types: "text/plain", "text/html", "text/xml", "text/markdown"

Name Type Description
Text Content

object

Inhoud op het scherm.

Antwoorden

Name Type Description
200 OK

DetectedLanguage

Taalresultaat gedetecteerd.

Other Status Codes

APIError

Foutreactie.

Beveiliging

Ocp-Apim-Subscription-Key

Type: apiKey
In: header

Voorbeelden

Detect Language request

Voorbeeldaanvraag

POST {Endpoint}/contentmoderator/moderate/v1.0/ProcessText/DetectLanguage



"Is this a crap email abcdef@abcd.com, phone: 6657789887, IP: 255.255.255.255, 1 Microsoft Way, Redmond, WA 98052"

Voorbeeldrespons

{
  "DetectedLanguage": "eng",
  "Status": {
    "Code": 3000,
    "Description": "OK",
    "Exception": ""
  },
  "TrackingId": "2826a49-b976-419e-98e8-c5532c1n78c6"
}

Definities

Name Description
APIError

Foutinformatie die door de API wordt geretourneerd.

DetectedLanguage

Taalresultaat gedetecteerd.

Error

Fouttekst.

Status

Statuseigenschappen.

APIError

Foutinformatie die door de API wordt geretourneerd.

Name Type Description
Error

Error

Fouttekst.

DetectedLanguage

Taalresultaat gedetecteerd.

Name Type Description
DetectedLanguage

string

Taal gedetecteerd.

Status

Status

Taalstatus gedetecteerd.

TrackingId

string

Tracerings-id.

Error

Fouttekst.

Name Type Description
Code

string

Message

string

Status

Statuseigenschappen.

Name Type Description
Code

integer

Statuscode.

Description

string

Statusbeschrijving.

Exception

string

Uitzonderingsstatus.