Textanalysis, healthcare in german

Djamel Ziane 5 Reputation points
2023-04-29T04:33:57.3733333+00:00

Hello Together

Is it possible to use the healthcare (Textanalysis) service for German Text? Thank your for the answer.

Djamel

Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
2,974 questions
{count} vote

2 answers

Sort by: Most helpful
  1. Dillon Silzer 57,471 Reputation points
    2023-04-29T20:00:37.5166667+00:00

    Hello Djamel,

    It looks like German is supported for Text Analytics for health:

    https://learn.microsoft.com/en-us/azure/cognitive-services/language-service/text-analytics-for-health/language-support#hosted-api-service

    The hosted API service supports English language, model version 03-01-2022. Additional languages, English, Spanish, French, German Italian, Portuguese and Hebrew are supported with model version 2022-08-15-preview.

    When structuring the API request, the relevant language tags must be added for these languages:

    Example (change es to de):

    json
    
    {
        "analysisInput": {
            "documents": [
                {
                    "text": "El médico prescrió 200 mg de ibuprofeno.",
                    "language": "es",
                    "id": "1"
                }
            ]
        },
        "tasks": [
            {
                "taskName": "analyze 1",
                "kind": "Healthcare",
                "parameters":
                {
                "modelVersion": "2022-08-15-preview"
                }
            }
        ]
    }
    

    If this is helpful please accept answer.

    0 comments No comments

  2. Konstantinos Passadis 19,276 Reputation points MVP
    2023-05-01T14:11:07.5733333+00:00

    Hello @Djamel Ziane

    Yes, the Azure Healthcare Text Analytics service supports German language. You can use the Text Analytics API with the "de" language code to analyze German text.

    The Healthcare Text Analytics service provides pre-built models specifically designed for analyzing clinical and medical text, including electronic health records, medical literature, and other healthcare-related documents. The service can perform tasks such as entity recognition, sentiment analysis, and key phrase extraction, which can be useful for a variety of healthcare use cases.

    To use the Healthcare Text Analytics service with German text, you can send a request to the Text Analytics API with the "de" language code specified in the language parameter. Here is an example request using the Text Analytics API in C#

    // Replace with your Text Analytics API endpoint and subscription key
    string endpoint = "https://<your-api-endpoint>.cognitiveservices.azure.com/";
    string subscriptionKey = "<your-subscription-key>";
    
    // Replace with your German text to analyze
    string text = "Ein Mann geht spazieren in einem Park.";
    
    // Create a Text Analytics client
    var client = new TextAnalyticsClient(new Uri(endpoint), new AzureKeyCredential(subscriptionKey));
    
    // Analyze the German text
    var result = await client.AnalyzeSentimentAsync(text, "de");
    
    // Display the sentiment score
    Console.WriteLine($"Sentiment score: {result.Value.SentimentScore}");
    

    This example analyzes the sentiment of German text and displays the sentiment score. You can modify this example to perform other text analysis tasks using the Text Analytics API.

    Kindly mark this answer as Accepted in case it helped or post your feedback !

    Regards

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.