1. Webster’s Unabridged Dictionary 1913

I came to know this dictionary viaJames Somers’ article.

The Webster’s Unabridged Dictionary 1913 was also digitalised on Gutenberg.

It was long enough for the copyright to be expired and now in the public domain:

This eBook is for the use of anyone anywhere at no cost and with almost no restrictions whatsoever. You may copy it, give it away or re-use it under the terms of the Project Gutenberg License included with this eBook or online at www.gutenberg.net

Quote from the Project Gutenberg text file

2. Webster’s Unabridged Dictionary 1913 for MacOS dictionary

This project WebsterParser improves the readability of this dictionary for Apple .dictionary. Check its releases for a ready-to-use .dictionary file.

2. Webster’s Unabridged Dictionary 1913 for Stardict

The old format example.

Some Android dictionary apps are also available. However, most of them are not easy to read.

The better format and easier to read

Steps to convert the above .dictionary to Stardict data:

  1. Download the latest version from the releases, unzip it to get the .dictionary file.

  2. Install pyglossary and run it interactive command pip3 install pyglossary

pyglossary --cmd

  1. Convert it to Tabfile

The key point is to use this option:

readOptions={"html_full": True}
  1. Embed CSS

Use python to replace

import mycommonfunctions

css = mycommonfunctions.read_file('./DefaultStyle.css')
css = css.strip().replace('\n', ' ')


a = '''<head><link rel="stylesheet" href="DefaultStyle.css"></head>'''.strip()
b = f'<head><style>{css}</style></head>'


html_tabfile = mycommonfunctions.read_file('./1913.dictionary.txt')


html_tabfile = html_tabfile.replace(a, b)

mycommonfunctions.write_file('./1913-Webster.txt', html_tabfile)

  1. Convert to Stardict data
writeOptions={
        # "encoding": "utf-8",
        "sametypesequence": "h",
        "dictzip": True,
    }

GNU Collaborative International Dictionary of English

https://gcide.gnu.org.ua/

Bonus:

The hard way

Note: I have tried using pyglossary to convert the Apple binary .dictionary file to Stardict directly.

The output did not include synonym words. So far, most Android dictionary readers do not support custom CSS style either.

So I gave up this convenient method and used the following solution.

It takes more time, but we will be able to customise and embed CSS.

Overview:

1. git clone  
2. npm install  
3. modify index.ts  
4. npm start  
5. pyglossary

A. Preparing tabfile

# 1  
  
git clone --recurse-submodules https://github.com/ponychicken/WebsterParser.git  
  
cd WebsterParser  
  
# 2  
npm install  
  

If you want to compile it into js:

npm i -g typescript  
  
# still in WebsterParser (where tsconfig.json presents), just run tsc, it will use tsconfig.json and compile all .ts files into .js  
  
tsc

Modifying index.ts

Backup it first

# 3  
cp index.ts index.ts.backup

And overwrite the index.ts with the following code. It will create an additional file template/dictTabFile.txt.

Gist link:

https://gist.github.com/dpcpnry/df8b0722b0274aa999d01328c893fe38

Now run it, it may take a few minutes:

# 4  
npm start

If things go smoothly, you will get template/en-en-Websters1913. We will use pyglossary to convert it to Stardict dict data.

Important: This output Tabfile will let pygossary (v4.0.11) generate .syn file that contains information for synonyms.

Only StarDict-2.4.8 and newer support this file.

On Android one can use Qdict app: http://play.google.com/store/apps/details?id=com.annie.dictionary

On computers, a recent version of Stardict program should work fine.

On iOS, you may try Dicty app.

We will get back to template/en-en-Websters1913 later, now install pyglossary. If you have a recent version of pyglossary installed, you can skip this session.

B. Installing pyglossary

On Termux (given that you have installed python3 and pip3):

pip3 install pyglossary

We also need to git clone its project:

got clone https://github.com/ilius/pyglossary.git

Now cd to the just cloned pyglossary dir:

cd pyglossary

On Termux, we need also to install some more pkgs,check, sill in pyglossary dir:

apt install libxml2 libxslt  
  
pip3 install lxml beautifulsoup4 html5lib  
  
# pull new update for pyglossary (if you have installed pyglossary a long time ago)  
  
# **Warning**: git reset --hard will reset your local stuff  
  
git reset --hard  
  
git pull  
  
pip3 install --upgrade pyglossary  
  
# test running  
  
pyglossary --help

C. Converting to Stardict dictionary data

We will copy the tab file to phone storage so that we can use the phone file manager to move it later.

# copy template/en-en-Websters1913 to our phone Download folder  
  
  
cp ~/WebsterParser/template/en-en-Websters1913 ~/storage/shared/Download/  
  
# cd to Download  
  
cd ~/storage/shared/Download/  
  
# named as en-en-Websters1913 for detection of sourceLang and targetLang

Now run the convert command

# 5 it must be a 1-line command:  
  
pyglossary en-en-Websters1913 Websters1913.ifo --write-options=sametypesequence=h --read-format=Tabfile --write-format=Stardict

Output log on my phone:

➜  ~ storage/shared/Download/  
➜  Download pyglossary en-en-Websters1913 Websters1913.ifo --read-format=Tabfile --write-format=Stardict  
[INFO] Reading file: /storage/emulated/0/Download/en-en-Websters1913  
[INFO] Detected sourceLang='English', targetLang='English' from glossary name 'en-en-Websters1913'  
  
[WARNING] Full sort enabled, falling back to indirect mode  
Reading | |██████████████|%100.0 Time: 0:01:50  
[INFO] Loaded 95667 entries  
[INFO] Writing to Stardict file '/storage/emulated/0/Download/Websters1913.ifo'  
[INFO] Sorting took 2.3 seconds  
[INFO] Auto-selecting sametypesequence=h  
Writing | |██████████████|%100.0 Time: 0:00:15  
[INFO] Writing dict file took 15.81 seconds  
[INFO] Sorting 9284 synonyms...  
[INFO] Sorting 9284 synonyms took 0.01 seconds  
[INFO] Writing 9284 synonyms...  
[INFO] Writing 9284 synonyms took 0.01 seconds  
[INFO] bookname: en-en-Websters1913  
  
[INFO] Writing file '/storage/emulated/0/Download/Websters1913.ifo' done.  
[INFO] Running time of convert: 133.1 seconds  
➜  Download  

It will generate the following files:

Websters1913.dict.dz  
Websters1913.syn  
Websters1913.ifo  
Websters1913.idx

Now simply use phone File Manager to copy these Stardict dictionary data files to your dictionary app dir.

Note: again, only StarDict-2.4.8 and newer support the .syn file.

On Android one can use Qdict app: http://play.google.com/store/apps/details?id=com.annie.dictionary

On computers, a recent version of Stardict program should work fine.

On iOS, you may try Dicty app.

Done! May it be helpful.

PS: TODO

A possible issue of WebsterParser

https://github.com/ponychicken/WebsterParser/issues/29

===================

It seems that some definitions get lost in the output files (example: in template/dict.xml file).

For example, with the word “happy”, in srcFiles/CIDE.H, originally its entry is:

<p><ent>Happy</ent><br/  
<hw>Hap"py</hw> <pr>(h<acr/p"p<ycr/)</pr>, <pos>a.</pos> <amorph>[<pos>Compar.</pos> <adjf>Happier</adjf> <pr>(-p<icr/*<etil/r)</pr>; <pos>superl.</pos> <adjf>Happiest</adjf>.]</amorph> <ety>[From <er>Hap</er> chance.]</ety> <sn>1.</sn> <def>Favored by hap, luck, or fortune; lucky; fortunate; successful; prosperous; satisfying desire; <as>as, a <ex>happy</ex> expedient; a <ex>happy</ex> effort; a <ex>happy</ex> venture; a <ex>happy</ex> omen.</as></def><br/  
[<source>1913 Webster</source>]</p>  
  
<p><q>Chymists have been more <qex>happy</qex> in finding experiments than the causes of them.</q> <rj><qau>Boyle.</qau></rj><br/  
[<source>1913 Webster</source>]</p>  
  
<p><sn>2.</sn> <def>Experiencing the effect of favorable fortune; having the feeling arising from the consciousness of well-being or of enjoyment; enjoying good of any kind, as peace, tranquillity, comfort; contented; joyous; <as>as, <ex>happy</ex> hours, <ex>happy</ex> thoughts</as>.</def><br/  
[<source>1913 Webster</source>]</p>  
  
<p><q><qex>Happy</qex> is that people, whose God is the Lord.</q> <rj><qau>Ps. cxliv. 15.</qau></rj><br/  
[<source>1913 Webster</source>]</p>  
  
<p><q>The learned is <qex>happy</qex> Nature to explore,<br/  
The fool is <qex>happy</qex> that he knows no more.</q> <rj><qau>Pope.</qau></rj><br/  
[<source>1913 Webster</source>]</p>  
  
<p><sn>3.</sn> <def>Dexterous; ready; apt; felicitous.</def><br/  
[<source>1913 Webster</source>]</p>  
  
<p><q>One gentleman is <qex>happy</qex> at a reply, another excels in a in a rejoinder.</q> <rj><qau>Swift.</qau></rj><br/  
[<source>1913 Webster</source>]</p>  
  
<p><cs><col><b>Happy family</b></col>, <cd>a collection of animals of different and hostile propensities living peaceably together in one cage. Used ironically of conventional alliances of persons who are in fact mutually repugnant.</cd> -- <col><b>Happy-go-lucky</b></col>, <cd>trusting to hap or luck; improvident; easy-going.</cd> <ldquo/<xex>Happy-go-lucky</xex> carelessness.<rdquo/  <rj><au>W. Black.</au></rj></cs><br/  
[<source>1913 Webster</source>]</p>  
  

It is missing the following lines, given that they all have source=1913 Webster:

<p><q>One gentleman is <qex>happy</qex> at a reply, another excels in a in a rejoinder.</q> <rj><qau>Swift.</qau></rj><br/  
[<source>1913 Webster</source>]</p>  
  
<p><cs><col><b>Happy family</b></col>, <cd>a collection of animals of different and hostile propensities living peaceably together in one cage. Used ironically of conventional alliances of persons who are in fact mutually repugnant.</cd> -- <col><b>Happy-go-lucky</b></col>, <cd>trusting to hap or luck; improvident; easy-going.</cd> <ldquo/<xex>Happy-go-lucky</xex> carelessness.<rdquo/  <rj><au>W. Black.</au></rj></cs><br/  
[<source>1913 Webster</source>]</p>  
  

For the old format, Stardict dictionary data shown all.