Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
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.

In reply to Re: character substitution in search by athomason
in thread character substitution in search by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2024-04-19 03:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found