Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > PocketBook > PocketBook Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 12-04-2019, 03:50 PM   #16
Marco77
Connoisseur
Marco77 can illuminate an eclipseMarco77 can illuminate an eclipseMarco77 can illuminate an eclipseMarco77 can illuminate an eclipseMarco77 can illuminate an eclipseMarco77 can illuminate an eclipseMarco77 can illuminate an eclipseMarco77 can illuminate an eclipseMarco77 can illuminate an eclipseMarco77 can illuminate an eclipseMarco77 can illuminate an eclipse
 
Posts: 55
Karma: 8430
Join Date: Mar 2016
Device: PW3, Clara HD, PB740
Maybe override the Dictionary.app executable with your own program, but you'd have to implement how it interacts with the rest of the framework
Code:
//! \defgroup Dictionary Dictionary functions
//! \{
// Dictionary functions

char **EnumDictionaries();
int OpenDictionary(const char *name);
void CloseDictionary();
int LookupWord(const char *what, char **word, char **trans);
int LookupWordExact(const char *what, char **word, char **trans);
int LookupPrevious(char **word, char **trans);
int LookupNext(char **word, char **trans);

//! \brief GetWordListWithPrefix get up to maxWords words with given prefix from current dictionary.
//! Function is not reentrant
//! \param prefix - prefix to find words (in utf-8)
//! \param maxWords - maximum words to find (should not be > 255)
//! \param wordList - resulting list of words (in utf-8), caller should not free the list
//! \return number of words found or 0 on error
int GetWordListWithPrefix(const char *prefix_utf8, int maxWords, char ***wordList);

void OpenDictionaryView(iv_wlist *wordlist, const char *dicname);
void OpenControlledDictionaryView(pointer_to_word_hand_t pointer_handler, iv_wlist *wordlist, const char *dicname);
void OpenFastTranslation(pointer_to_word_hand_t pointer_handler, iv_wlist *wordlist, int pos, const char *dicname);
//! \}
OpenNotepad, CreateNote


It's sad, but the built-in app is lacking (navigating between multiple entries for the same word, for instance)
Marco77 is offline   Reply With Quote
Old 12-04-2019, 04:53 PM   #17
Markismus
Guru
Markismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicing
 
Markismus's Avatar
 
Posts: 911
Karma: 149881
Join Date: Jul 2013
Location: Netherlands
Device: HiSenseA5ProCC, Cracked OnyxNotePro, Note5, Kobo Glo, Aura
Quote:
Originally Posted by Marco77 View Post
It's sad, but the built-in app is lacking (navigating between multiple entries for the same word, for instance)
Ah, that's going to annoy the f*ck out of me. I could introduce symbols like "2" and "3" behind the search term, so that if you want the second entry you put "2" directly behind your search term, if you want the third "3", etc. Still, rather unelegant and it would need an explanation, which I don't know how to implement. Maybe a last sentence in a split article "For next page search for keyword2".

I already hate that you can't lookup words from the dictionary by tapping/holding them. If that was possible, I could chain the definitions that way.

Last edited by Markismus; 12-04-2019 at 04:55 PM.
Markismus is offline   Reply With Quote
Advert
Old 12-04-2019, 05:19 PM   #18
ezdiy
Zealot
ezdiy can grok the meaning of the universe.ezdiy can grok the meaning of the universe.ezdiy can grok the meaning of the universe.ezdiy can grok the meaning of the universe.ezdiy can grok the meaning of the universe.ezdiy can grok the meaning of the universe.ezdiy can grok the meaning of the universe.ezdiy can grok the meaning of the universe.ezdiy can grok the meaning of the universe.ezdiy can grok the meaning of the universe.ezdiy can grok the meaning of the universe.
 
Posts: 121
Karma: 156515
Join Date: Oct 2019
Device: KT, KPW4, PB740-2
https://github.com/koreader/koreader...ionary-support

Seriously, ditch the internal dictionary in the long term. koreader supports stardict directly. I think best would be just hack koreader to pose as Dictionary.app too, the script invoking its dictionary lookup dialog routine directly even w/o book opened.
ezdiy is offline   Reply With Quote
Old 02-13-2020, 02:28 PM   #19
Markismus
Guru
Markismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicing
 
Markismus's Avatar
 
Posts: 911
Karma: 149881
Join Date: Jul 2013
Location: Netherlands
Device: HiSenseA5ProCC, Cracked OnyxNotePro, Note5, Kobo Glo, Aura
@ezdiy I adapted the script towards Stardict the last week and towards Koreader, today. The result is beautiful! I finally got html-support for Stardict working as I liked.
The Stardict Oxford English Dictionary 2nd Ed. is now well aligned and in color/gray-scale.

Last edited by Markismus; 11-14-2020 at 08:11 AM.
Markismus is offline   Reply With Quote
Old 04-15-2020, 10:41 AM   #20
In-Feara
Junior Member
In-Feara will become famous soon enoughIn-Feara will become famous soon enoughIn-Feara will become famous soon enoughIn-Feara will become famous soon enoughIn-Feara will become famous soon enoughIn-Feara will become famous soon enough
 
