PHP Класс TextAnalysis\Corpus\WordnetCorpus

Автор: yooper
Наследование: extends ReadCorpusAbstract
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$exceptionsMap TextAnalysis\Models\Wordnet\ExceptionMap[]
$lemmas TextAnalysis\Models\Wordnet\Lemma[]
$lexNames stores all the lex names
$posFileMaps map part of speech character to its definition
$synsets TextAnalysis\Models\Wordnet\Synset[] An array with indexing. Indexing is pos with offset concatenated

Открытые методы

Метод Описание
getDataFileNames ( ) : string[]
getExceptionFileNames ( ) : array Returns array of file names with the exceptions
getExceptionMapFromString ( string $line, string $pos ) : ExceptionMap
getExceptionsMap ( ) : ExceptionMap[] Returns the list of exception spellings
getFileNames ( ) : string[] Returns the list of required files that is provided by the nltk project
getIndexFileNames ( ) : string[]
getLemmaFromString ( string $line ) : Lemma
getLemmas ( ) : Lemma[]
getLexNames ( ) : string[]
getPosFileMaps ( ) : array
getSynsetByOffsetAndPos ( integer $synsetOffset, string $pos ) : Synset Opens the raw data file and reads the synsets in
getSynsetFromString ( string $line ) : Synset Parse the line from the synset file and turn it into a synset object

Описание методов

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

public getDataFileNames ( ) : string[]
Результат string[]

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

Returns array of file names with the exceptions
public getExceptionFileNames ( ) : array
Результат array

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

public getExceptionMapFromString ( string $line, string $pos ) : ExceptionMap
$line string
$pos string
Результат TextAnalysis\Models\Wordnet\ExceptionMap

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

Returns the list of exception spellings
public getExceptionsMap ( ) : ExceptionMap[]
Результат TextAnalysis\Models\Wordnet\ExceptionMap[]

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

Returns the list of required files that is provided by the nltk project
public getFileNames ( ) : string[]
Результат string[]

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

public getIndexFileNames ( ) : string[]
Результат string[]

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

public getLemmaFromString ( string $line ) : Lemma
$line string
Результат TextAnalysis\Models\Wordnet\Lemma

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

public getLemmas ( ) : Lemma[]
Результат TextAnalysis\Models\Wordnet\Lemma[] Returns an array of lemmas

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

public getLexNames ( ) : string[]
Результат string[]

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

public getPosFileMaps ( ) : array
Результат array

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

Opens the raw data file and reads the synsets in
public getSynsetByOffsetAndPos ( integer $synsetOffset, string $pos ) : Synset
$synsetOffset integer
$pos string Part of speech
Результат TextAnalysis\Models\Wordnet\Synset

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

Parse the line from the synset file and turn it into a synset object
public getSynsetFromString ( string $line ) : Synset
$line string
Результат TextAnalysis\Models\Wordnet\Synset

Описание свойств

$exceptionsMap защищенное свойство

protected ExceptionMap[],TextAnalysis\Models\Wordnet $exceptionsMap
Результат TextAnalysis\Models\Wordnet\ExceptionMap[]

$lemmas защищенное свойство

protected Lemma[],TextAnalysis\Models\Wordnet $lemmas
Результат TextAnalysis\Models\Wordnet\Lemma[]

$lexNames защищенное свойство

stores all the lex names
protected $lexNames

$posFileMaps защищенное свойство

map part of speech character to its definition
protected $posFileMaps

$synsets защищенное свойство

An array with indexing. Indexing is pos with offset concatenated
protected Synset[],TextAnalysis\Models\Wordnet $synsets
Результат TextAnalysis\Models\Wordnet\Synset[]