how to resolve language detection incorrect problem ?

Max Chen 20 Reputation points
2024-03-26T04:37:24.9766667+00:00

Hi,

I use language detections service to check following "zh-cht" string. but I got a "zh-chs" result.

"你好,我明天要在桃園機場還wifi. 我是在第二航站領的,可以在第一航站還嗎?"

is any method to resolve this problem ?

Azure AI Language
Azure AI Language
An Azure service that provides natural language capabilities including sentiment analysis, entity extraction, and automated question answering.
408 questions
{count} votes

Accepted answer
  1. santoshkc 8,775 Reputation points Microsoft Vendor
    2024-03-26T07:05:15.3466667+00:00

    Hi @Max Chen,

    Thank you for providing more information about the issue. Based on your response, it seems like the language detection service is not able to correctly identify the language of the text because it contains both English and Traditional Chinese characters. This is causing the service to return a "zh-chs" result instead of a "zh-cht" result.

    I tried with your text with and without English characters along with Chinese characters. So, the Language Studio able to detect as "zh-cht" (see below image). I suggest that you separate the English and Traditional Chinese text into separate strings and run each string through the service separately. This will ensure that the service can correctly identify the language of each string.

    User's image

    Hope this helps. Do let us know if you any further queries.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

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.