PHP 클래스 TextAnalysis\Analysis\FreqDist

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

보호된 프로퍼티들

프로퍼티 타입 설명
$keyValues array An associative array that holds all the frequencies per token
$keysByWeight array Caches a copy of keys by weight
$totalTokens integer The total number of tokens originally passed into FreqDist

공개 메소드들

메소드 설명
__construct ( array $tokens ) This sorts the token meta data collection right away so use frequency distribution data can be extracted.
__destruct ( )
getHapaxes ( ) : array Returns an array of tokens that occurred once
getKeyValuesByFrequency ( ) : array Return an array with key frequency pairs
getKeyValuesByWeight ( ) : array Return an array with key weight pairs
getKeys ( ) : array Return the sorted keys by frequency desc
getTotalTokens ( ) : integer Get the total number of tokens in this tokensDocument
getTotalUniqueTokens ( ) : integer Return get the total number of unique tokens
getValues ( ) : array Return the sorted values by frequency desc
getWeightPerToken ( ) : float Return the weight of a single token

보호된 메소드들

메소드 설명
preCompute ( array $tokens ) Internal function for summarizing all the data into a key value store

메소드 상세

__construct() 공개 메소드

This sorts the token meta data collection right away so use frequency distribution data can be extracted.
public __construct ( array $tokens )
$tokens array

__destruct() 공개 메소드

public __destruct ( )

getHapaxes() 공개 메소드

Returns an array of tokens that occurred once
public getHapaxes ( ) : array
리턴 array

getKeyValuesByFrequency() 공개 메소드

Return an array with key frequency pairs
public getKeyValuesByFrequency ( ) : array
리턴 array

getKeyValuesByWeight() 공개 메소드

Return an array with key weight pairs
public getKeyValuesByWeight ( ) : array
리턴 array

getKeys() 공개 메소드

Return the sorted keys by frequency desc
public getKeys ( ) : array
리턴 array

getTotalTokens() 공개 메소드

Get the total number of tokens in this tokensDocument
public getTotalTokens ( ) : integer
리턴 integer

getTotalUniqueTokens() 공개 메소드

Return get the total number of unique tokens
public getTotalUniqueTokens ( ) : integer
리턴 integer

getValues() 공개 메소드

Return the sorted values by frequency desc
public getValues ( ) : array
리턴 array

getWeightPerToken() 공개 메소드

Return the weight of a single token
public getWeightPerToken ( ) : float
리턴 float

preCompute() 보호된 메소드

Internal function for summarizing all the data into a key value store
protected preCompute ( array $tokens )
$tokens array The set of tokens passed into the constructor

프로퍼티 상세

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

An associative array that holds all the frequencies per token
protected array $keyValues
리턴 array

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

Caches a copy of keys by weight
protected array $keysByWeight
리턴 array

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

The total number of tokens originally passed into FreqDist
protected int $totalTokens
리턴 integer