PHP Class TextAnalysis\Indexes\WordnetIndex

Author: yooper
Afficher le fichier Open project: yooper/php-text-analysis

Protected Properties

Свойство Type Description
$lemmasIdx array
$wordnetCorpus TextAnalysis\Corpus\WordnetCorpus

Méthodes publiques

Méthode Description
__construct ( WordnetCorpus $wordnetCorpus )
__destruct ( )
getLemma ( string $word, string $pos = '' ) : Lemma[] Return the lemmas that are linked to the given word, provide a pos to filter down the results
getMorph ( string $word, string | null $pos = '' ) : string Concept taken from nltk Find a possible base form for the given form, with the given part of speech, by checking WordNet's list of exceptional forms, and by recursively stripping affixes for this part of speech until a form in WordNet is found.
getMorphilogicalSubstitutions ( ) : array
getWordnetCorpus ( ) : WordnetCorpus

Method Details

__construct() public méthode

public __construct ( WordnetCorpus $wordnetCorpus )
$wordnetCorpus TextAnalysis\Corpus\WordnetCorpus

__destruct() public méthode

public __destruct ( )

getLemma() public méthode

Return the lemmas that are linked to the given word, provide a pos to filter down the results
public getLemma ( string $word, string $pos = '' ) : Lemma[]
$word string
$pos string
Résultat TextAnalysis\Models\Wordnet\Lemma[]

getMorph() public méthode

Concept taken from nltk Find a possible base form for the given form, with the given part of speech, by checking WordNet's list of exceptional forms, and by recursively stripping affixes for this part of speech until a form in WordNet is found.
public getMorph ( string $word, string | null $pos = '' ) : string
$word string
$pos string | null
Résultat string return the base word

getMorphilogicalSubstitutions() public méthode

public getMorphilogicalSubstitutions ( ) : array
Résultat array

getWordnetCorpus() public méthode

public getWordnetCorpus ( ) : WordnetCorpus
Résultat TextAnalysis\Corpus\WordnetCorpus

Property Details

$lemmasIdx protected_oe property

protected array $lemmasIdx
Résultat array

$wordnetCorpus protected_oe property

protected WordnetCorpus,TextAnalysis\Corpus $wordnetCorpus
Résultat TextAnalysis\Corpus\WordnetCorpus