keyword-density-se





Insert title here


“.$nb_words = count($words).” Words \n”;

// Array of stop words
$stop_words = array(
“och”,
“det”,
“att”,
“i”,
“en”,
“av”,
“ta”,
“för”,
“kanske”,
“just”,
“finns”,
“är”,
“jag”,
“hon”,
“som”,
“han”,
“pÃ¥”,
“till”,
“den”,
“med”,
“var”,
“sig”,
“sÃ¥”,
“till”,
“men”,
“ett”,
“om”,
“hade”,
“icke”,
“mig”,
“du”,
“henne”,
“dÃ¥”,
“sin”,
“nu”,
“har”,
“inte”,
“hans”,
“honom”,
“skulle”,
“hennes”,
“där”,
“min”,
“man”,
“ej”,
“vid”,
“kunde”,
“nÃ¥got”,
“frÃ¥n”,
“ut”,
“när”,
“efter”,
“dem”,
“vara”,
“vad”,
“över”,
“dig”,
“kan”,
“sina”,
“här”,
“ha”,
“mot”,
“alla”,
“under”,
“nÃ¥gon”,
“eller”,
“allt”,
“mycket”,
“sedan”,
“ju”,
“denna”,
“själv”,
“detta”,
“utan”,
“varit”,
“hur”,
“ingen”,
“mitt”,
“ni”,
“bli”,
“blev”,
“oss”,
“din”,
“dessa”,
“nÃ¥gra”,
“deras”,
“blir”,
“mina”,
“samma”,
“vilken”,
“sÃ¥dan”,
“vÃ¥r”,
“blivit”,
“dess”,
“inom”,
“mellan”,
“sÃ¥dant”,
“varför”,
“varje”,
“vilka”,
“ditt”,
“vem”,
“vilket”,
“sitta”,
“sÃ¥dana”,
“vart”,
“dina”,
“vars”,
“vÃ¥rt”,
“vÃ¥ra”,
“ert”,
“era”,
“kan”,
“vilkas”
);

// remove the stop word from the array words:
$word_trim = array_diff($words, $stop_words);

// Calculate the number of repetition of words
$word_count = array_count_values($word_trim);

foreach ($word_count as $key => $val) {
$density = ($val/$nb_words)*100;
if ($density > 0.5)
echo “$key – COUNT: $val, DENSITY: “.number_format($density,2).”%
\n”;

}
}

/*
* Ordered by Keyword density
*/

?>