|
| def | __init__ (self, normalizer=None) |
| |
| def | find (self, name, candidates, max_matches=10) |
| | Return a list of close matches to name from candidates. More...
|
| |
| def | find_and_format (self, name, candidates, message, max_matches=10, check_missing_argument_separator=False) |
| |
| def | format (self, message, recommendations) |
| | Add recommendations to the given message. More...
|
| |
Definition at line 21 of file recommendations.py.
◆ __init__()
| def robot.utils.recommendations.RecommendationFinder.__init__ |
( |
|
self, |
|
|
|
normalizer = None |
|
) |
| |
◆ _calculate_cutoff()
| def robot.utils.recommendations.RecommendationFinder._calculate_cutoff |
( |
|
self, |
|
|
|
string, |
|
|
|
min_cutoff = 0.5, |
|
|
|
max_cutoff = 0.85, |
|
|
|
step = 0.03 |
|
) |
| |
|
private |
Calculate a cutoff depending on string length.
Default values determined by manual tuning until the results "look right".
Definition at line 84 of file recommendations.py.
◆ _check_missing_argument_separator()
| def robot.utils.recommendations.RecommendationFinder._check_missing_argument_separator |
( |
|
self, |
|
|
|
name, |
|
|
|
candidates |
|
) |
| |
|
private |
◆ _get_normalized_candidates()
| def robot.utils.recommendations.RecommendationFinder._get_normalized_candidates |
( |
|
self, |
|
|
|
candidates |
|
) |
| |
|
private |
◆ _get_original_candidates()
| def robot.utils.recommendations.RecommendationFinder._get_original_candidates |
( |
|
self, |
|
|
|
norm_matches, |
|
|
|
norm_candidates |
|
) |
| |
|
private |
◆ find()
| def robot.utils.recommendations.RecommendationFinder.find |
( |
|
self, |
|
|
|
name, |
|
|
|
candidates, |
|
|
|
max_matches = 10 |
|
) |
| |
Return a list of close matches to name from candidates.
Definition at line 38 of file recommendations.py.
◆ find_and_format()
| def robot.utils.recommendations.RecommendationFinder.find_and_format |
( |
|
self, |
|
|
|
name, |
|
|
|
candidates, |
|
|
|
message, |
|
|
|
max_matches = 10, |
|
|
|
check_missing_argument_separator = False |
|
) |
| |
◆ format()
| def robot.utils.recommendations.RecommendationFinder.format |
( |
|
self, |
|
|
|
message, |
|
|
|
recommendations |
|
) |
| |
Add recommendations to the given message.
The recommendation string looks like::
<message> Did you mean:
<recommendations[0]>
<recommendations[1]>
<recommendations[2]>
Definition at line 58 of file recommendations.py.
◆ normalizer
| robot.utils.recommendations.RecommendationFinder.normalizer |
The documentation for this class was generated from the following file: