Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 01-23-2015, 08:05 AM   #691
sadowski
Connoisseur
sadowski ought to be getting tired of karma fortunes by now.sadowski ought to be getting tired of karma fortunes by now.sadowski ought to be getting tired of karma fortunes by now.sadowski ought to be getting tired of karma fortunes by now.sadowski ought to be getting tired of karma fortunes by now.sadowski ought to be getting tired of karma fortunes by now.sadowski ought to be getting tired of karma fortunes by now.sadowski ought to be getting tired of karma fortunes by now.sadowski ought to be getting tired of karma fortunes by now.sadowski ought to be getting tired of karma fortunes by now.sadowski ought to be getting tired of karma fortunes by now.
 
Posts: 84
Karma: 1142796
Join Date: Jul 2009
Device: Sony PRS 350, Kobo mini, PB mini
Thanks for responding. By inflection, do you mean a set of rules like "ies" --> "y" which in an English dictionary would allow to find "dictionary" when searching for "dictionaries"? Or do you mean brute force enumeration of all forms of a word within the dictionary, so that in this example it would contain both dictionary and dictionaries?

Pocketbook dictionaries allow this kind of substitution rules as part of the dictionary file (called "morphemes").
sadowski is offline   Reply With Quote
Old 01-23-2015, 08:47 AM   #692
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,727
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by sadowski View Post
Thanks for responding. By inflection, do you mean a set of rules like "ies" --> "y" which in an English dictionary would allow to find "dictionary" when searching for "dictionaries"?
AFAIK, StarDict doesn't support rule-based inflection lookups. However, dictionary authors can define inflections/synonyms in StarDict dictionary source files with pipe symbols ('|'). For example:

Code:
go|goes|going|went
to move from one place to another

bring|brings|bringing|brought
to take or go with (someone or something) to a place.
Doitsu is offline   Reply With Quote
Old 01-23-2015, 09:09 AM   #693
CaptainD
Junior Member
CaptainD began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Dec 2014
Device: Kindle Paperwhite
Hi!

Thank you for the app. I have a few questions:

There is no html books in default Kindle book list. To open html, I have to launch
KUAL -> Koreader -> Start file manager -> .html file
Is it possible to view html in Kindle book list?

Some files could be opened in default reader and in Koreader (pdf, for example). For these books, can I choose app for reading?

Is it possible to highlight the text and make any clippings or comments? As I see, the only way to make notes in Koreader is bookmark.
CaptainD is offline   Reply With Quote
Old 01-23-2015, 01:50 PM   #694
CaptainD
Junior Member
CaptainD began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Dec 2014
Device: Kindle Paperwhite
Quote:
Originally Posted by CaptainD View Post
Hi!
Is it possible to highlight the text and make any clippings or comments? As I see, the only way to make notes in Koreader is bookmark.
I found it.
But there is a strange thing: highlight menu appears when I select few words from the book and it doesn't appears when I select single word.
The menu has only two active items: "Highlight" and "Translate".
Attached Thumbnails
Click image for larger version

Name:	screenshot_2015_01_23T21_44_38+0259.png
Views:	319
Size:	45.4 KB
ID:	134110   Click image for larger version

Name:	screenshot_2015_01_23T21_45_02+0259.png
Views:	348
Size:	48.2 KB
ID:	134111  
CaptainD is offline   Reply With Quote
Old 01-24-2015, 08:05 AM   #695
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: 955
Karma: 149907
Join Date: Jul 2013
Location: Rotterdam
Device: HiSenseA5ProCC, Cracked OnyxNotePro, Note5, Kobo Glo, Aura
Expanding the functionality of dictionary lookup

Quote:
Originally Posted by sadowski View Post
The "fuzzy" search algorithm that stardict implements can give inadequate results sometimes....

There seem to be 2 problems with this look-up algorithm:
1. If there is no exact match, stardict falls back to a fuzzy search,...

2. In most Europen languages, words roots can be found by manipulating endings, e.g., typically --> typical. This is language specific but makes dictionaries much more efficient.
Anyone else stumbled over this? Any suggestions?

On the koreader/sdcv page
Chrox refers for info to a man page. In the description it states:
Quote:
sdcv is simple, cross-platform text-base utility for work with dictionaries in StarDict's format. The word from "list of words" may be string with leading '/' for using Fuzzy search algorithm, with leading '|' for using full-text search, string may contain '?' and '*' for using regexp search....
Sdcv is called in line 67 in readerdictionary.lua:
Code:
 local std_out = io.popen(
    "./sdcv --utf8-input --utf8-output -nj "
    ..
    ("%q"):format(word)
 , "r")
From the man page the only switch I don't understand is "-nj". The "n" would be for non-interactive, but the "j" eludes me.

More importantly there is no leading "/" for Fuzzy search algorithm, nor leading "|" for using full-text search. So sdcv doesn't run in fuzzy logic mode for koreader.

This does however give you some room for experimenting with sdcv. You could simply alter line 67 and add at the end of the first part of the string a "|":
Code:
 "./sdcv --utf8-input --utf8-output -nj |"
I would be interested whether those changes have an impact on your problem.

As sdcv is apparently chosen because of simplicity a more complex approach to dictionary lookup would either mean that you'll have to write code to preformat the "word" or to implement an alternative command line utility with more features. The emphasis on command line use is that it can be called from within the lua-code with a one-line command! Anything more complex would require extra code to wrap around the utility and thus more time for execution.
Markismus is offline   Reply With Quote
Old 01-26-2015, 03:13 AM   #696
sadowski
Connoisseur
sadowski ought to be getting tired of karma fortunes by now.sadowski ought to be getting tired of karma fortunes by now.sadowski ought to be getting tired of karma fortunes by now.sadowski ought to be getting tired of karma fortunes by now.sadowski ought to be getting tired of karma fortunes by now.sadowski ought to be getting tired of karma fortunes by now.sadowski ought to be getting tired of karma fortunes by now.sadowski ought to be getting tired of karma fortunes by now.sadowski ought to be getting tired of karma fortunes by now.sadowski ought to be getting tired of karma fortunes by now.sadowski ought to be getting tired of karma fortunes by now.
 
Posts: 84
Karma: 1142796
Join Date: Jul 2009
Device: Sony PRS 350, Kobo mini, PB mini
Quote:
From the man page the only switch I don't understand is "-nj". The "n" would be for non-interactive, but the "j" eludes me.

More importantly there is no leading "/" for Fuzzy search algorithm, nor leading "|" for using full-text search. So sdcv doesn't run in fuzzy logic mode for koreader.
The "-j" has been added to this sdcv version and means "JASON output" to return the output somehow formatted for display.

Even if the "/" is not preceding the query, fuzzy search is the fall-back if no exact match is found, I looked this up in the source. The leading "|" would not help since it seems to mean full search in all text, not just the word list.

For many (European) languages it would be better to fall back to return a list of words that precede and follow the search query in lexicographical order. Even better would be if we would have language-specific rules how to modify the query to find word roots or singular for plural etc. Just the fuzzy search seems to be inadequate.
sadowski is offline   Reply With Quote
Old 01-26-2015, 03:26 AM   #697
hawhill
Wizard
hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.
 
hawhill's Avatar
 
Posts: 1,379
Karma: 2155307
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
It's "JSON", which is a data syntax.

Yes, sdcv does a fallback. And to be more exact, it is a levenshtein distance based search. That will always have it drawbacks. But then, it's what sdcv offers. sdcv is upstream code and isn't likely to implement more features soon (I guess).

I started an implementation of a stardict dictionary parser in Lua, but it's in no way finished and it will still need considerable development to bring about something useful with it.

@CaptainD: Can you file an issue for this in https://github.com/koreader/kpvbooklet ?
hawhill is offline   Reply With Quote
Old 01-26-2015, 04:32 AM   #698
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: 955
Karma: 149907
Join Date: Jul 2013
Location: Rotterdam
Device: HiSenseA5ProCC, Cracked OnyxNotePro, Note5, Kobo Glo, Aura
Quote:
Originally Posted by hawhill View Post
I started an implementation of a stardict dictionary parser in Lua, but it's in no way finished and it will still need considerable development to bring about something useful with it.
Nice. I would love to take a look at the code and maybe help development along for a bit.
Markismus is offline   Reply With Quote
Old 01-26-2015, 04:42 AM   #699
sadowski
Connoisseur
sadowski ought to be getting tired of karma fortunes by now.sadowski ought to be getting tired of karma fortunes by now.sadowski ought to be getting tired of karma fortunes by now.sadowski ought to be getting tired of karma fortunes by now.sadowski ought to be getting tired of karma fortunes by now.sadowski ought to be getting tired of karma fortunes by now.sadowski ought to be getting tired of karma fortunes by now.sadowski ought to be getting tired of karma fortunes by now.sadowski ought to be getting tired of karma fortunes by now.sadowski ought to be getting tired of karma fortunes by now.sadowski ought to be getting tired of karma fortunes by now.
 
Posts: 84
Karma: 1142796
Join Date: Jul 2009
Device: Sony PRS 350, Kobo mini, PB mini
Quote:
Originally Posted by hawhill View Post
I started an implementation of a stardict dictionary parser in Lua, but it's in no way finished and it will still need considerable development to bring about something useful with it.
Could some of this be easier done in the startdict source? I see in the sdcv code that some language-specific query modification is done for English, e.g., -ies/-y in lib/lib.cpp, LookupSimilarWord(). I just did not figure out how to cross-compile for Kobo, otherwise I would give it a try.
sadowski is offline   Reply With Quote
Old 01-26-2015, 07:32 AM   #700
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: 955
Karma: 149907
Join Date: Jul 2013
Location: Rotterdam
Device: HiSenseA5ProCC, Cracked OnyxNotePro, Note5, Kobo Glo, Aura
Quote:
Originally Posted by sadowski View Post
Could some of this be easier done in the startdict source?...I just did not figure out how to cross-compile for Kobo, otherwise I would give it a try.

Developers can install
not only the koreader files, but also the koreader-base files. This would allow you to build and emulate koreader, including sdcv.
Normally the koreader github has a reference to the current koreader-base (first line), but if you install them yourself you can change and compile to your liking. In the koreader-base files there is a similar link to the current sdcv ( sdcv-0.4.2 @ 9ee1c9e). So you could also install those files and start tweaking.

All the compiling and emulation would be taken care of by the makefiles already in place. And if your tweaks/coding would be as effective as you hope for, you could send a pull-request to koreader-sdcv and have discuss your changes and add them to koreader!
Markismus is offline   Reply With Quote
Old 01-26-2015, 08:15 AM   #701
PieMan597
Still a pie
PieMan597 ought to be getting tired of karma fortunes by now.PieMan597 ought to be getting tired of karma fortunes by now.PieMan597 ought to be getting tired of karma fortunes by now.PieMan597 ought to be getting tired of karma fortunes by now.PieMan597 ought to be getting tired of karma fortunes by now.PieMan597 ought to be getting tired of karma fortunes by now.PieMan597 ought to be getting tired of karma fortunes by now.PieMan597 ought to be getting tired of karma fortunes by now.PieMan597 ought to be getting tired of karma fortunes by now.PieMan597 ought to be getting tired of karma fortunes by now.PieMan597 ought to be getting tired of karma fortunes by now.
 
PieMan597's Avatar
 
Posts: 6,285
Karma: 37018654
Join Date: Jan 2014
Location: PieTown USA
Device: Kindle Touch, OnePlus 7 Pro
Hey Hawhill, nice reading app for my Kindle! Thanks!
PieMan597 is offline   Reply With Quote
Old 01-26-2015, 10:08 AM   #702
hawhill
Wizard
hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.
 
hawhill's Avatar
 
