private function getBaselineScoreForSiblings(Element $topNode)
{
$base = 100000;
$numberOfParagraphs = 0;
$scoreOfParagraphs = 0;
$nodesToCheck = $topNode->find('p, strong');
foreach ($nodesToCheck as $node) {
$nodeText = $node->text();
$wordStats = $this->config()->getStopWords()->getStopwordCount($nodeText);
$highLinkDensity = $this->isHighLinkDensity($node);
if ($wordStats->getStopWordCount() > 2 && !$highLinkDensity) {
$numberOfParagraphs += 1;
$scoreOfParagraphs += $wordStats->getStopWordCount();
}
}
if ($numberOfParagraphs > 0) {
$base = $scoreOfParagraphs / $numberOfParagraphs;
}
return $base;
}