View Single Post
Old 03-19-2015, 06:48 AM   #84
AlPe
Digital Amanuensis
AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.
 
AlPe's Avatar
 
Posts: 727
Karma: 1446357
Join Date: Dec 2011
Location: Turin, Italy
Device: Several eReaders and tablets
Quote:
Originally Posted by mietek81 View Post
Well, I don't have yet a dictionary with .syn file but I was going to make one. Or at least try to make as I found a base file to work on.
OK. My comment was along this line: as I have never seen a StarDict with a .syn dictionary, I decided not to spend time on that. BTW, if it is a simple feature to add (it should), I might give it a shot.

Quote:
Originally Posted by mietek81 View Post
Another thing I forgot to ask (and asked for it already a year back or so). Is it possible to merge two dictionaries (english-english and english-polish) to create something like english-english-polish dictionary? It would work in a way that after english definition for a word there would be polish translation of it (of course only if there would be a translation for the word in eng-pol dictionary).

And another. Let's say that I have two or three different polish dictionaries and I want to join them into one. Is it possible?
Yes, Penelope supports merging more input dictionaries into one, provided that all the input dictionaries have the same format. For example:

Code:
$ python penelope.py -p "bar,foo,zam" -f pl -t pl --output-kobo
will join "bar", "foo" and "zam" into dicthtml-pl.zip. (As usual, remove the dictionary extensions.)

The above will create a separate dictionary entry for each dictionary entry in any input dictionary:

Dict 1: "word" => "definition of word in dictionary 1"
Dict 2: "word" => "definition of word in dictionary 2"
Dict 3: "word" => "definition of word in dictionary 3"

Merged dictionary will have three entries for "word":
"word" => "definition of word in dictionary 1"
"word" => "definition of word in dictionary 2"
"word" => "definition of word in dictionary 3"

If you want to merge the definitions:

Merged dictionary:
"word" => "definition of word in dictionary 1 | definition of word in dictionary 2 | definition of word in dictionary 3"

you must write a custom parser for that; for example, you can adapt this one: https://github.com/pettarin/penelope...ster_parser.py and use the --parser option:

Code:
$ python penelope.py -p "bar,foo,zam" -f pl -t pl --parser customparser.py --output-kobo

Last edited by AlPe; 03-19-2015 at 06:53 AM.
AlPe is offline   Reply With Quote