Solved

Detect language of a string

Posted on 2013-05-20
2
279 Views
Last Modified: 2013-05-20
Hello,

Is it possible to detect the language of a string?

For example:

"Hello" -> English
"über" -> German
"¿a¿¿µ¿¿a" -> Greek

I understand that words written in English but in another language cannot be filtered (e.g. "Guten Tag") however I am asking only for those that have characters specific to each language like the examples above.

Thank you very much!
0
Comment
Question by:infodigger
2 Comments
 
LVL 10

Assisted Solution

by:ienaxxx
ienaxxx earned 250 total points
Comment Utility
AFAIK there should be something in the google translate API.
Not sure if you was searching for something like this...
HTH
0
 
LVL 108

Accepted Solution

by:
Ray Paseur earned 250 total points
Comment Utility
Each language has a "signature" that can be detected from its vocabulary, however it's not 100% accurate and the risk of error goes way up on smaller strings because the orthography evident in short strings is rarely unique.  The Google API occasionally suggests that my computer code is written in Dutch, etc.  I think letter-only detection from a single word would be nearly useless except for a very few languages.  For example, the U-Umlaut (Diaresis) may appear in Hungarian, Karelian, Turkish, Uyghur Latin script, Estonian, Azeri, Turkmen, Crimean Tatar and Tatar Latin alphabets, as well as in German.

See http://en.wikipedia.org/wiki/Language_identification
0

Featured Post

Easy Project Management (No User Manual Required)

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction Many web sites contain image galleries; a common design for these galleries includes a page with a collection of thumbnail images.  You can click on each of the thumbnail images to see the larger version of the image.  This is easily i…
This article will explain how to display the first page of your Microsoft Word documents (e.g. .doc, .docx, etc...) as images in a web page programatically. I have scoured the web on a way to do this unsuccessfully. The goal is to produce something …
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now