Text Moderation - Detect Language
Den här åtgärden identifierar språket för indatainnehåll. Den returnerar ISO 639-3-koden för det dominerande språket i den skickade texten. Mer än 110 språk stöds.
POST {Endpoint}/contentmoderator/moderate/v1.0/ProcessText/DetectLanguage
URI-parametrar
Name | I | Obligatorisk | Typ | Description |
---|---|---|---|---|
Endpoint
|
path | True |
string |
Azure Cognitive Services-slutpunkter som stöds (protokoll och värdnamn, till exempel https://westus.api.cognitive.microsoft.com). |
Begärandehuvud
Media Types: "text/plain", "text/html", "text/xml", "text/markdown"
Name | Obligatorisk | Typ | Description |
---|---|---|---|
Ocp-Apim-Subscription-Key | True |
string |
|
Content-Type | True |
string |
Innehållstyp. |
Begärandetext
Media Types: "text/plain", "text/html", "text/xml", "text/markdown"
Name | Typ | Description |
---|---|---|
Text Content |
object |
Innehåll på skärmen. |
Svar
Name | Typ | Description |
---|---|---|
200 OK |
Det identifierade språkresultatet. |
|
Other Status Codes |
Felsvar. |
Säkerhet
Ocp-Apim-Subscription-Key
Typ:
apiKey
I:
header
Exempel
Detect Language request
Exempelbegäran
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"
Exempelsvar
{
"DetectedLanguage": "eng",
"Status": {
"Code": 3000,
"Description": "OK",
"Exception": ""
},
"TrackingId": "2826a49-b976-419e-98e8-c5532c1n78c6"
}
Definitioner
Name | Description |
---|---|
APIError |
Felinformation som API:et returnerar. |
Detected |
Det identifierade språkresultatet. |
Error |
Feltext. |
Status |
Statusegenskaper. |
APIError
Felinformation som API:et returnerar.
Name | Typ | Description |
---|---|---|
Error |
Feltext. |
DetectedLanguage
Det identifierade språkresultatet.
Name | Typ | Description |
---|---|---|
DetectedLanguage |
string |
Identifierat språk. |
Status |
Språkstatus har identifierats. |
|
TrackingId |
string |
Spårnings-ID. |
Error
Feltext.
Name | Typ | Description |
---|---|---|
Code |
string |
|
Message |
string |
Status
Statusegenskaper.
Name | Typ | Description |
---|---|---|
Code |
integer |
Statuskod. |
Description |
string |
Statusbeskrivning. |
Exception |
string |
Undantagsstatus. |