View source: R/gen_alternative_terms.R
gen_alternative_terms | R Documentation |
Function to find terms in GENESIS that are similar or related based on a simple comparison of strings. This can help to identify alternative search terms.
gen_alternative_terms(term = NULL, similarity = TRUE, ...)
term |
Character string. Maximum length of 15 characters. Term or word for which you are searching for alternative or related terms. Use of '*' as a placeholder is possible to generate broader search areas. |
similarity |
Logical. Indicator if the output of the function should be sorted based on a Levenshtein edit distance based on the |
... |
Additional parameter of the GENESIS API call. These parameters are only affecting the GENESIS API call itself, no further processing. |
A list with all recalled elements from GENESIS. Attributes are added to the data.frame, describing the search configuration for the returned output.
## Not run:
# Find terms that are similar (in spelling) to search term "bus"
# and sort them by Levenshtein edit distance
object <- gen_alternative_terms(term = "bus", similarity = TRUE)
# Find terms that are related (in spelling) to search term "bus"
object <- gen_alternative_terms(term = "bus*", similarity = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.