TextAnalysis\Indexes\InvertedIndex::getTermsByDocumentId PHP Метод

getTermsByDocumentId() публичный Метод

Returns the key value array with the terms found in the document for the given doc id
public getTermsByDocumentId ( mixed $docId ) : array
$docId mixed
Результат array
    public function getTermsByDocumentId($docId)
    {
        $termsFoundIn = [];
        foreach ($this->index as $term => $row) {
            if (in_array($docId, $row[self::POSTINGS])) {
                $termsFoundIn[] = $term;
            }
        }
        return $termsFoundIn;
    }