Yu-Xi Lim:
Thank you for your comments, and sorry for my last cryptic answer.
I think Bearophile isn't refering to compression of the dictionary, but the
predictive algorithms used by modern data compressors. However, I think he's
over-complicating the issue. It is *not* a data compression
Thanks a lot. It works flawlessly and I have learned few new Python
tricks as well.
Petr Jakes
--
http://mail.python.org/mailman/listinfo/python-list
Justin Azoff:
It takes a second or two to read the list of words in,
Nice solution. If you want to speed up the initialization phase you may
use something like this (it requires a bit more memory, because lines
contains all the words).
Note that the words and numbers have the same sorting
Note that this is essentially a data-compression problem, so the most
accurate solution is probably to use an instrumeted PAQ compressor in a
certain smart way, but you have to work a lot to implement this
solution, and maybe this problem doesn't deserve all this work.
Bye,
bearophile
--
I've tested that sorting just the strings instead of the tuples (and
removing the stripping) reduces the running time enough:
def __init__(self):
numbers = '222333444555666888'
conv = string.maketrans(string.lowercase, numbers)
lines =
[EMAIL PROTECTED] wrote:
I've tested that sorting just the strings instead of the tuples (and
removing the stripping) reduces the running time enough:
def __init__(self):
numbers = '222333444555666888'
conv = string.maketrans(string.lowercase, numbers)
John Machin:
2. All responses so far seem to have missed a major point in the
research paper quoted by the OP: each word has a *frequency* associated
with it. When there are multiple choices (e.g. 43 - [he, if,
id, ...]), the user is presented with the choices in descending
frequency order.
[EMAIL PROTECTED] wrote:
John Machin:
2. All responses so far seem to have missed a major point in the
research paper quoted by the OP: each word has a *frequency* associated
with it. When there are multiple choices (e.g. 43 - [he, if,
id, ...]), the user is presented with the choices in
I have a standard 12-key mobile phone keypad connected to my Linux
machine as a I2C peripheral. I would like to write a code which allows
the text entry to the computer using this keypad (something like T9 on
the mobile phones)
According to the http://www.yorku.ca/mack/uist01.html
Petr Jake wrote:
I have a standard 12-key mobile phone keypad connected to my Linux
machine as a I2C peripheral. I would like to write a code which allows
the text entry to the computer using this keypad (something like T9 on
the mobile phones)
According to the
Petr Jake wrote:
I have a standard 12-key mobile phone keypad connected to my Linux
machine as a I2C peripheral. I would like to write a code which allows
the text entry to the computer using this keypad (something like T9 on
the mobile phones)
According to the
11 matches
Mail list logo