View Single Post
Old 04-17-2015, 12:59 PM   #111
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
Yes, when merging more dictionaries into one, order of the (word, definition) is the same as the order of the input dictionaries. That is:

Code:
Input D1: (word1, defA), (word1, defB), (word2, defC)
Input D2: (word0, defD), (word1, defE), (word2, defF), (word2, defG)
Output D1+D2: (word0, defD), (word1, defA), (word1, defB), (word1, defE), (word2, defC), (word2, defF), (word2, defG)
=== === ===

Note that with the latest version (2.0.2), you can specify the

--merge-definitions

flag, which will collapse all the (word, def1), ..., (word, defN) into a single index entry (word, def1 ... defN), i.e. it concatenates the definitions from all the input dictionaries. Continuing the example above:

Code:
Output D1+D2 (with --merge-definitions):
(word0, defD)
(word1, defA defB defE)
(word2, defC defF defG)
There is also --merge-separator=STRING to specify the separator to be used when merging:

Code:
Output D1+D2 (with --merge-definitions and --merge-separator=" | "):
(word0, defD)
(word1, defA | defB | defE)
(word2, defC | defF | defG)
AlPe is offline   Reply With Quote