PHP 클래스 TextAnalysis\Comparisons\LongestCommonSubstringComparison

상속: implements TextAnalysis\Interfaces\ISimilarity, implements TextAnalysis\Interfaces\IDistance
파일 보기 프로젝트 열기: yooper/php-text-analysis 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$cache array Cache for holding substring arrays key/value array
$useCache boolean Using caching to improve preformance on text2 inputs

공개 메소드들

메소드 설명
__construct ( boolean $useCache = false )
__destruct ( )
distance ( string $text1, string $text2 ) : integer Returns the string length of the longest common substring (LCS)
getCache ( ) : array
similarity ( string $text1, string $text2 ) : string Returns the Longest common substring

메소드 상세

__construct() 공개 메소드

public __construct ( boolean $useCache = false )
$useCache boolean

__destruct() 공개 메소드

public __destruct ( )

distance() 공개 메소드

Returns the string length of the longest common substring (LCS)
public distance ( string $text1, string $text2 ) : integer
$text1 string
$text2 string
리턴 integer

getCache() 공개 메소드

public getCache ( ) : array
리턴 array

similarity() 공개 메소드

Returns the Longest common substring
public similarity ( string $text1, string $text2 ) : string
$text1 string
$text2 string
리턴 string

프로퍼티 상세

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

Cache for holding substring arrays key/value array
protected array $cache
리턴 array

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

Using caching to improve preformance on text2 inputs
protected bool $useCache
리턴 boolean