Idea: Document Parser for Definitions

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Cruzado_Mainfrm
Forum Contributor
Posts: 346
Joined: Sun Jun 15, 2003 11:22 pm
Location: Miami, FL

Idea: Document Parser for Definitions

Post by Cruzado_Mainfrm »

hi folks! :D
my idea is based on Google's definitions, there is the possibility of making a script, that reads a word bank in a db and check for instances of each word in the document being read, replacing the word with a link to the definition in google.com.
example:
-document-

Code: Select all

<?php
$document = <<<END
Here is the World Wide Web.
END;
?>
1.the word or phrase World Wide Web is in the word bank in the db.
2.the parser reads the '$document', looks for matches of words in the bank and in the doc, and if there's any, adds an archor tag around the word and sets the HREF to what is set the word bank.

in google to get the definition of something u go like this in the keywords:

Code: Select all

define:World Wide Web
the url will look like:
http://www.google.com/search?q=define%3AWorld+Wide+Web

what do u guys think?
i'm not asking for u guys to make the code for me, it's just an idea u know, i was making up my mind...
Gen-ik
DevNet Resident
Posts: 1059
Joined: Mon Aug 12, 2002 7:08 pm
Location: London. UK.

Post by Gen-ik »

Not a bad idea..... although I wouldn't like to be the guy (or girl) that has to fill the database with all words and phrases.
Post Reply