Results 1 to 12 of 12

Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.


Thread: Add Words to iPhone Dictionary File

  1. #1
    Green Apple
    Join Date
    Feb 2009
    Location
    Atlanta, GA
    Posts
    48
    Thanks
    4
    Thanked 6 Times in 6 Posts

    Default 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

  2. The Following User Says Thank You to tatum For This Useful Post:

    maelcum (10-09-2009)

  3. #2
    Could this also be used to change "LOL" to "lol"?
    If I helped you, then hit the "Thanks!" button please.

    Quote Originally Posted by Soodeh View Post
    I can't find Cydia on app store

  4. #3
    Green Apple
    Join Date
    Feb 2009
    Location
    Atlanta, GA
    Posts
    48
    Thanks
    4
    Thanked 6 Times in 6 Posts

    Quote Originally Posted by NeoNightmareX View Post
    Could this also be used to change "LOL" to "lol"?
    No. Try "haha" instead.

  5. #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??

  6. #5
    Green Apple
    Join Date
    Feb 2009
    Location
    Atlanta, GA
    Posts
    48
    Thanks
    4
    Thanked 6 Times in 6 Posts

    Quote Originally Posted by BrandonandMaria View Post
    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??
    I am not sure. Sorry.

  7. #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

  8. The Following User Says Thank You to shoohorn0plenty For This Useful Post:

    c-dude (05-04-2009)

  9. #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.

  10. #8
    Quote Originally Posted by shoohorn0plenty View Post
    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.
    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!

  11. The Following 2 Users Say Thank You to phreakwenci For This Useful Post:

    Shavon (06-07-2011), shoohorn0plenty (05-24-2009)

  12. #9
    Super Duper Moderator blkcadi's Avatar
    Join Date
    Aug 2008
    Location
     Valley of the Sun, ARIZONA ♥♥♥
    Posts
    31,212
    Thanks
    3,931
    Thanked 10,209 Times in 6,214 Posts

    Quote Originally Posted by phreakwenci View Post
    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!
    Very cool. Auto correct is more that just a minor inconvenience for me but for people that can't handle it , this rox. Nice job.

  13. #10
    Quote Originally Posted by phreakwenci View Post
    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!
    This works!
    Thanks!
    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

  14. #11
    iPhone? More like MyPhone West-'s Avatar
    Join Date
    Aug 2008
    Location
    Michigan
    Posts
    156
    Thanks
    46
    Thanked 72 Times in 37 Posts

    Quote Originally Posted by shoohorn0plenty View Post
    This works!
    Thanks!

    I know this post is old, but I came across it and wanted to let people know it works if you just do it in Notes too!

  15. #12
    What's Jailbreak?
    Join Date
    Sep 2009
    Location
    Europe
    Posts
    9
    Thanks
    4
    Thanked 1 Time in 1 Post
    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?

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •