The GUI component of the dictionaries gem currently defaults to GTK2.
It is in a very early, incomplete beta stage.
First, install the gtk2 gem:
gem install gtk2
Then install the gtk_module:
gem install gtk_module
Now you can start the GUI component:
See also the help options.
Environment variable to use a specific yaml file
You can use an environment variable to denote the default yaml file in use. This allows you to use your own yaml file format, rather than the yaml files that are distributed with this gem.
The name of that environment variable must be DICTIONARIES_FILE. It shall point to your yaml file that holds the key-value pairs.
For example, if your file is at /opt/czech.yml, then DICTIONARIES_FILE should point at that location.
In bash, this may be equivalent to:
Note that in the long run, the dictionaries gem could be extended with these yaml files - or allow means to download these files over the www. But before we can do so, let's aim for at the least 100 words in such a file before we would consider distributing it or offering means to distribute said file.
To start the sinatra interface, do:
Difficult english sentences
English is not the most difficult language in the world, but when it comes to proper pronounciation of words, english can be surprisingly difficult.
This subsection may keep a listing of sentences that, for one reason or the other, can be somewhat difficult to read out aloud without mistake, on a first try. It is just a fun-subsection, not meant to be taken too seriously; and it is quite subjective.
Without any further ado, here comes a listing of sentences that may be difficult to pronounce properly so:
I would like to distribute something.
Obtaining all translations into german for a given english word
Since as of November 2020 the following API exists:
.('cat') .('dog') .('human')
This will return an Array of german names. It does not work 100% perfectly as it is based on a regex; and using a regex to parse HTML is never a trivial way. But if you just want to get the first entry, just call .first on it, and in most cases this is the best, most likely translation available.
The regex has to find matches to entries such as the following one:
Anyone to come up with a more accurate regex is welcome to share it. :)
This functionality was specifically necessary because I needed to use this in the ruby-gtk bindings for this project.
Until the 17th of October 2019, this project was using the GPLv2 licence (no later clause).
However had, I believe that the GPLv2 licence is not great for a project that focuses on existing words in real languages, aka dictionaries. Thus, I have decided to change the licence into the MIT licence on that day (17.11.2019, in dd.mm.yyyy notation).
So the gem is now MIT licenced. \o/
For a description of that licence, see https://opensource.org/licenses/MIT.
If your creative mind has ideas and specific suggestions to make this gem more useful in general, feel free to drop me an email at any time, via:
(Do keep in mind that responding to emails may take some time, depending on the amount of work I may have at that moment, due to reallife. I will, however had, read feedback. Patches and code changes are welcome too of course, as long as they are in the spirit of the project at hand, e. g. fitting to the general theme.)