Phpml\FeatureExtraction\TokenCountVectorizer::addTokenToVocabulary PHP Method

addTokenToVocabulary() private method

private addTokenToVocabulary ( string $token )
$token string
    private function addTokenToVocabulary(string $token)
    {
        if ($this->isStopWord($token)) {
            return;
        }
        if (!isset($this->vocabulary[$token])) {
            $this->vocabulary[$token] = count($this->vocabulary);
        }
    }