PHP Класс TextAnalysis\Taggers\StanfordAbstract

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

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

Свойство Тип Описание
$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

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

Метод Описание
__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 )

Защищенные методы

Метод Описание
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

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

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

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

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

public __destruct ( )

exec() защищенный Метод

Calls the stanford jar file
protected exec ( )

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

Returns the path to the classifier
public getClassifierPath ( ) : string
Результат string

getCommand() абстрактный публичный Метод

abstract public getCommand ( ) : string
Результат string Returns the cli that is passed to proc_open

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

Returns the path to the ner jar
public getJarPath ( ) : string
Результат string

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

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

getParsedOutput() абстрактный защищенный Метод

Requires that class output var be populated. Punctuation may cause issues
abstract protected getParsedOutput ( ) : array
Результат array

getPathSeparator() защищенный Метод

protected getPathSeparator ( ) : string
Результат string Return based on the OS used

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

public getPathToJava ( ) : string
Результат string

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

Separator used between tokens
public getSeparator ( ) : string
Результат string default is /

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

public getTmpFilePath ( ) : string
Результат string

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

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

verify() защищенный Метод

verifies required files exist
protected verify ( )

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

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

Path to the classifier you want to use
protected $classifierPath

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

Errors from proc_open
protected $errors

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

Path to the stanford NER jar
protected string $jarPath
Результат string

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

options passed the java vm
protected $javaOptions

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

Output from proc_open
protected $output

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

The separators between tokens
protected string $separator
Результат string

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

Place for storing the tokenized words to
protected string $tmpFilePath
Результат string