gen_alternative_terms: Search for Related Terms Based on the Same Specific String

View source: R/gen_alternative_terms.R

gen_alternative_termsR Documentation

Search for Related Terms Based on the Same Specific String

Description

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.

Usage

gen_alternative_terms(term = NULL, similarity = TRUE, ...)

Arguments

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 adist() function.

...

Additional parameter of the GENESIS API call. These parameters are only affecting the GENESIS API call itself, no further processing.

Value

A list with all recalled elements from GENESIS. Attributes are added to the data.frame, describing the search configuration for the returned output.

Examples

## 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)


restatis documentation built on July 9, 2023, 5:31 p.m.