Mailing List Archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] multibyte tr (or i18n coreutils)

many thanks to all of you who replied. 
I guess I will use perl as Kalin suggested. 

Since a question appeared why I need such a thing, let me explain it

My intention is to write a program (or rather a script), which would
check if a telephone number is convertable to some word from dictionary
by using the letters on the mobile-phone keyboard. 
That is 2 -> a,b,c
        3 -> d,e,f ...  etc.  
This way, a number 668437 can be interpreted as MOTHER.

Since there is enourmous amount of combinations, I decided to 
first pick up all 6-letter words from a dictionary, convert them to 
numbers and than check, if a given number is among these.
In a second stage, I would try to find out, which word happens to have
that particular number combination (a harder part of the problem).

This may be interesting also in other languages. In particular, I would
be interested in a Japanese view of this idea. And of course, one may
think of many interesting words too ;) 

In Czech the chances that a random number will be "convertable" are
about 6%, which is on the edge of being statisticaly negligible. There
is slight uncertainty according to the dictionary one uses and also if
one employs tricks such as 0 -> O or so. 

Of course, the whole purpose is to either find a mnemotechnics for
already recorded numbers, or to find a good number for a new phone.

The above task is easily achieved in Mathematica program (Touples
function). Unfortunately, while Mathematica does have English, German,
French, Russian, does not have Czech dictionary.  Neither
has it Japanese or Chinese one. So I decided to try another route for a

Best regards

Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links