PHP 클래스 TextAnalysis\Indexes\WordnetIndex

저자: yooper
파일 보기 프로젝트 열기: yooper/php-text-analysis

보호된 프로퍼티들

프로퍼티 타입 설명
$lemmasIdx array
$wordnetCorpus TextAnalysis\Corpus\WordnetCorpus

공개 메소드들

메소드 설명
__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

메소드 상세

__construct() 공개 메소드

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

__destruct() 공개 메소드

public __destruct ( )

getLemma() 공개 메소드

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
리턴 TextAnalysis\Models\Wordnet\Lemma[]

getMorph() 공개 메소드

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
리턴 string return the base word

getMorphilogicalSubstitutions() 공개 메소드

getWordnetCorpus() 공개 메소드

public getWordnetCorpus ( ) : WordnetCorpus
리턴 TextAnalysis\Corpus\WordnetCorpus

프로퍼티 상세

$lemmasIdx 보호되어 있는 프로퍼티

protected array $lemmasIdx
리턴 array

$wordnetCorpus 보호되어 있는 프로퍼티

protected WordnetCorpus,TextAnalysis\Corpus $wordnetCorpus
리턴 TextAnalysis\Corpus\WordnetCorpus