so... i've made this nice predictive text dictionary and sms style input class for any python programmers that want to use it.
to use it:
Quote:# create a py9input classthe contents of the text box are controlled by the class, (navigation, word editing, saving words to the db, input mode changes, etc). people that hate predictive text will be pleased to hear it has the old style phone input too. i've tried to make it feel like a phone (apart from when editing a word), so feedback in that department is specially welcomed ("lemme kno wot u fink" ;-)
x = py9input("en-br.dict","default text")
# send it keys as they are pressed
# * "0123456789" - numbers
# * "udlr" - navigation
# * "s" - set mode),
# put it's text in to a label on your screen
# get the actual string
the only down side is the size of the databases (130,000 words = 3.6mb, creating one takes about 120mb of ram).
run demo.py for a demo, you'll need lots of ram because it'll create the database first time it's run. if you don't have the ram you can get my dictionary here
latest code: here
- sentance case
- numerical only option
- save list of valid keys to database