php - manipulating array and getting words occurrences -
i performing mathematical operations on mysql data.
equation probability of word w
given tag c
this
p(w/c) = count of words w tag c / (total count of words tag c + distinct words tags)
i can retrieve values table, problem in counting words.
records (pos part of speech i.e. noun adjectives)
seq hash post pos tag cat 1 78bb622642f6a28681ca15676045cabd marketing in every web application essential no... web, application, essential, big, seo, full, stack... marketing give-and-take 2 ec31a76d380590fff71cf7b10db0f084 have launched new startup on web analyti... new, startup, web, expert, seo, digital marketing give-and-take
i not familiar word counting php + mysql. need help with
how can count distinct words inpos
tag = t how can count words in pos
tag = t how count word w
pos tag = 'marketting' , pos contains word w
get pos wanted tag:
select pos table tag = "tag_you_want"
then in php count 1 specific word:
echo substr_count($string, 'word');
count words in pos:
echo count(str_word_count($string));
php mysql sql
No comments:
Post a Comment