public class Extractor extends Object
| Modifier and Type | Method | Description |
|---|---|---|
ExtractedResult |
extractOne(String query,
Collection<String> choices,
Applicable func) |
Find the single best match above a score in a list of choices.
|
<T> BoundExtractedResult<T> |
extractOne(String query,
Collection<T> choices,
ToStringFunction<T> toStringFunction,
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 |
<T> List<BoundExtractedResult<T>> |
extractTop(String query,
Collection<T> choices,
ToStringFunction<T> toStringFunction,
Applicable func) |
Creates a sorted list of
ExtractedResult which contain the
top @param limit most similar choices |
<T> List<BoundExtractedResult<T>> |
extractTop(String query,
Collection<T> choices,
ToStringFunction<T> toStringFunction,
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 |
<T> List<BoundExtractedResult<T>> |
extractWithoutOrder(String query,
Collection<T> choices,
ToStringFunction<T> toStringFunction,
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 <T> List<BoundExtractedResult<T>> extractWithoutOrder(String query, Collection<T> choices, ToStringFunction<T> toStringFunction, Applicable func)
ExtractedResultquery - The query stringchoices - The list of choicestoStringFunction - The ToStringFunction to be applied to all choices.func - The function to applypublic ExtractedResult extractOne(String query, Collection<String> choices, Applicable func)
query - A string to match againstchoices - A list of choicesfunc - Scoring functionpublic <T> BoundExtractedResult<T> extractOne(String query, Collection<T> choices, ToStringFunction<T> toStringFunction, Applicable func)
query - A string to match againstchoices - A list of choicestoStringFunction - The ToStringFunction to be applied to all choices.func - 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 <T> List<BoundExtractedResult<T>> extractTop(String query, Collection<T> choices, ToStringFunction<T> toStringFunction, Applicable func)
ExtractedResult which contain the
top @param limit most similar choicesquery - The query stringchoices - A list of choicestoStringFunction - The ToStringFunction to be applied to all choices.func - 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 <T> List<BoundExtractedResult<T>> extractTop(String query, Collection<T> choices, ToStringFunction<T> toStringFunction, Applicable func, int limit)
ExtractedResult which contain the
top @param limit most similar choicesquery - The query stringchoices - A list of choicestoStringFunction - The ToStringFunction to be applied to all choices.limit - 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.