Dushistov / sdcv

https://dushistov.github.io/sdcv/
GNU General Public License v2.0
289 stars 42 forks source link

Use sdcv to export the list of all the words in a dictionary for use by aspell. #75

Open hongyi-zhao opened 2 years ago

hongyi-zhao commented 2 years ago

On Ubuntu 20.04, I've installed the latest git master version of sdcv and have added some dictionaries:

werner@X10DAi:~$ sdcv --version
Console version of Stardict, version 0.5.3
werner@X10DAi:~$ sdcv -l
Dictionary's name   Word count
懒虫简明英汉词典    452185
Webster's Third New International Dictionary, Unabridged (En-En)    296190

Now I want to export all the words in a dictionary, say, "Webster's Third New International Dictionary, Unabridged (En-En)" for use by aspell.

Any hints for doing this with sdcv?

Regards, HY

Dushistov commented 2 years ago

you can use something like:

sdcv -n -u "Webster's Third New International Dictionary, Unabridged (En-En)" '*'

to get all dictionary articles.

hongyi-zhao commented 2 years ago

It can only get very small part of the words:

$ sdcv -n -u "Webster's Third New International Dictionary, Unabridged (En-En)" '*'|egrep  -- '^--[>]-'|wc -l
73