Hello guys, i need some help in assigning a score to a word according to its occurrence in a group of sentences.
<?php
$words="Hello how are you";
$word_array = explode(" ", $words);
$paragraph="Hello! I am fine. How about you? You look good.";
$sencetences = strtok($paragraph, ".!?");
?>
now i'm trying to assign a score to each word in $words e.g Hello=1, how=1, are=0, you=2.
help needed to assign score to words
Moderator: General Moderators
Re: help needed to assign score to words
You have series of related posts here... I'm wondering what are you trying to do?
It seems to me that you want to implement the FULL TEXT search functionality in PHP.
Read this first :
http://dev.mysql.com/doc/refman/5.5/en/ ... earch.html
http://devzone.zend.com/article/1304
Notice the http://dev.mysql.com/doc/refman/5.5/en/ ... words.html - most of your posts here are related to the problem solved there.
It seems to me that you want to implement the FULL TEXT search functionality in PHP.
Read this first :
http://dev.mysql.com/doc/refman/5.5/en/ ... earch.html
http://devzone.zend.com/article/1304
Notice the http://dev.mysql.com/doc/refman/5.5/en/ ... words.html - most of your posts here are related to the problem solved there.
There are 10 types of people in this world, those who understand binary and those who don't