Thread: Development Pocket Edge 2.2 NEW Firmware
View Single Post
Old 07-08-2011, 04:08 PM   #70
ptsenter
Addict
ptsenter has learned how to buy an e-book online
 
Posts: 285
Karma: 88
Join Date: May 2011
Device: Kobo eReader Wireless
Possible way to install custom dictionary

There were a few questions how to install custom dictionary, Lobotom1 comes to mind.

As you can see below dictionary oxc_dictionary_eng.db installed under
/system/esi/etc/dictionaries

There are a few ways to expand on that:
- we can try simply add another one with the same structure: just one table Words
- we can substitute stock one with new one
- using adb and sqlite3 we can just (re-)populate this table with whatever info we want

Is anybody willing to expand on that?

C:\Android\android-sdk-windows\platform-tools>adb shell
$ su
su
# cd system
cd system
# cd esi
cd esi
# cd etc
cd etc
# cd dictionaries
cd dictionaries
# ls
ls
oxc_dictionary_eng.db
# sqlite3 oxc_dictionary_eng.db
sqlite3 oxc_dictionary_eng.db
SQLite version 3.6.22
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .tables
.tables
Words android_metadata
sqlite> select count(*) from Words;
select count(*) from Words;
74115
sqlite> .schema Words
.schema Words
CREATE TABLE Words (_id INTEGER PRIMARY KEY AUTOINCREMENT, word TEXT NOT NULL, h
omonym TEXT NULL, header TEXT NOT NULL, definition TEXT NOT NULL, phrases TEXT N
ULL, phrasal_verbs TEXT NULL, derivatives TEXT NULL, usage_notes TEXT NULL);
sqlite> select * from Words where word="yes";
select * from Words where word="yes";
73694|yes||<b>yes</b> <arsp>/yes/</arsp> |▶<b>exclam.</b> <b>1. </b>used
to give an affirmative response: <i>"Do you understand?" "Yes.&#0
34;</i> ■ expressing agreement with a positive statement just made: <i>&#0
34;That was a grand evening." "Yes, it was."</i> ■ expressi
ng contradiction of a negative statement: <i>"You don't want to go." &
#034;Yes, I do."</i> <b>2. </b>used as a response to someone addressing one
or otherwise trying to attract one's attention: <i>"Oh, Bob." "Y
es?"</i> <b>3. </b>used to question a remark or ask for more detail about i
t: <i>"It should be easy to check." "Oh yes? How?"</i> σ
2; asked at the end of a statement to indicate the expectation of agreement: <i>
you think I lied, yes?</i> <b>4. </b>encouraging someone to continue speaking: <
i>"When you bought those photographs …" "Yes?"</i> <b>5
. </b>expressing delight: <i>plenty to eat, including pie (yes!).</i> ▶<b>
n.</b> (pl. <b>yes•es</b> or <b>yes•ses</b>) an affirmative answer or
decision, esp. in voting. [OE <i>gēse</i>, <i>gīse</i>, prob. from an
unrecorded phr. meaning ‘may it be so.’]||||
sqlite> ^C
C:\Android\android-sdk-windows\platform-tools>

Last edited by ptsenter; 07-08-2011 at 05:11 PM.
ptsenter is offline   Reply With Quote