PHP Класс TextAnalysis\Comparisons\LongestCommonSubstringComparison

Наследование: implements TextAnalysis\Interfaces\ISimilarity, implements TextAnalysis\Interfaces\IDistance
Показать файл Открыть проект Примеры использования класса

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

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