Method cleanCommon performs str_replaceon the full string, without parsing the string into separate words.
This will remove stopwords from the string even if it was part of a word. For example, الأهل will be replaced with الأ because هل, which is part of the word, is a stopword.
It should use preg_replace to replace only fill words, or explode the string into array of words.
Method cleanCommon performs
str_replaceon the full string, without parsing the string into separate words.This will remove stopwords from the string even if it was part of a word. For example,
الأهلwill be replaced withالأbecauseهل, which is part of the word, is a stopword.It should use
preg_replaceto replace only fill words, or explode the string into array of words.