How to determine a string is english or arabic?

后端 未结 8 1184
我寻月下人不归
我寻月下人不归 2021-01-31 17:47

Is there a way to determine a string is English or Arabic?

8条回答
  •  感情败类
    2021-01-31 18:10

    You could use N-gram-based text categorization (google for that phrase) but it is not a fail-proof technique, and it may require a not too short string.

    You might also decide that a string with only ASCII letters is not Arabic.

提交回复
热议问题