public class Extractor extends Object
| Modifier and Type | Method and Description |
|---|---|
ExtractedResult |
extractOne(String query,
Collection<String> choice,
Applicable func)
Find the single best match above a score in a list of choices.
|
List<ExtractedResult> |
extractTop(String query,
Collection<String> choices,
Applicable func)
Creates a sorted list of
ExtractedResult which contain the
top @param limit most similar choices |
List<ExtractedResult> |
extractTop(String query,
Collection<String> choices,
Applicable func,
int limit)
Creates a sorted list of
ExtractedResult which contain the
top @param limit most similar choices |
List<ExtractedResult> |
extractWithoutOrder(String query,
Collection<String> choices,
Applicable func)
Returns the list of choices with their associated scores of similarity in a list
of
ExtractedResult |
int |
getCutoff() |
void |
setCutoff(int cutoff) |
Extractor |
with(int cutoff) |
public Extractor with(int cutoff)
public List<ExtractedResult> extractWithoutOrder(String query, Collection<String> choices, Applicable func)
ExtractedResultquery - The query stringchoices - The list of choicesfunc - The function to applypublic ExtractedResult extractOne(String query, Collection<String> choice, Applicable func)
query - A string to match againstchoice - A list of choicesfunc - Scoring functionpublic List<ExtractedResult> extractTop(String query, Collection<String> choices, Applicable func)
ExtractedResult which contain the
top @param limit most similar choicesquery - The query stringchoices - A list of choicesfunc - The scoring functionpublic List<ExtractedResult> extractTop(String query, Collection<String> choices, Applicable func, int limit)
ExtractedResult which contain the
top @param limit most similar choicesquery - The query stringchoices - A list of choiceslimit - Limits the number of results and speeds up
the search (k-top heap sort) is usedpublic int getCutoff()
public void setCutoff(int cutoff)
Copyright © 2018. All rights reserved.