Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: character substitution in search

by athomason (Curate)
on Jun 19, 2000 at 19:52 UTC ( [id://18816]=note: print w/replies, xml ) Need Help??


in reply to character substitution in search

Without rules defining what characters to swap out, Perl can't distinguish between characters that should be modified and those that shouldn't. This is a pretty difficult problem, since accent rules alone require splitting words into syllables and knowing the rules for both regular and irregular accentuaton. There are a few solutions here. First, you may indeed want to code all these in, even as rough as that would be. That would entail finding comprehensive rule sets for your language(s) and recording all common exceptions. The opposite way is to decrease the resolution of your search space rather than artificially increase the resolution of your search term (see lhoward's code above). In other words, modify your search indexer so that non-keyboard letters are transliterated into the corresponding keyboard letters. The problem with this, of course, is that you'll get a few false matches. A last approach would be one like killedar was pursuing here, which has the user learn a few non-naturally occuring character combinations which stand in for modified letters. Obviously, users don't like learning how to type again for your site. Then again, there may be a standard way of doing this which I haven't heard of; look around at how other language sites handle the same problem.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://18816]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2024-04-20 03:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found