Posts: 1,379
Karma: 2155307
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
Thanks are appreciated. However, Koreader didn't get what it is by just one author. In fact, the majority of the code is the work of others - and was created in cooperation. Koreader is Open Source, and it is also created in an effort open to anyone. So let's say "thank you" to the whole development community!
hawhill is offline   Reply With Quote
Old 01-26-2015, 10:13 AM   #703
hawhill
Wizard
hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.
 
hawhill's Avatar
 
Posts: 1,379
Karma: 2155307
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
Quote:
Originally Posted by sadowski View Post
Could some of this be easier done in the startdict source? I see in the sdcv code that some language-specific query modification is done for English, e.g., -ies/-y in lib/lib.cpp, LookupSimilarWord(). I just did not figure out how to cross-compile for Kobo, otherwise I would give it a try.
Of course you can hack your way through the sdcv code. But don't dump the changes at koreader - better have them go upstream. Chances are, however, that people are not willing to staple more hacks on those that are already present. At least, I don't consider these hardcoded modifications a "clean approach". Without investigation, I simply guess that they were a fast way to scratch an itch.

Reimplementing sdcv in Lua serves another approach, however. At least that is the reason I started to do so. On Android builds of Koreader, it's a bit messy to start external processes. And it would simply be nice to have an implementation that is easy to hack on. E.g. a language-based plugin system could be so much easier to do in Lua, since Lua allows for a bit more dynamic approach to developing stuff. (not meant to start a language war. C++ is also a fine language.)
hawhill is offline   Reply With Quote
Old 01-26-2015, 11:56 AM   #704
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: 955
Karma: 149907
Join Date: Jul 2013
Location: Rotterdam
Device: HiSenseA5ProCC, Cracked OnyxNotePro, Note5, Kobo Glo, Aura
Quote:
Originally Posted by hawhill View Post
But don't dump the changes at koreader - better have them go upstream.
I thought the Stardict development was quite dead. Is it still ungoing then?
Markismus is offline   Reply With Quote
Old 01-26-2015, 12:14 PM   #705
peaceridge
Wizard
peaceridge ought to be getting tired of karma fortunes by now.peaceridge ought to be getting tired of karma fortunes by now.peaceridge ought to be getting tired of karma fortunes by now.peaceridge ought to be getting tired of karma fortunes by now.peaceridge ought to be getting tired of karma fortunes by now.peaceridge ought to be getting tired of karma fortunes by now.peaceridge ought to be getting tired of karma fortunes by now.peaceridge ought to be getting tired of karma fortunes by now.peaceridge ought to be getting tired of karma fortunes by now.peaceridge ought to be getting tired of karma fortunes by now.peaceridge ought to be getting tired of karma fortunes by now.
 
peaceridge's Avatar
 
Posts: 1,019
Karma: 4407864
Join Date: Feb 2009
Location: North Carolina
Device: Kobo Aura1, Nexus7.2, Galaxy Tab A 8.4, Ipad Air & Mini 6
I don't have enough bandwidth to go through all 47 pages, so please allow me this question. I want to try KoReader on my android Nexus 7 2013, but can't find it in the google store. How do I go about getting a copy? Thanks.
peaceridge is offline   Reply With Quote
Reply

Tags
application, k5 tools, kindle, koreader, launcher add-ons, lua, reader, touch


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
KPV: a PDF reader for Kindle, based on muPDF, GPLv3 hawhill Kindle Developer's Corner 1056 11-11-2017 03:07 AM
Hacked Up Reader for epub/fb2/txt/rtf/html/pdb/etc bhaak Kindle Developer's Corner 296 10-01-2016 01:11 PM
html to fb2 or epub rulet Conversion 7 06-24-2012 05:54 PM
Raccoon Reader - reads ePub, fb2, fb2.zip, txt on WP7 for free Andrei_Shvydryk Reading and Management 0 10-31-2011 03:17 PM
A real PDF to epub/djvu/rtf/html software?. DsOft ePub 35 01-02-2011 03:57 PM


All times are GMT -4. The time now is 12:28 PM.


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