dongsheng9203 2016-05-31 04:07
浏览 50

可以使用MySQL函数实现语言检测吗?

Now there are two questions.

  1. How to realize the automatic detection of text language?
  2. Can it be achieved through the MySQL function?

If the second question`s answer is true, it will become one question, that is how to make it come true?

In fact, I'm curious about the Google Translate. It can automatically detect the language that is used, although it certainly did not use the MySQL to achieve. I hope to get a reply from MYSQL.

As far as I can see, each country has its own Unicode range, and MySQL has a lot of conversion functions, and for PHP function — mb_detect_encoding — Detect character encoding, so I wonder if there is a similar approach to do it.

And for my MySQL records, they are saved with UTF-8 encoding (DEFAULT CHARSET=utf8). When using an SQL query it default through itself inside decoders like CONVERT(rs USING utf8), so can we try to use all of encodings like CONVERT(rs USING xxx) in one loop, and which does not exceed the scope of expression, it will be the right encode.

  • 写回答

1条回答 默认 最新

  • douzong5473 2016-05-31 05:20
    关注

    No, there is no way to automatically detect language in MySQL. Detecting language is not a trivial task, you will have to analyze the content and run it through some kind of language detection parser.

    UTF-8 encoding/decoding is another game entirely.

    See: How does language detection work?

    评论

报告相同问题?

悬赏问题

  • ¥15 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题