[sword-devel] Rapier Nokia tablet frontend

Jonathan Morgan jonmmorgan at gmail.com
Mon Jan 21 03:18:26 MST 2008

On Jan 21, 2008 9:08 PM, Eeli Kaikkonen <eekaikko at mail.student.oulu.fi> wrote:
> Here is a question from sword-support and my response.
> The source code package is here:
> http://repository.maemo.org/extras/pool/bora/free/source/r/rapier/
> *****************************************************
> > Rapier for Maemo Linux has been released for the Nokia N810 (already
> ran on
> > 800 & 770) and is a sword based app.  I was wondering why there's no
> mention
> > of it on the main crosswire.org site?
> >
> > I don't have the url handy at the moment.
> http://hurdygurdy.dyndns.org/maemosword/
> Very interesting, because we know nothing about it and we have been
> asked if we have a Nokia tablet software.
> It is possible to develop software using the Sword library and not tell
> us about it. Obviously that's each developer's own decision.

There have been at least two threads about maemosword, one started
24/1/2007, the other 14/2/2007.  I include the second one below.


---------- Forwarded message ----------
From: Pierre Amadio <pierre.amadio at libertysurf.fr>
Date: Feb 14, 2007 3:43 AM
Subject: [sword-devel] python search with lucene indexes ?
To: sword-devel at crosswire.org

Hi there.

Thanks to you, i have resolved my main python sword issue and am now
able to access sword module in the python2.5 that comes with maemo.

So, i have a nice little GUI application:


Now, the search feature is really time consuming. It tooks something
like 2 mn. During this time, the application is frozen (this is another
issue that i m trying to dealt with as well), so the faster the search
is, the better.

Chatting on irc, i have been told that using lucene indexes should make
search more effective.

So, i managed to package clucene for maemo as well as recompile sword
--with-lucene (this is not available on the web page yet, but i have it
on my local laptop). I have generated an index for my KJV module with

mkfastmod KJV

Now, my question is...How am i supposed to use lucene indexes ?
I'm using python with the swig bindings.

Looking at sword-1.5.9/src/modules/swmodule.cpp i found:

 * SWModule::Search     - Searches a module for a string
 * ENT: istr            - string for which to search
 *      searchType      - type of search to perform
 *                              >=0 - regex
 *                              -1  - phrase
 *                              -2  - multiword
 *                              -3  - entryAttrib (eg.
 *                              Word//Lemma/G1234/)
 *                              -4  - clucene
 *      flags           - options flags for search
 *      justCheckIfSupported    - if set, don't search, only tell if
 *      this
 *                                                      function
 *                                                      supports
 *                                                      requested
 *                                                      search.
 * RET: ListKey set to verses that contain istr

It looks like all that is needed is to use '4' as an argument to the
search function, wich, in python should be in the module doSearch

I have attached to this mail a test case in python that try to find
occurences of 'knock' with different value for the second argument of
doSearch. I was expecting to have faster result when the value of this
argument was 4, but still, it takes me roughly 18 seconds on my laptop,
whatever the value of the second argument.

How faster is supposed to be the use of the lucene index ?

Any idea as to what i may do wrong ?

Have a nice day !

Pierre Amadio

sword-devel mailing list: sword-devel at crosswire.org
Instructions to unsubscribe/change your settings at above page

More information about the sword-devel mailing list