Page 1 of 1

How to do text mining in php??

Posted: Tue Nov 20, 2007 8:33 am
by kiko
Hi all,
Does anyone know how to do text mining in php??thanks in advance.

Posted: Wed Nov 21, 2007 1:48 am
by feyd
Yes.

Posted: Wed Nov 21, 2007 5:56 am
by aaronhall
Me too

Posted: Wed Nov 21, 2007 8:38 am
by Rovas
kiko,
First: You put the question of the topic wrong: How do to .... .
Second: Another question wrong: Does anyone ....
Third (most important): Before posting do a little search for your problems on the net, this forum, find and read book, write some code. After some of these options you didn' t find anything, the script didn' t work you post.
Fourth: I don' t understand exactly want you need with text mining.

Posted: Thu Nov 22, 2007 12:44 am
by kiko
yes, i did. Hi Rovas, are you english teacher/lecturer? :D Anyway thanks for telling me my grammar mistakes. I had found the data/text mining from the net before. Basically, the steps are:

1. Fetch HMTL page
2. Strip off the HTML tags
3. Reformat HTML, adjust spacing and remove entities
4. Match content with regular expressions
5. Store content into database

Hopefully i'm not wrong. If I'm wrong, please advice. But now the text mining that I want is like:
When i store a sentence or a paragraph of text into database, it will automatically store some words into my database. for example:
I go to school. The word that will store into database is "school" and it will ignore the "I" and "go to". I think is something like google search.

Now I'm thinking of two ways to do it.
1: static the word first. Like I set "school" will not be strip off.
2: let it be automated.

please advice, thanks.

Posted: Thu Nov 22, 2007 3:11 am
by Rovas
You can use strpos to find the word your searching for (the example given is very helpfull) then add it to the database using mysql_query with an insert query.
Regular expressions are useful when comparing a string that contains many words not such one small word.
You automated by making the script run when the user adds a new entry or you make several functions or a class that search the over the net but I can' t help you here.

AOL Speak

Posted: Thu Nov 22, 2007 10:59 am
by kiko
ok, thanks Rovas I'll read through it...because i'm not so familiar with the text mining, if still have other question will keep to post it here...thanks..