Hi all,
when I try to use the azure text analysis API for healthcare data with a different language code, e.g. "de" I get the following error message:
"Invalid language code 'de'. Supported languages: en. For additional details see https://aka.ms/language-service/language-support"
When I check the documentation for the API it seems like the German language should be supported (see also this community question).
I am able to get results when using the "en" language code.
Here is an example request that produces the error:
POST /language/analyze-text/jobs?api-version=2023-04-01 HTTP/1.1
Host: our-host-url
Content-Type: application/json
Ocp-Apim-Subscription-Key: secret-key
Content-Length: 206
{
"analysisInput": {
"documents": [{
"text": "Arzt hat 200mg Ibuprufen verschrieben.",
"language": "de",
"id": "1"
}
]
},
"tasks": [{
"taskId": "analyze 1",
"kind": "Healthcare",
"parameters": {
"fhirVersion": "4.0.1"
}
}
]
}
Response:
{...
"status": "succeeded",
"errors": [],
"tasks": {
"completed": 1,
"failed": 0,
"inProgress": 0,
"total": 1,
"items": [{
"kind": "HealthcareLROResults",
"lastUpdateDateTime": "2024-01-23T20:23:01.5126897Z",
"status": "succeeded",
"results": {
"documents": [],
"errors": [{
"id": "1",
"error": {
"code": "InvalidArgument",
"message": "Invalid Language Code.",
"innererror": {
"code": "UnsupportedLanguageCode",
"message": "Invalid language code 'de'. Supported languages: en. For additional details see https://aka.ms/language-service/language-support"
}
}
}
],
"modelVersion": "2023-04-01"
}
}
]
}
}
I tried model version 2022-05-15-preview as well, which produced the same error.
It would be great if someone could let me know if this is a user error on my side or if this is a functionality that si not supported.
Thanks!