PHP Class TextAnalysis\Comparisons\LongestCommonSubstringComparison

Inheritance: implements TextAnalysis\Interfaces\ISimilarity, implements TextAnalysis\Interfaces\IDistance
Afficher le fichier Open project: yooper/php-text-analysis Class Usage Examples

Protected Properties

Свойство Type Description
$cache array Cache for holding substring arrays key/value array
$useCache boolean Using caching to improve preformance on text2 inputs

Méthodes publiques

Méthode Description
__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

Method Details

__construct() public méthode

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

__destruct() public méthode

public __destruct ( )

distance() public méthode

Returns the string length of the longest common substring (LCS)
public distance ( string $text1, string $text2 ) : integer
$text1 string
$text2 string
Résultat integer

getCache() public méthode

public getCache ( ) : array
Résultat array

similarity() public méthode

Returns the Longest common substring
public similarity ( string $text1, string $text2 ) : string
$text1 string
$text2 string
Résultat string

Property Details

$cache protected_oe property

Cache for holding substring arrays key/value array
protected array $cache
Résultat array

$useCache protected_oe property

Using caching to improve preformance on text2 inputs
protected bool $useCache
Résultat boolean