[jsword-devel] JSword version and Indexing Jobs
DM Smith
dmsmith555 at yahoo.com
Sat Jan 26 06:42:19 MST 2008
On Jan 26, 2008, at 1:03 AM, Brian Fernandes wrote:
> DM,
>
> 1) Is it possible to query the JSword version through API? I did try a
> brief search but that drew a blank.
Yes. It should be. I'm assuming that you mean a Lucene search rather
than a Sword lookup. Give me more to go on and and perhaps I can point
you in the right direction or work up and example.
>
>
> 2) I'm really impressed with the speed of Lucene's searching/indexing
> already, am looking forward to the next version where it is so much
> faster.
I reported that Lucene, just as a drop in is significantly faster.
Turns out that Lucene did not allow for fundamental object reuse (such
as Document and Token) but now does. I'm working on using it ant it is
even faster. Indexing a Plaintext Bible is almost instantaneous,
indicating that most of our time is spent parsing the document to hand
it to Lucene and drawing the progress bar.
>
>
> On to my problem...
> In my extension, I add a WorkListener to the JobManager during
> indexing
> so that I may monitor and report progress. In #workProgressed, I
> update
> my progress bar with the section name from the job. This works
> perfectly.
>
> However, unlike BibleDesktop, my progress bar is small, perhaps 100
> pixels wide. The job section names during indexing are something like
> "Creating Index. Processing Genesis" and so on, sometimes the text
> overflows out of the progress boundaries region depending on length of
> the book name. I would probably display just "Indexing Genesis" for my
> small progress bar.
> This would be an easy mod if the text was always going to be "Creating
> Index. Processing X", but since JSword is I18Ned, it is not so easy to
> arrive at a generic solution.
> Would it be possible to change the job section name to just "Genesis"
> instead, the rest of the description to be managed by a UI element? I
> realize that the job is not always in the "Creating Index" phase and
> it
> could be Optimizing as well (and this would change the "complete"
> description in the UI) but hopefully that phase can be ascertained by
> looking at the completion percentage.
>
> Am open to any other suggestions you may have to deal with this issue.
This is fine to me, I think that the other translators are all still
active and I'd like to see their response too.
Perhaps, the book name is all that is needed, since the progress bar
has the immediate context of the user clicking on the "Create Index"
button.
Also, we can use short Bible book names. This will be perfect for
small devices. (If we can ever migrate to midp 2.0!) Currently, we use
the user's preferred form of the book name.
>
>
> Keep up the great work with JSword, has been a real pleasure working
> with it.
After our discussions here, feel free to submit a patch.
I'm looking forward to your contributions!
More information about the jsword-devel
mailing list