private function removeParagraphsWithFewWords(Element $topNode): self {
        if (!empty($topNode)) {
            $nodes = $topNode->find('p');

            foreach ($nodes as $node) {
                $stopWords = $this->config()->getStopWords()->getStopwordCount($node->text());

                if (mb_strlen(Helper::textNormalise($node->text())) < 8 && $stopWords->getStopWordCount() < 3 && $node->find('object')->count() == 0 && $node->find('embed')->count() == 0) {
                    $node->remove();
                }
            }

            /** @todo Implement */
        }

        return $this;
    }
private function removeParagraphsWithFewWords(Element $topNode): self {
        if (!empty($topNode)) {
            $nodes = $topNode->find('p');

            foreach ($nodes as $node) {
                $stopWords = $this->config()->getStopWords()->getStopwordCount($node->text());

                if (mb_strlen(Helper::textNormalise($node->text())) < 8 && $stopWords->getStopWordCount() < 3 && $node->find('object')->count() == 0 && $node->find('embed')->count() == 0) {
                    $node->remove();
                }
            }

            /** @todo Implement */
        }

        return $this;
    }
private function removeParagraphsWithFewWords ( Element $ topNode ) : self { if ( ! empty ( $ topNode ) ) { $ nodes = $ topNode -> find ( 'p' ) ; foreach ( $ nodes as $ node ) { $ stopWords = $ this -> config ( ) -> getStopWords ( ) -> getStopwordCount ( $ node -> text ( ) ) ; if ( mb_strlen ( Helper :: textNormalise ( $ node -> text ( ) ) ) < 8 && $ stopWords -> getStopWordCount ( ) < 3 && $ node -> find ( 'object' ) -> count ( ) == 0 && $ node -> find ( 'embed' ) -> count ( ) == 0 ) { $ node -> remove ( ) ; } } /** @todo Implement */ } return $ this ; }
remove paragraphs that have less than x number of words, would indicate that it's some sort of link

@param Element $topNode

@return self
remove paragraphs that have less than x number of words would indicate that it s some sort of link