-
04-05-2009, 12:03 PM #1
Add Words to iPhone Dictionary File
Add words to the iPhone's built-in dictionary file.
This script requires Perl to be installed. Add the CoreDev repo to Cydia to install Perl.
Code:#!/usr/local/bin/perl # This program will add words to the iPhone word database. # Created by tatum, 04/02/2009 ############### # Define vars # ############### $file = "/private/var/mobile/Library/Keyboard/dynamic-text.dat"; ######### # Usage # ######### # If no args given, or "-h", print usage if (@ARGV == 0 or $ARGV[0] eq '-h') { &usage; } sub usage { print <<EOF; Usage: dic -a <word> <another word>... - Adds <words> to iPhone dictionary file dic -h - Displays this message EOF exit 1; } ######## # Code # ######## if (($ARGV[0] eq "-a") && (@ARGV >= 2)) { open(DICT, ">>$file") or die "Unable to open '$file': $!\n"; binmode DICT; @current = <DICT>; shift (@ARGV); foreach $word (@ARGV) { unless (grep(/^$word$/, @current)) { print DICT $word; } else { die "\n'$word' already exists in '$file'.\n"; } } close(DICT); } else { &usage; }
Example:
dic -a word1 word2 word3
-
The Following User Says Thank You to tatum For This Useful Post:
maelcum (10-09-2009)
-
04-05-2009, 01:23 PM #2Livin the iPhone Life
- Join Date
- Dec 2008
- Location
- 2814
- Posts
- 1,563
- Thanks
- 50
- Thanked 435 Times in 267 Posts
-
04-05-2009, 02:19 PM #3
-
04-14-2009, 09:46 PM #4
well this is something I would like BUT, I want to know if I can change the chinese handwriting dictionary to english?? Is that possible??
-
04-15-2009, 11:02 AM #5
-
04-17-2009, 02:20 PM #6
I would really like to teach my iPhone naughty words, but this method is way over my head.
Telling someone to duck off is getting be almost as embarrassing as telling one of my buddies that I have to go take a shot.Isn’t it enough to see that a garden is beautiful without having to believe that there are fairies at the bottom of it too?
-- Douglas Adams
-
The Following User Says Thank You to shoohorn0plenty For This Useful Post:
c-dude (05-04-2009)
-
05-14-2009, 09:21 AM #7
hey i was looking at this for a potential iphone i might be getting but i have one quick question, couldnt you just edit the dynamic-text.dat file in
%user/private/var/mobile/Library/Keyboard ? i am assuming that its jailbroken and you can ssh into the iphone.
-
05-23-2009, 11:20 PM #8
I found away around that in a post on lifehacker.com Just create a new contact named Bad Words and in the last name add all the words you want to keep the iphone from correcting, I also added stuff like "FTW WTF ROFL AFAIK FWIW" etc... and of course a superflous amount of foul language. Works for me!
-
The Following 2 Users Say Thank You to phreakwenci For This Useful Post:
Shavon (06-07-2011), shoohorn0plenty (05-24-2009)
-
05-23-2009, 11:33 PM #9Super Duper Moderator
- Join Date
- Aug 2008
- Location
- Valley of the Sun, Arizona
- Posts
- 22,656
- Thanks
- 2,669
- Thanked 7,289 Times in 4,686 Posts
-
05-24-2009, 10:31 AM #10
-
07-29-2009, 09:49 AM #11iPhone? More like MyPhone
- Join Date
- Aug 2008
- Location
- Michigan
- Posts
- 156
- Thanks
- 46
- Thanked 72 Times in 37 Posts
-
10-09-2009, 03:35 PM #12
Hey,
could it be that the file format changed in any of the firware updates?
When I look at the file I'll see a format like this:
^@wordA^@wordB^@wordC^@wordD
Between any word there is a delimiter "^@".
When I call up the perl-Script and add some words, they show up right after each other, no delimiter, like:
wordAwordBwordCwordD
Any insight?



LinkBack URL
About LinkBacks
Reply With Quote



