I found preg_split and explode functions in php for breaking space seperated string into words. its quite useful too. but the next step i would like to work is remove the duplicate words and [“,”,”.” and few other punctuation marks ] too…
like if
“I love nepal. Nepal is a landlocked country. Nepal is in Asia.“
I would like to get only unique words in the sentance like:
I, love, nepal, is, a, landlocked, country, in, Asia
http://php.net/manual/en/function.array-unique.php