PHP Class TextAnalysis\Corpus\WordnetCorpus

Author: yooper
Inheritance: extends ReadCorpusAbstract
Afficher le fichier Open project: yooper/php-text-analysis Class Usage Examples

Protected Properties

Свойство Type Description
$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

Méthodes publiques

Méthode Description
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

Method Details

getDataFileNames() public méthode

public getDataFileNames ( ) : string[]
Résultat string[]

getExceptionFileNames() public méthode

Returns array of file names with the exceptions
public getExceptionFileNames ( ) : array
Résultat array

getExceptionMapFromString() public méthode

public getExceptionMapFromString ( string $line, string $pos ) : ExceptionMap
$line string
$pos string
Résultat TextAnalysis\Models\Wordnet\ExceptionMap

getExceptionsMap() public méthode

Returns the list of exception spellings
public getExceptionsMap ( ) : ExceptionMap[]
Résultat TextAnalysis\Models\Wordnet\ExceptionMap[]

getFileNames() public méthode

Returns the list of required files that is provided by the nltk project
public getFileNames ( ) : string[]
Résultat string[]

getIndexFileNames() public méthode

public getIndexFileNames ( ) : string[]
Résultat string[]

getLemmaFromString() public méthode

public getLemmaFromString ( string $line ) : Lemma
$line string
Résultat TextAnalysis\Models\Wordnet\Lemma

getLemmas() public méthode

public getLemmas ( ) : Lemma[]
Résultat TextAnalysis\Models\Wordnet\Lemma[] Returns an array of lemmas

getLexNames() public méthode

public getLexNames ( ) : string[]
Résultat string[]

getPosFileMaps() public méthode

public getPosFileMaps ( ) : array
Résultat array

getSynsetByOffsetAndPos() public méthode

Opens the raw data file and reads the synsets in
public getSynsetByOffsetAndPos ( integer $synsetOffset, string $pos ) : Synset
$synsetOffset integer
$pos string Part of speech
Résultat TextAnalysis\Models\Wordnet\Synset

getSynsetFromString() public méthode

Parse the line from the synset file and turn it into a synset object
public getSynsetFromString ( string $line ) : Synset
$line string
Résultat TextAnalysis\Models\Wordnet\Synset

Property Details

$exceptionsMap protected_oe property

protected ExceptionMap[],TextAnalysis\Models\Wordnet $exceptionsMap
Résultat TextAnalysis\Models\Wordnet\ExceptionMap[]

$lemmas protected_oe property

protected Lemma[],TextAnalysis\Models\Wordnet $lemmas
Résultat TextAnalysis\Models\Wordnet\Lemma[]

$lexNames protected_oe property

stores all the lex names
protected $lexNames

$posFileMaps protected_oe property

map part of speech character to its definition
protected $posFileMaps

$synsets protected_oe property

An array with indexing. Indexing is pos with offset concatenated
protected Synset[],TextAnalysis\Models\Wordnet $synsets
Résultat TextAnalysis\Models\Wordnet\Synset[]