Re: how to determine what language a c# string is written in? is there any C# method to take a string and return what language it is in? e.g. english, hindi, spanish, etc.
- From: "Alvin Bruney [ASP.NET MVP]" <www.lulu.com/owc>
- Date: Wed, 30 Jan 2008 08:50:36 -0500
I think he was asking about the run-time langauge and not 'speaking language'. If that's the case, OP can get the current culture and language from the thread of execution. That would work for local applications. If the string is remoted from another appdomain, you can find the executing thread as well.
--
Regards,
Alvin Bruney [MVP ASP.NET]
[Shameless Author plug]
The O.W.C. Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $19.99
-------------------------------------------------------
"Mihai N." <nmihai_year_2000@xxxxxxxxx> wrote in message news:Xns9A34EE6CD4729MihaiN@xxxxxxxxxxxxxxxx
how to determine what language a c# string is written in? is there any C#
method to take a string and return what language it is in? e.g. english,
hindi, spanish, etc.
There is nothing standard in C#, .NET, Win32, whatever.
And there is no 100% reliable method to do that.
In what language is "chat"? Is is English, or French (cat)?
The longer the text, the better the chances, but nothing can be 100%
reliable.
But there are some decent statistical methods.
Here are some links (or Google for language identification algorithm):
http://people.csail.mit.edu/hazen//publications/masters_thesis.pdf
http://complingone.georgetown.edu/~langid/acq_info.html
http://search.cpan.org/dist/Text-Language-Guess/
--
Mihai Nita [Microsoft MVP, Windows - SDK]
http://www.mihai-nita.net
------------------------------------------
Replace _year_ with _ to get the real email
.
- Follow-Ups:
- References:
- how to determine what language a c# string is written in? is there any C# method to take a string and return what language it is in? e.g. english, hindi, spanish, etc.
- From: DR
- Re: how to determine what language a c# string is written in? is there any C# method to take a string and return what language it is in? e.g. english, hindi, spanish, etc.
- From: Mihai N.
- how to determine what language a c# string is written in? is there any C# method to take a string and return what language it is in? e.g. english, hindi, spanish, etc.
- Prev by Date: Re: What happens with GAC when you uninstall .NET Framework completely?
- Next by Date: RE: Tooltip Problems
- Previous by thread: Re: how to determine what language a c# string is written in? is there any C# method to take a string and return what language it is in? e.g. english, hindi, spanish, etc.
- Next by thread: Re: how to determine what language a c# string is written in? is there any C# method to take a string and return what language it is in? e.g. english, hindi, spanish, etc.
- Index(es):
Relevant Pages
|