![]() |
#16 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
|
There is a word count function embedded inside Calibre, currently used internally for heuristics. With the new plugin framework it should be simple to create a user interface plugin for this. What would people want done with the information? I'm thinking populate a user configurable column might be the way to go.
|
![]() |
![]() |
![]() |
#17 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
|
|
![]() |
![]() |
Advert | |
|
![]() |
#18 | |
2 lzy 2 update this...
![]() Posts: 9
Karma: 10
Join Date: Apr 2011
Device: jetbook
|
Quote:
Is there any way to add a metadata field to hold the page or word count, then have it populate on either an add or a database check? It would extend the time for a db check, but that takes some time for 10,000 books anyways...and I wouldn't think it would add too much overhead to the add function, since people aren't likely to try adding that many books at once. I'm not sure if adding a metadata field to a book is available to the average user, though, or if it would require a plugin. That's outside my expertise, i'm afraid... ![]() |
|
![]() |
![]() |
![]() |
#19 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
|
Custom column = custom book metadata field. Thus, the same performance consideration would apply, unless the plugin calculated the number once and stored it in a numerical column. That way, the calculation would be user initiated only.
|
![]() |
![]() |
![]() |
#20 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
|
Quote:
In other words the user would need to manually populate the field by using the plugin - this would be the equivalent of what you mean by pre-computed, correct? If the user did select several thousand books and ask to compute word count for them all this would indeed be a hit of many minutes, but I think it would be one time this way, right? My problem might have been my use of the term 'custom column', not sure if that means a column that's dynamically populated to some people. Last edited by ldolse; 04-19-2011 at 06:11 AM. |
|
![]() |
![]() |
Advert | |
|
![]() |
#21 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
@idolse: yes, that is what I mean by precomputed. If the plugin populates a integer (or float?) custom column, then the performance penalty during search & sort is close to zero.
As for how often things are computed: certainly doing a word count on thousands of books will take a while. You might consider storing the date the format was last changed (database2.format_last_modified) in plugin storage (use the per-book persistent data feature). You could then provide an 'update' function that compares the stored date with the format's current date, and recompute the count only if the format has changed. You might also consider working through the formats in some order until you find one that is not DRM infested. |
![]() |
![]() |
![]() |
#22 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
|
Quote:
|
|
![]() |
![]() |
![]() |
#23 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,057
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
My 2 cents
What don't you count when you calculate the word count. Front matter(copyright, books by author...)? Teasers for other books? Pages of 'Rave reviews'? Sample chapters? Glossary? Dramatis Persona? ![]() I guess I never worry about word count. When I get to 'The End', I am done ![]() |
![]() |
![]() |
![]() |
#24 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
|
Quote:
|
|
![]() |
![]() |
![]() |
#25 | |
2 lzy 2 update this...
![]() Posts: 9
Karma: 10
Join Date: Apr 2011
Device: jetbook
|
Quote:
If we had access to a stored word count for each book, that could be converted to approximate page count easily by dividing by 200 (or 500 or whatever the typical number of words on a page is, idk). One quick question though: would the calculated word counts be persistent, or would they have to be re-calculated (at the user's request of course) each time the program starts up? Thanks! cc |
|
![]() |
![]() |
![]() |
#26 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
|
It would persist as part of the books metadata.
|
![]() |
![]() |
![]() |
#27 |
2 lzy 2 update this...
![]() Posts: 9
Karma: 10
Join Date: Apr 2011
Device: jetbook
|
|
![]() |
![]() |
![]() |
#29 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
|
Quote:
|
|
![]() |
![]() |
![]() |
#30 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
|
MS word used to compute a readability factor ( maybe still does but I've not looked). based IIRC on stuff like number of words per sentence.
anyways that stats generated by Word ( & how it computes them) is a possible starting point for compiling a wish list of useful? book info |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Romance Ebers, Georg: A Word, Only a Word. V1. 20 Mar 2009 | crutledge | Kindle Books | 0 | 03-20-2009 08:14 AM |
Romance Ebers, Georg: A Word, Only a Word. V1. 20 Mar 2009 | crutledge | IMP Books | 0 | 03-20-2009 08:12 AM |
Romance Ebers, Georg: A Word, Only a Word. V1. 20 Mar 2009 | crutledge | BBeB/LRF Books | 0 | 03-20-2009 08:10 AM |
Romance Ebers, Georg: A Word, Only a Word. V1. 20 Mar 2009 | crutledge | ePub Books | 0 | 03-20-2009 08:09 AM |
Convert word DOCs when you don't have WORD ? heheh | macthekitten | Calibre | 9 | 01-30-2009 07:41 AM |