[mobile-devel] Accented Searching

Tóth Tamás tomika_nospam at freemail.hu
Fri May 28 04:25:58 MST 2010


Hi,

I'm afraid it's not exactly what I would like to see or I just don't 
understand.

Just to be clear here is an example what I would like to have:

Search string can "Jónás" or "jonas" and I want it to find "Jónás" and 
"JÓNÁS" also in both cases.
It's clear that preprocessing the string to be found is not enough in 
this case. As I see a custom compare algorithm has to be implemented.
As I saw the searching part of the source of sword, it uses strcmp (or 
stricmp) that won't work for my UTF8 strings.

Please correct me if I'm wrong.

Best regards,
     Tom

2010.05.26. 20:42 keltezéssel, Troy A. Griffitts írta:
> Searching in SWORD is done against the text after it has been prepared
> by what we call StripFilters. These filters remove tags and other
> aspects of the text before it is searched.
>
> You can create custom strip filters to ignore accents for your language.
> An example of this and how it is done can be seen here:
>
> A search using unaccented search term (μακαρ) over Greek inscriptions
> containing critical annotation:
>
> http://crosswire.org/study/wordsearchresults.jsp?searchTerm=%CE%BC%CE%B1%CE%BA%CE%B1%CF%81&mod=PHI_CHR
>
> This is done by creating a custom strip filter:
>
> http://crosswire.org/svn/sword/trunk/src/modules/filters/papyriplain.cpp
>
> and adding to the module's configuration file phi_chr.conf:
> LocalStripFilter=PapyriPlain
>
> One thing often forgotten which a frontend needs to be sure to do, is to
> first strip the /search term/ itself before passing it to the search method.
>
> e.g.
>
> SWBuf searchString = "μάκαρ"; // note this time the user typed the term
> with an accent.
> searchString = module->StripText(searchString); // calls any strip
> filters associated with the module
> module->search(searchString);
>
> Hope this is helpful.
>
> Troy
>
>
>
>
>
>
> On 05/26/2010 12:28 AM, Tóth Tamás wrote:
>    
>> Dear Konstantin,
>>
>> A few month ago I downloaded recent version of source code of mobile
>> swordreader and made some minor fixes to make ti usable for me (WinMo6
>> WVGA device). I had some plans to make it more comfortable, but as I
>> reached that point where I should have to make some changes in sword
>> core I gave it up (mea culpa).
>>
>> But now as I see you've made a much more usable (I mean first of all
>> finger friendly) frontend with more functionality I'm really happy,
>> because I started to think that nobody work with this platform anymore.
>> Since I don't like java but has 10 years of experience in developing
>> WinCE applications in C++ I would like to offer you my help in this
>> very promising project.
>>
>> Since I'm hungarian the main point I would like to make changes is the
>> handling of accentuated letters in text searching.
>>
>> God bless you,
>> Tóth Tamás
>>
>> 2010.05.25. 13:06 keltezéssel, Konstantin Maslyuk írta:
>>      
>>> Hi All.
>>>
>>> SlideBible project has passed a stage of initial synthesis and now I
>>> think it is possible to open it for testing and hear the first
>>> responses and wishes.
>>>
>>> SlideBible is finger-oriented front-end for SWORD for Windows Mobile
>>> devices. It is no longer reader but not yet full-featured Bible study
>>> application. More detail on wiki page
>>> http://www.crosswire.org/wiki/Frontends:SlideBible
>>>
>>> There you can find links for downloading executable files for Windows
>>> Mobile and Windows 32-bit, so you do not need Windows Mobile device to
>>> test it and give feedback.
>>>
>>> Also is it possible to open new project on Crosswire bug-tracker?
>>>
>>> Blessings.
>>>
>>>
>>> _______________________________________________
>>> mobile-devel mailing list
>>> mobile-devel at crosswire.org
>>> http://www.crosswire.org/mailman/listinfo/mobile-devel
>>>
>>>
>>>        
>>
>> _______________________________________________
>> mobile-devel mailing list
>> mobile-devel at crosswire.org
>> http://www.crosswire.org/mailman/listinfo/mobile-devel
>>      
>
> _______________________________________________
> mobile-devel mailing list
> mobile-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/mobile-devel
>    




More information about the mobile-devel mailing list