473,407 Members | 2,546 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Check string language

Is there any existing method in VB.NET or any 3-third party function
can find out the language in a string?
Let say, isChinese? isFrench?
Jan 29 '08 #1
5 4311
On Jan 29, 12:24*pm, Cylix <cylix2...@gmail.comwrote:
Is there any existing method in VB.NET or any 3-third party function
can find out the language in a string?
Let say, isChinese? isFrench?
Don't know a direct library, but there may be an indirect method:
Create some of simple text files for some specific languages of the
equilavent of your string via Babelfish.altavista.com or Google
Translation, then put each language's strings into each text file.

Then under your project you can compare the any string with language
within these language-specific text files which you want to know.

Hope this helps.
Jan 29 '08 #2
Hi,

The language of ?
http://msdn2.microsoft.com/en-us/lib...re(VS.80).aspx
could be what you are looking for...


"Cylix" <cy*******@gmail.coma écrit dans le message de news:
48**********************************...oglegroups.com...
Is there any existing method in VB.NET or any 3-third party function
can find out the language in a string?
Let say, isChinese? isFrench?

Jan 29 '08 #3
Oups, looks like Kimiraikkonen understood much better (you don't want to
place the computer current language setting in a string but to check in
which language could be written a particular string of text ?)...

Don't know about 3rd party but :

- you could first quickly check based on letters i.e. if you see a
particular unicode charset it could give a first indication (for example if
you have chinese characters, cyrillic characters, latin characters it could
give a first clue).

- if you have then characters that are used in a fair number of languages
you could :
- either check based on basic words frequency (for example "this",
"that" ,"the", "it", etc... is more likely frequent in English)
- also letter frequency could be perhaps an indication

You may want to give some more details. For example on a web site, you could
also have lang attributes that are supposed to tell in which language is a
particular page/section (for use by screen readers for example). If you get
some text from there, you could then also check this info...

--
Patrice

"Patrice" <http://www.chez.com/scribe/a écrit dans le message de news:
OI**************@TK2MSFTNGP02.phx.gbl...
Hi,

The language of ?
http://msdn2.microsoft.com/en-us/lib...re(VS.80).aspx
could be what you are looking for...


"Cylix" <cy*******@gmail.coma écrit dans le message de news:
48**********************************...oglegroups.com...
>Is there any existing method in VB.NET or any 3-third party function
can find out the language in a string?
Let say, isChinese? isFrench?


Jan 29 '08 #4
Also :
http://tnlessone.wordpress.com/2007/...e-meets-human/

and more generally :
http://www.google.fr/search?hl=fr&q=...+natural&meta=

--
Patrice

"Patrice" <http://www.chez.com/scribe/a écrit dans le message de news:
eS**************@TK2MSFTNGP06.phx.gbl...
Oups, looks like Kimiraikkonen understood much better (you don't want to
place the computer current language setting in a string but to check in
which language could be written a particular string of text ?)...

Don't know about 3rd party but :

- you could first quickly check based on letters i.e. if you see a
particular unicode charset it could give a first indication (for example
if you have chinese characters, cyrillic characters, latin characters it
could give a first clue).

- if you have then characters that are used in a fair number of languages
you could :
- either check based on basic words frequency (for example "this",
"that" ,"the", "it", etc... is more likely frequent in English)
- also letter frequency could be perhaps an indication

You may want to give some more details. For example on a web site, you
could also have lang attributes that are supposed to tell in which
language is a particular page/section (for use by screen readers for
example). If you get some text from there, you could then also check this
info...

--
Patrice

"Patrice" <http://www.chez.com/scribe/a écrit dans le message de news:
OI**************@TK2MSFTNGP02.phx.gbl...
>Hi,

The language of ?
http://msdn2.microsoft.com/en-us/lib...re(VS.80).aspx
could be what you are looking for...


"Cylix" <cy*******@gmail.coma écrit dans le message de news:
48**********************************...oglegroups.com...
>>Is there any existing method in VB.NET or any 3-third party function
can find out the language in a string?
Let say, isChinese? isFrench?



Jan 29 '08 #5
Thanks Patrice anyway.

Actually, the method mention above is a large project that I cannot
effort.
My problem is quite simple, I a string from the email subject.
It may include three types of charater, english letter, chinese
letter, others.
I would like to trim the string have english letters and chinese
letters only.
Jan 31 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

27
by: John Roth | last post by:
PEP 263 is marked finished in the PEP index, however I haven't seen the specified Phase 2 in the list of changes for 2.4 which is when I expected it. Did phase 2 get cancelled, or is it just not...
7
by: spiros | last post by:
Hi, suppose you have the class Class1 and the main program: class Class1 { public: Class1(); ~Class1();
2
by: Nikolay Petrov | last post by:
I have an app with text boxes used to change user password Textbox1 - old password Textbox2 - new password Textbox3 - new password second time What I need is how to check if the newely created...
35
by: pinkfloydhomer | last post by:
How do I check if a string contains (can be converted to) an int? I want to do one thing if I am parsing and integer, and another if not. /David
6
by: tommaso.gastaldi | last post by:
Hi, does anybody know a speedy analog of IsNumeric() to check for strings/chars. I would like to check if an Object can be treated as a string before using a Cstr(), clearly avoiding the time...
6
by: D | last post by:
Hello all...I have an issue with one of my java script functions that I'm hoping someone can easily help with. I have a web based application that we use to create/sign up for overtime. When we...
44
by: user | last post by:
Hi, Let's say I have 2 dates in the b/m format: Date 1 and date 2 How do I check whether Date2 is later than Date 1? Date1. 21-Nov-2006 09:00:00 PM
39
by: emre esirik(hacettepe computer science and enginee | last post by:
int n_mines; printf("How many mines do you want in the minefield?"); scanf("%d", &n_mines); while(n_mines>100 || n_mines<0) { printf("Please only enter between 1 and 100"); scanf("%d",...
6
by: axapta | last post by:
Hi Group, How can I check that the first 2 characters of a string are the percent (%) sign? string name = strSurname Regards
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.