enchant_dict_suggest

(PHP 5 >= 5.3.0, PHP 7, PECL enchant >= 0.1.0 )

enchant_dict_suggestWill return a list of values if any of those pre-conditions are not met

说明

enchant_dict_suggest ( resource $dict , string $word ) : array

参数

dict

Dictionary resource

word

Word to use for the suggestions.

返回值

Will returns an array of suggestions if the word is bad spelled.

范例

Example #1 A enchant_dict_suggest() example

<?php
$tag 
'en_US';
$r enchant_broker_init();
if (
enchant_broker_dict_exists($r,$tag)) {
    
$d enchant_broker_request_dict($r$tag);

    
$wordcorrect enchant_dict_check($d"soong");
    if (!
$wordcorrect) {
        
$suggs enchant_dict_suggest($d"soong");
        echo 
"Suggestions for 'soong':";
        
print_r($suggs);
    }
    
enchant_broker_free_dict($d);
}
enchant_broker_free($r);
?>

参见

相关文章
php enchant 函数 whether a dictionary exists or not. using non empty tagphp enchant 函数 whether or not word exists in this spelling sessionphp enchant 函数 will return a list of values if any of those pre conditions are not metphp hash 函数 return a list of registered hashing algorithms suitable for hash hmacphp maxdb 函数 check if there any more query results from a multi queryphp runkit 函数 determines if the current functions return value will be usedphp snmp 函数 return the method how the snmp values will be returnedphp snmp 函数 return all values that are enums with their enum value instead of the raw integerphp sqlite 函数 opens an sqlite database and create the database if it does not existphp sqlite 函数 opens a persistent handle to an sqlite database and create the database if it does not existphp ssh2 函数 return list of negotiated methodsphp statistic 函数 calculates any one parameter of the f distribution given values for the othersphp statistic 函数 calculates any one parameter of the gamma distribution given values for the othersphp statistic 函数 calculates any one parameter of the laplace distribution given values for the othersphp statistic 函数 calculates any one parameter of the logistic distribution given values for the othersphp statistic 函数 calculates any one parameter of the negative binomial distribution given values for the othersphp svn 函数 return true if the path points to a directory false otherwisephp svn 函数 return true if the path points to a file false otherwisephp wincache 函数 adds a variable in user cache only if variable does not already exist in the cachephp sdo das relational 函数 executes an sql query passed as a prepared statement with a list of values to substitute for placeholders and return the results as a normalised data graph
关注编程学问公众号