Importing word lists

Support forum for our fast, user-friendly offline Chinese language study apps for Google Android devices:

Hanping Chinese Dictionary (Lite & Pro)
Hanping Cantonese Dictionary
Hanping Chinese Camera
Hanping Chinese Popup
chriskie
Posts: 14
Joined: 21 Nov 2011, 08:23

Re: Importing word lists

Post by chriskie »

PS If anyone is interested, I'm just using SQLite browser to open a copy of the wls file, delete all the list records and then insert my own using the SQL editor in the browser. I simply generate SQL script statements using my spreadsheet and cut and paste them into the editor, let me know if you want to know how to do that (although if you haven't got your words already organised, it's harder). Then just save the wls file into the original location with a new name, and it pops up in the app menu.

hanping
Site Admin
Posts: 470
Joined: 18 Mar 2010, 08:52

Re: Importing word lists

Post by hanping »

You don't need to specify all the information. Have a look at chars1.wls

chriskie
Posts: 14
Joined: 21 Nov 2011, 08:23

Re: Importing word lists

Post by chriskie »

Yes I tried to modify chars1.wls, but found that it required the traditional character version as key? If I tried to use only simplified, which would be my preference, it didn't work unless the character is the same in both trad and simplified, ie. 是 worked but not 个. So (maybe wrongly) I assumed that it only uses the traditional version to search, but displays the results trad or simpl. according to preference? I haven't tried using only simpl + pinyin in the key 1/2/3 structure yet, was planning to do that today.

hanping
Site Admin
Posts: 470
Joined: 18 Mar 2010, 08:52

Re: Importing word lists

Post by hanping »

Essentially key1=trad, key2=simp, key3=pinyin. You can specifiy any combination of those but at least one of (key1, key2). For example, you can specify just columns key2 (for simp) and key3 (for pinyin).

chriskie
Posts: 14
Joined: 21 Nov 2011, 08:23

Re: Importing word lists

Post by chriskie »

Ok great, that's what I was hoping :) Does the same apply to the list table in starred.db, ie. as long as I specify simplifed + pinyin it will look up the rest?
I have now managed to make ODBC work, so I'm encouraged to try handling multiple tables

hanping
Site Admin
Posts: 470
Joined: 18 Mar 2010, 08:52

Re: Importing word lists

Post by hanping »

starred.db contains all three keys and any number of which can be null (although one of (key1, key2) must be non-null). The reason the predefined lists are a little different is because we can match much faster against the dictionary when all the rows have the same form. However, starred.db is more flexible and so slower (even if all the rows are the same form).

chriskie
Posts: 14
Joined: 21 Nov 2011, 08:23

Re: Importing word lists

Post by chriskie »

Great thanks!

chriskie
Posts: 14
Joined: 21 Nov 2011, 08:23

Re: Importing word lists

Post by chriskie »

Ok have now tried to remove the trad entry for key1 and leave it blank, with only a simplified entry in key2, and pinyin. This doesn't seem to work, it says "not found in dictionary" when displaying the list. But it's no big deal, I'll create my lists with both variants. Thanks for your help!

hanping
Site Admin
Posts: 470
Joined: 18 Mar 2010, 08:52

Re: Importing word lists

Post by hanping »

Hmm, that's strange. It should work.

I just tried taking the hsk1.wls list and removing the key1 column. That seems to work... It's important you remove the column and not just nullify the field.

chriskie
Posts: 14
Joined: 21 Nov 2011, 08:23

Re: Importing word lists

Post by chriskie »

Ah.. ok that explains it. I just deleted the values :)

Post Reply