The ModMyTM Family of Sites:
ModMyMotoModMyiModMyGphone




 
 
Register or Connect with Facebook

Discuss AppStore Apps | Browse / Search Cydia | MMi Cydia Stats




  Apple Forums & iPhone Forums, Mods, Hacks, News, Themes, Downloads, and more! | ModMyi.com > iPhone Modding > File Mods
Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 04-05-2009, 12:03 PM
Green Apple
 
Join Date: Feb 2009
Device + Firmware: iPhone 3G 2.2
Operating System: CrunchBang Linux
Location: Atlanta, GA
Posts: 46
Thanks: 3
Thanked 6 Times in 6 Posts
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
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
The Following User Says Thank You to tatum For This Useful Post:
maelcum (10-09-2009)
  #2  
Old 04-05-2009, 01:23 PM
NeoNightmareX's Avatar
Livin the iPhone Life
 
Join Date: Dec 2008
Device + Firmware: 8GB 2G iPhone 3.0 on Legacy AT&T Blue
Operating System: Windows Vista, Windows 7, OSX 10.5.7 Tri-Boot
Location: 2814
Posts: 1,540
Thanks: 50
Thanked 398 Times in 260 Posts

Could this also be used to change "LOL" to "lol"?
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #3  
Old 04-05-2009, 02:19 PM
Green Apple
 
Join Date: Feb 2009
Device + Firmware: iPhone 3G 2.2
Operating System: CrunchBang Linux
Location: Atlanta, GA
Posts: 46
Thanks: 3
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.
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #4  
Old 04-14-2009, 09:46 PM
What's Jailbreak?
 
Join Date: Oct 2008
Device + Firmware: IPhone 2.1
Operating System: Windows vista
Posts: 19
Thanks: 1
Thanked 5 Times in 5 Posts

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??
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #5  
Old 04-15-2009, 11:02 AM
Green Apple
 
Join Date: Feb 2009
Device + Firmware: iPhone 3G 2.2
Operating System: CrunchBang Linux
Location: Atlanta, GA
Posts: 46
Thanks: 3
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.
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #6  
Old 04-17-2009, 02:20 PM
shoohorn0plenty's Avatar
Green Apple
 
Join Date: Mar 2009
Device + Firmware: 16GB iPhone 3G[S] @ 3.1 (7C144)
Operating System: Windows Vista Home Premium SP2
Location: San Antonio, TX
Posts: 38
Thanks: 2
Thanked 2 Times in 2 Posts
Send a message via AIM to shoohorn0plenty Send a message via Yahoo to shoohorn0plenty

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.
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
The Following User Says Thank You to shoohorn0plenty For This Useful Post:
c-dude (05-04-2009)
  #7  
Old 05-14-2009, 09:21 AM
What's Jailbreak?
 
Join Date: Jun 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts

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.
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #8  
Old 05-23-2009, 11:20 PM
iPhoneaholic
 
Join Date: Dec 2008
Device + Firmware: iPhone 3.1.2 Jailbroken
Operating System: Hackint0sh Running SL
Posts: 315
Thanks: 50
Thanked 22 Times in 16 Posts

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!
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
The Following User Says Thank You to phreakwenci For This Useful Post:
shoohorn0plenty (05-24-2009)
  #9  
Old 05-23-2009, 11:33 PM
blkcadi's Avatar
Moderator
 
Join Date: Aug 2008
Device + Firmware: 3G-16GB 3.1.2 - black'd
Operating System: Ye ole' Commodore 64
Location: Arizona, Valley of the Sun
Posts: 9,255
Thanks: 475
Thanked 1,744 Times in 1,442 Posts
Send a message via AIM to blkcadi

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.
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #10  
Old 05-24-2009, 10:31 AM
shoohorn0plenty's Avatar
Green Apple
 
Join Date: Mar 2009
Device + Firmware: 16GB iPhone 3G[S] @ 3.1 (7C144)
Operating System: Windows Vista Home Premium SP2
Location: San Antonio, TX
Posts: 38
Thanks: 2
Thanked 2 Times in 2 Posts
Send a message via AIM to shoohorn0plenty Send a message via Yahoo to shoohorn0plenty

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!
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #11  
Old 07-29-2009, 09:49 AM
West-'s Avatar
iPhone? More like MyPhone
 
Join Date: Aug 2008
Device + Firmware: iPhone 3G 16GB White
Operating System: Windows 7 64-bit
Location: Michigan
Posts: 154
Thanks: 46
Thanked 63 Times in 33 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!
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #12  
Old 10-09-2009, 03:35 PM
What's Jailbreak?
 
Join Date: Sep 2009
Device + Firmware: iPhone 3Gs 3.1.2 / iPhone 3G 3.1.2
Operating System: OS X 10.5.8, XPPro SP2
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?
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
Reply

  Apple Forums & iPhone Forums, Mods, Hacks, News, Themes, Downloads, and more! | ModMyi.com > iPhone Modding > File Mods

Tags
auto-correct, dictionary, scripts, text, words

Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



Go to Top
ModMyI

All times are GMT -6. The time now is 01:34 AM. Powered by vBulletin® Version 3.8.4
If you need Dedicated Server Hosting, you should check out SingleHop. | Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.0 Copyright © 2007-09 by ModMy, LLC. All rights reserved.

iPhone News / iPhone Forums / Apple News / Apple Forums / RSS / Contact Us / / Privacy Statement / Top