473,563 Members | 2,867 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4334
On Jan 29, 12:24*pm, Cylix <cylix2...@gmai l.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.altav ista.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*******@gmai l.coma écrit dans le message de news:
48************* *************** **...legroup s.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*******@gmai l.coma écrit dans le message de news:
48************* *************** **...legroup s.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*******@gmai l.coma écrit dans le message de news:
48************* *************** **...legroup s.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
2575
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 in the changes document? John Roth
7
1828
by: spiros | last post by:
Hi, suppose you have the class Class1 and the main program: class Class1 { public: Class1(); ~Class1();
2
1686
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 password is with standart ascii symbols. Maybe I am not describing it well, but I don't know the exact term. What I wont to achieve is, that the...
35
75139
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
2197
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 and resource consuming Try... Catch, which in iterative processing is totally unacceptable. -tom
6
4301
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 have holidays we require our employees to sign up in 4 hr increments for the times we post. I'm having trouble creating a time slot that ends @ 12am....
44
10154
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
2089
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", &n_mines); }
6
25082
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
7583
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7950
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6255
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5484
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5213
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3643
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2082
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
924
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.