[sword-devel] BibleCS Installer: SWORD_PATH
DM Smith
dmsmith555 at yahoo.com
Fri Feb 10 14:46:53 MST 2006
L.Allan-pbio wrote:
>> L.Allan-pbio wrote:
>>> (something I'm unclear about .... does JSword use the C++ api in
>>> some manner of "binding", or does it have an independent "reversed
>>> engineered" api written in Java?)
>>>
>> JSword does not use any C++. It is pure Java. It also does not call
>> any executables, such as InstallManager.exe.
>
> Interesting .... I suppose I ought to install JSword and get more
> familiar with it.
You can get it at http://www.crosswire.org/bibledesktop/download.html ,
use the Windows installer if on Windows.
>
> Is there an expectation from CrossWire that JSword implement a very
> faithful "reverse engineering" of the C++ sword-api?
There were discussions early on as to whether it should be a "port" of
C++. There were several efforts to do just that. But before long it was
decided that it would be best to write Java like Java and not C++. I
don't know if there is an expectation any more that it be a call level port.
JSword may have started as a reverse engineering of the C++ code, but
today the internal architecture and the actual code have little or no
resemblance to the C++.
> How much flexibility and degree of allowed incompatability have you
> found to be the case, if any?
Compatibility really should be measured at the module level.
We have not implemented General Books and one type of dictionary (which
only applies to a single dictionary).
We also have not implemented the ability to write modules.
At this point in time I am not aware of any incompatibilities other than
what has not been implemented.
BibleCS has some features that BibleDesktop does not and visa versa. But
we are not in competition with Sword so that doesn't really matter.
As to flexible, our architecture lends to flexibility. Nearly every core
functionality is a plugin.
>
> I'm especially curious about what kind of search performance you
> experience. That is VERY CPU intensive.
Yes, but searches are fast on my machine! Searching for 'a' takes less
than 10 seconds. This brings back nearly every verse. It turns out that
the search time is actually less than a second or two, but the overhead
we impose on the answer set makes it bigger.
> Does JSword implement an architecture of filters that is strict or
> relaxed as far as compatibility with the C++ sword-api?
Not really. We have things called filters, but really all they do is
convert a fragment of GBF, ThML, Plain Text or OSIS into a complete OSIS
document.
This OSIS document is then transformed with xslt into HTML (in our case,
any transformation could be supplied). The various abilities such as
showing/hiding Notes, Strongs, cross references and the like are all
parameters to the xslt. So we don't layer filters. (Though we could
chain xslt transformations)
So if a new "feature" is added to a module, the change is really minor.
If we make it visible to the user, we change a few files to add the
choice to the UI and we also change the xslt to handle that new feature.
You can get a feel for how it easy it is to work with by looking at:
http://crosswire.org/jsword/java2html/org/crosswire/jsword/examples/APIExamples.java.html
> My understanding is that Lucerne is Java based, wth CLucerne based on
> it. Does JSword use Lucerne?
We use lucene exclusively for searching and indexing. We still use the
modules index files for lookup.
We have extended lucene to be able to search for hits in one verse to be
in proximity to hits in another verse.
For example "Find all verses containing Adam within 5 verses of those
containing Eve"
And we have extended lucene to allow searching on a subset of verses,
E.g. [matt-rev]
All the power of lucene is available so you can do fuzzy searches, among
other things.
And we index everything, a, in, the, .... because so many theologically
rich phrases includes these common words, "in Christ", "Christ in you"
The only gotcha is that it takes lots of horsepower and a bit of
cooperation with the OS and virus scanners to index a bible.
On my Windows machine, with "indexing" turned on and a virus scanner on,
it took over 20 minutes to index a file. Turn both of them off and it
takes less than 5 minutes. On Linux on the same hardware it takes about
3 minutes.
Well enough about JSword. If you would like to hear more, join
jsword-devel at crosswire.org. Feel free to lurk there. Though not much is
happening right now.
More information about the sword-devel
mailing list