Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Form validation/Search script

by wfsp (Abbot)
on Oct 24, 2005 at 19:47 UTC ( [id://502570]=note: print w/replies, xml ) Need Help??


in reply to Form validation/Search script

Hi No-Lifer!

One way to go about this is to first build a list of keywords and then all you need do is a lookup.

You could use HTML::TokeParser to extract the text from each page and something like this to extract the words (what are your plans for common words, accents, hypens, numbers etc.?).

Then load the words into a DB (I use DBM::Deep) with a reference to each file that contains each word (I use another D::D for the file refs).

All you have to bear in mind is to apply the same rules to the words submitted as you did when you built the index.

Then perhaps HTML::Template to format the results and CGI::Session to display them a page at a time.

At the moment I build the index locally and upload it. There are about 2k pages and the index comes in at a shade under 42k words (12MB). And, fingers crossed, it's working well.

I would be interested in seeing an outline of how you plan to go about this. We may be able to make some suggestions before you commit yourself to any particular strategy.

Good luck!

After writing this I saw your reply to Limbic~Region. My advice above still stands.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2024-04-16 17:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found