PHP 클래스 TextAnalysis\Generators\StopwordGenerator

저자: dcardin
파일 보기 프로젝트 열기: yooper/php-text-analysis 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$filePaths Array of file paths of documents to be scanned
$mode
$stopWords array

공개 메소드들

메소드 설명
__construct ( array $filePaths, integer $mode = self::MODE_FREQ )
__destruct ( )
getFilePaths ( ) : string[] Returns the array of file paths
getStopwords ( ) : string[] Returns an array of stop words and their frequencies

보호된 메소드들

메소드 설명
computeUsingFreqDist ( array $tokens ) Adds frequency counts to the stopWords property
getFileContent ( string $filePath ) : string Returns the text content from the file

메소드 상세

__construct() 공개 메소드

public __construct ( array $filePaths, integer $mode = self::MODE_FREQ )
$filePaths array
$mode integer

__destruct() 공개 메소드

public __destruct ( )

computeUsingFreqDist() 보호된 메소드

Adds frequency counts to the stopWords property
protected computeUsingFreqDist ( array $tokens )
$tokens array

getFileContent() 보호된 메소드

Returns the text content from the file
protected getFileContent ( string $filePath ) : string
$filePath string
리턴 string

getFilePaths() 공개 메소드

Returns the array of file paths
public getFilePaths ( ) : string[]
리턴 string[]

getStopwords() 공개 메소드

Returns an array of stop words and their frequencies
public getStopwords ( ) : string[]
리턴 string[]

프로퍼티 상세

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

Array of file paths of documents to be scanned
protected $filePaths

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

protected $mode

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

protected array $stopWords
리턴 array