简体   繁体   English

从数据库列中检测字符串值的语言

[英]Detecting language of string value from a database column

I have a school project idea and would like to ask for your advice on how to implement it.我有一个学校项目的想法,想请教您如何实施。

I would like to create an application which will enable users to upload a data file.我想创建一个应用程序,使用户能够上传数据文件。 The application should be able to detect the language (french, english, etc) of a text field and populate the language column with the value.应用程序应该能够检测文本字段的语言(法语、英语等)并用值填充语言列。 I can initially only implement a few languages, and the application should maybe give the probability of the language in the language column.我最初只能实现几种语言,应用程序可能应该在语言栏中给出该语言的概率。 Eg 70% french 30% latin.例如 70% 法语 30% 拉丁语。

The questions in my mind area: Can I implement those language rules myself into my application?我脑海中的问题是:我可以自己将这些语言规则应用到我的应用程序中吗? What is the ideal programming language the application should be written in?应用程序应该用什么理想的编程语言编写? Java or C++? Java 还是 C++? I would appreciate any suggestions you might have.如果您有任何建议,我将不胜感激。 Thanks a lot!非常感谢!

您可以使用 Java 并使用Locale

you can try the this link https://code.google.com/archive/p/language-detection/ .你可以试试这个链接https://code.google.com/archive/p/language-detection/

Also, there are already similar question are present check this How to detect language of user entered text?此外,已经存在类似的问题,请检查此如何检测用户输入文本的语言?

Use the link Narendra gave you.使用 Narendra 给你的链接。 Google often has very good resources for these types of things.谷歌通常为这些类型的事情提供很好的资源。

Creating a language detector on your own would be a much harder endeavor in any case because you need many databases of languages and their dictionaries.在任何情况下,自己创建语言检测器都将是一项艰巨的任务,因为您需要许多语言及其词典的数据库。

There's also the problem that you might come across similarities in languages that would inevitably make it harder to sort these types of problems out.还有一个问题是,您可能会遇到语言中的相似之处,这不可避免地会使这些类型的问题难以解决。 But then again, programming is problem solving... go for it!但话又说回来,编程就是解决问题……去吧!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM