Text Moderation - Detect Language
Tato operace rozpozná jazyk vstupního obsahu. Vrátí kód ISO 639-3 pro převládající jazyk v odeslaném textu. Podporuje se více než 110 jazyků.
POST {Endpoint}/contentmoderator/moderate/v1.0/ProcessText/DetectLanguage
Parametry identifikátoru URI
Name | V | Vyžadováno | Typ | Description |
---|---|---|---|---|
Endpoint
|
path | True |
string |
Podporované koncové body služeb Azure Cognitive Services (protokol a název hostitele, například https://westus.api.cognitive.microsoft.com). |
Hlavička požadavku
Media Types: "text/plain", "text/html", "text/xml", "text/markdown"
Name | Vyžadováno | Typ | Description |
---|---|---|---|
Ocp-Apim-Subscription-Key | True |
string |
|
Content-Type | True |
string |
Typ obsahu. |
Text požadavku
Media Types: "text/plain", "text/html", "text/xml", "text/markdown"
Name | Typ | Description |
---|---|---|
Text Content |
object (file) |
Obsah na obrazovku |
Odpovědi
Name | Typ | Description |
---|---|---|
200 OK |
Zjištěný výsledek jazyka. |
|
Other Status Codes |
Chybová odpověď. |
Zabezpečení
Ocp-Apim-Subscription-Key
Typ:
apiKey
V:
header
Příklady
Detect Language request
Ukázkový požadavek
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"
Ukázková odpověď
{
"DetectedLanguage": "eng",
"Status": {
"Code": 3000,
"Description": "OK",
"Exception": ""
},
"TrackingId": "2826a49-b976-419e-98e8-c5532c1n78c6"
}
Definice
Name | Description |
---|---|
APIError |
Informace o chybě, které rozhraní API vrací |
Detected |
Zjištěný výsledek jazyka. |
Error |
Text chyby. |
Status |
Vlastnosti stavu |
APIError
Informace o chybě, které rozhraní API vrací
Name | Typ | Description |
---|---|---|
Error |
Text chyby. |
DetectedLanguage
Zjištěný výsledek jazyka.
Name | Typ | Description |
---|---|---|
DetectedLanguage |
string |
Zjištěný jazyk. |
Status |
Zjištěný stav jazyka. |
|
TrackingId |
string |
ID sledování |
Error
Text chyby.
Name | Typ | Description |
---|---|---|
Code |
string |
|
Message |
string |
Status
Vlastnosti stavu
Name | Typ | Description |
---|---|---|
Code |
integer |
Stavový kód. |
Description |
string |
Popis stavu |
Exception |
string |
Stav výjimky. |