add_synonym {globaltrends} | R Documentation |
Add synonyms for object keywords
Description
The function allows to add synonyms for object keywords. Sometimes, objects
of interest can be searched with different keywords on Google e.g., FC Bayern
for Bayern Munich. Search scores for keywords that are added as synonyms are
aggregated when running compute_score
. The function allows to add
synonyms for a single keyword at a time.
Usage
add_synonym(keyword, synonym)
## S3 method for class 'character'
add_synonym(keyword, synonym)
## S3 method for class 'list'
add_synonym(keyword, synonym)
Arguments
keyword |
Keyword of type |
synonym |
Synonym of type |
Value
Message that the synonym has been added successfully. Synonym data is written to table keyword_synonyms.
Note
To avoid trailing spaces stringr::str_squish
is automatically
applied to all keywords and synonyms.
See Also
Examples
## Not run:
add_synonym(
keyword = "fc bayern",
synonym = "bayern munich"
)
## End(Not run)
[Package globaltrends version 0.0.14 Index]