Hi all,
Does anyone know how to do text mining in php??thanks in advance.
How to do text mining in php??
Moderator: General Moderators
How to do text mining in php??
Last edited by kiko on Fri Nov 23, 2007 9:28 am, edited 1 time in total.
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.
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.
yes, i did. Hi Rovas, are you english teacher/lecturer?
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.
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.
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.
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.