Posts: 2
Karma: 614
Join Date: Apr 2020
Device: Pocketbook
Hi
Could you please try to convert this greek-english dictionary to .dic format?
I've looked for a ready one everywhere, but unfortunately I can't find one.
I found the dictionary here: https://www.babylon-software.com/fre...ish/58402.html
I would be eternally grateful for your help, trying to do this by myself has honestly driven me a little insane.
Thank you so much in advance
In-Feara is offline   Reply With Quote
Advert
Old 04-15-2020, 02:48 PM   #21
Markismus
Guru
Markismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicing
 
Markismus's Avatar
 
Posts: 911
Karma: 149881
Join Date: Jul 2013
Location: Netherlands
Device: HiSenseA5ProCC, Cracked OnyxNotePro, Note5, Kobo Glo, Aura
@In-Feara

I've put it through pyglossary to transform it into Stardict-format. After that I put that through the script to generate xdxf-format and pocketbook dic-format. The results are here.

I can't test it anymore, since my Pocketbook went back to Amazon.de. I haven't found configuration files for the Greek language, so morphemes and keyboard are for english. (So it could be hard to manually input search terms and it won't recognize conjugations.)

Still, I hope it is useful. Let me know!

Last edited by Markismus; 04-18-2020 at 07:50 AM. Reason: Updated url
Markismus is offline   Reply With Quote
Old 04-17-2020, 09:36 AM   #22
In-Feara
Junior Member
In-Feara will become famous soon enoughIn-Feara will become famous soon enoughIn-Feara will become famous soon enoughIn-Feara will become famous soon enoughIn-Feara will become famous soon enoughIn-Feara will become famous soon enough
 
Posts: 2
Karma: 614
Join Date: Apr 2020
Device: Pocketbook
@Markismus
It works with the Greek keyboard, so inputting conjugations isn't much of a problem It works like a charm, thank you so much!
In-Feara is offline   Reply With Quote
Old 05-12-2020, 10:55 AM   #23
Lykke
Groupie
Lykke can program the VCR without an owner's manual.Lykke can program the VCR without an owner's manual.Lykke can program the VCR without an owner's manual.Lykke can program the VCR without an owner's manual.Lykke can program the VCR without an owner's manual.Lykke can program the VCR without an owner's manual.Lykke can program the VCR without an owner's manual.Lykke can program the VCR without an owner's manual.Lykke can program the VCR without an owner's manual.Lykke can program the VCR without an owner's manual.Lykke can program the VCR without an owner's manual.
 
Posts: 159
Karma: 182076
Join Date: Aug 2017
Device: Kobo Libra 2
Does anyone know where I can get the stardict-editor for Windows? It's not bundled with Stardict and can't find it through my internet searches…
Lykke is offline   Reply With Quote
Old 05-12-2020, 12:39 PM   #24
nhedgehog
Guru
nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.
 
Posts: 771
Karma: 625816
Join Date: Sep 2013
Device: EnergySistemEreaderPro, Nook STG, Pocketbook 622, Bookeen Cybooks ...
Found 3 versions in the depths of my harddrive. Have fun.
(PS: Since 7z files are not accepted here I had to zip my 7zip archive)
Attached Files
File Type: zip stardict-editor_2.zip (134.1 KB, 525 views)
nhedgehog is offline   Reply With Quote
Old 05-12-2020, 03:22 PM   #25
Lykke
Groupie
Lykke can program the VCR without an owner's manual.Lykke can program the VCR without an owner's manual.Lykke can program the VCR without an owner's manual.Lykke can program the VCR without an owner's manual.Lykke can program the VCR without an owner's manual.Lykke can program the VCR without an owner's manual.Lykke can program the VCR without an owner's manual.Lykke can program the VCR without an owner's manual.Lykke can program the VCR without an owner's manual.Lykke can program the VCR without an owner's manual.Lykke can program the VCR without an owner's manual.
 
Posts: 159
Karma: 182076
Join Date: Aug 2017
Device: Kobo Libra 2
Quote:
Originally Posted by nhedgehog View Post
Found 3 versions in the depths of my harddrive. Have fun.
(PS: Since 7z files are not accepted here I had to zip my 7zip archive)
Hey thanks, much appreciated.
Lykke is offline   Reply With Quote
Old 05-13-2020, 02:35 AM   #26
eMole
Zealot
eMole ought to be getting tired of karma fortunes by now.eMole ought to be getting tired of karma fortunes by now.eMole ought to be getting tired of karma fortunes by now.eMole ought to be getting tired of karma fortunes by now.eMole ought to be getting tired of karma fortunes by now.eMole ought to be getting tired of karma fortunes by now.eMole ought to be getting tired of karma fortunes by now.eMole ought to be getting tired of karma fortunes by now.eMole ought to be getting tired of karma fortunes by now.eMole ought to be getting tired of karma fortunes by now.eMole ought to be getting tired of karma fortunes by now.
 
Posts: 130
Karma: 546310
Join Date: Jun 2011
Device: PocketBook Touch HD, PocketBook Era
Last version for Windows:
https://github.com/lpdevs/free-dicti...t-editor-3.0.1

For Linux its name is StarDict Tools.
eMole is offline   Reply With Quote
Old 05-14-2020, 03:55 PM   #27
AnimalOfArt
Groupie
AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.
 
AnimalOfArt's Avatar
 
Posts: 175
Karma: 1044642
Join Date: Jun 2017
Device: changing frequently
Quote:
Originally Posted by Markismus View Post
I've succesfully converted Liddell-Scott-Jones, Oxford's Learners dictionary, Duden (de-de), an latin-english dictionary, Nouveau Littre 2011, the Oxford English Dictionary 2nd Ed.and Wordnet.

I tried to convert the xdxf of Duden to stardict with pyglossary, but it fails


Quote:
Exception in Tkinter callback:
Traceback (most recent call last):
File "C:\Python\pyglossary-master\ui\ui_tk.py", line 130, in CallWrapper__call__
return self.func(*args)
File "C:\Python\pyglossary-master\ui\ui_tk.py", line 1120, in convert
finalOutputFile = self.glos.convert(
File "C:\Python\pyglossary-master\pyglossary\glossary.py", line 1040, in convert
if not self.read(
File "C:\Python\pyglossary-master\pyglossary\glossary.py", line 663, in read
result = self.readFunctions[format].__call__(
File "C:\Python\pyglossary-master\pyglossary\plugins\xdxf\__init__.py", line 89, in read
xdxf = XML(f.read())
File "src\lxml\etree.pyx", line 3214, in lxml.etree.XML
File "src\lxml\parser.pxi", line 1876, in lxml.etree._parseMemoryDocument
File "src\lxml\parser.pxi", line 1764, in lxml.etree._parseDoc
File "src\lxml\parser.pxi", line 1127, in lxml.etree._BaseParser._parseDoc
File "src\lxml\parser.pxi", line 601, in lxml.etree._ParserContext._handleParseResultDoc
File "src\lxml\parser.pxi", line 711, in lxml.etree._handleParseResult
File "src\lxml\parser.pxi", line 640, in lxml.etree._raiseParseError
File "<string>", line 331
lxml.etree.XMLSyntaxError: PCDATA invalid Char value 5, line 331, column 15
AnimalOfArt is offline   Reply With Quote
Old 05-14-2020, 05:05 PM   #28
Markismus
Guru
Markismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicing
 
Markismus's Avatar
 
Posts: 911
Karma: 149881
Join Date: Jul 2013
Location: Netherlands
Device: HiSenseA5ProCC, Cracked OnyxNotePro, Note5, Kobo Glo, Aura
Quote:
Originally Posted by AnimalOfArt View Post
I tried to convert the xdxf of Duden to stardict with pyglossary, but it fails
You could convert them with the script, too.
I've uploaded the result to the same place.
Markismus is offline   Reply With Quote
Old 05-14-2020, 05:47 PM   #29
AnimalOfArt
Groupie
AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.AnimalOfArt ought to be getting tired of karma fortunes by now.
 
AnimalOfArt's Avatar
 
Posts: 175
Karma: 1044642
Join Date: Jun 2017
Device: changing frequently
Thank you very much!!
AnimalOfArt is offline   Reply With Quote
Old 05-15-2020, 12:11 PM   #30
Markismus
Guru
Markismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicing
 
Markismus's Avatar
 
Posts: 911
Karma: 149881
Join Date: Jul 2013
Location: Netherlands
Device: HiSenseA5ProCC, Cracked OnyxNotePro, Note5, Kobo Glo, Aura
I've tweaked the script a bit. Apparently, it stumbled over some unknown tags and didn't convert '&' when it was in the <key>-tag.

The resulting PONS EN-DE dictionary with 110k entries is uploaded at the same place. and seems ok. However, let me know if further testing reveals conversion errors.

Attached Thumbnails
Click image for larger version

Name:	Screenshot from 2020-05-15 17-01-05.png
Views:	2159
Size:	127.5 KB
ID:	179244  
Markismus is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Pocketbook dictionary logan PocketBook 322 03-05-2024 10:48 AM
Dictionary coversion from .mobi to pocketbook format? doctorat PocketBook 16 07-01-2020 06:34 PM
Webster's 1913 Dictionary in Pocketbook Format luqmaninbmore PocketBook 8 05-27-2020 11:41 AM
SW>EN Dictionary for Pocketbook tttrine PocketBook 3 06-09-2015 07:01 AM


All times are GMT -4. The time now is 10:13 PM.


MobileRead.com is a privately owned, operated and funded community.