Php ile metin içinde en çok kullanılan kelimeler

0 Cevap php

Ben stackoverflow aşağıda kodu bulundu ve bu dize en sık kullanılan kelimeleri bulmakta iyi çalışır. Ama ben "a, eğer sen, var, vb" gibi ortak kelimeleri sayma tutabiliriz? Yoksa sayma sonra öğeleri kaldırmak için olurdu? Bunu nasıl yaparım? Şimdiden teşekkürler.

<?php

$text = "A very nice to tot to text. Something nice to think about if you're into text.";


$words = str_word_count($text, 1); 

$frequency = array_count_values($words);

arsort($frequency);

echo '<pre>';
print_r($frequency);
echo '</pre>';
?>

0 Cevap