hno Posted July 17, 2010 Share Posted July 17, 2010 HI every one I want to detection a string language , For example i want that it tell me "this is " is English . Some thing like google detection language. How can I do so? thanks Link to comment https://forums.phpfreaks.com/topic/208022-how-to-determine-the-language/ Share on other sites More sharing options...
Mchl Posted July 17, 2010 Share Posted July 17, 2010 http://code.google.com/apis/ajaxlanguage/ Link to comment https://forums.phpfreaks.com/topic/208022-how-to-determine-the-language/#findComment-1087410 Share on other sites More sharing options...
hno Posted July 17, 2010 Author Share Posted July 17, 2010 http://code.google.com/apis/ajaxlanguage/ I don't want to use google api , I just want the source of it , any idea? thanks Link to comment https://forums.phpfreaks.com/topic/208022-how-to-determine-the-language/#findComment-1087469 Share on other sites More sharing options...
Mchl Posted July 17, 2010 Share Posted July 17, 2010 Write to google. Maybe they'll give it to you. Link to comment https://forums.phpfreaks.com/topic/208022-how-to-determine-the-language/#findComment-1087476 Share on other sites More sharing options...
Pikachu2000 Posted July 17, 2010 Share Posted July 17, 2010 If you don't want to use the Google API, it should still be fairly simple. All you have to do is compile a dataset of the most commonly used couple of thousand words from each of all known languages, then write an algorithm to compare the words in the string you have against those words, calculating the number of hits against each language. Then based on a weighted average, along with some in-depth statistical analysis, it should be able to relatively reliably determine the language of the string in question. Let us know if you get stuck Nevermind. Link to comment https://forums.phpfreaks.com/topic/208022-how-to-determine-the-language/#findComment-1087532 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.