PHP Class TextAnalysis\Taggers\StanfordAbstract

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

Protected Properties

Свойство Type Description
$classifierPath Path to the classifier you want to use
$errors Errors from proc_open
$jarPath string Path to the stanford NER jar
$javaOptions options passed the java vm
$output Output from proc_open
$separator string The separators between tokens
$tmpFilePath string Place for storing the tokenized words to

Méthodes publiques

Méthode Description
__construct ( string $jarPath, string $classifierPath, string $javaOptions = ['-mx700m'], $separator = '/' )
__destruct ( )
getClassifierPath ( ) : string Returns the path to the classifier
getCommand ( ) : string
getJarPath ( ) : string Returns the path to the ner jar
getJavaOptions ( ) : array
getPathToJava ( ) : string
getSeparator ( ) : string Separator used between tokens
getTmpFilePath ( ) : string
tag ( array $tokens )

Méthodes protégées

Méthode Description
exec ( ) Calls the stanford jar file
getParsedOutput ( ) : array Requires that class output var be populated. Punctuation may cause issues
getPathSeparator ( ) : string
verify ( ) verifies required files exist

Method Details

__construct() public méthode

public __construct ( string $jarPath, string $classifierPath, string $javaOptions = ['-mx700m'], $separator = '/' )
$jarPath string
$classifierPath string
$javaOptions string

__destruct() public méthode

public __destruct ( )

exec() protected méthode

Calls the stanford jar file
protected exec ( )

getClassifierPath() public méthode

Returns the path to the classifier
public getClassifierPath ( ) : string
Résultat string

getCommand() abstract public méthode

abstract public getCommand ( ) : string
Résultat string Returns the cli that is passed to proc_open

getJarPath() public méthode

Returns the path to the ner jar
public getJarPath ( ) : string
Résultat string

getJavaOptions() public méthode

public getJavaOptions ( ) : array
Résultat array

getParsedOutput() abstract protected méthode

Requires that class output var be populated. Punctuation may cause issues
abstract protected getParsedOutput ( ) : array
Résultat array

getPathSeparator() protected méthode

protected getPathSeparator ( ) : string
Résultat string Return based on the OS used

getPathToJava() public méthode

public getPathToJava ( ) : string
Résultat string

getSeparator() public méthode

Separator used between tokens
public getSeparator ( ) : string
Résultat string default is /

getTmpFilePath() public méthode

public getTmpFilePath ( ) : string
Résultat string

tag() public méthode

public tag ( array $tokens )
$tokens array Use a tokenizer

verify() protected méthode

verifies required files exist
protected verify ( )

Property Details

$classifierPath protected_oe property

Path to the classifier you want to use
protected $classifierPath

$errors protected_oe property

Errors from proc_open
protected $errors

$jarPath protected_oe property

Path to the stanford NER jar
protected string $jarPath
Résultat string

$javaOptions protected_oe property

options passed the java vm
protected $javaOptions

$output protected_oe property

Output from proc_open
protected $output

$separator protected_oe property

The separators between tokens
protected string $separator
Résultat string

$tmpFilePath protected_oe property

Place for storing the tokenized words to
protected string $tmpFilePath
Résultat string