add_synonym {globaltrends} | R Documentation |
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.
add_synonym(keyword, synonym)
## S3 method for class 'character'
add_synonym(keyword, synonym)
## S3 method for class 'list'
add_synonym(keyword, synonym)
keyword |
Keyword of type |
synonym |
Synonym of type |
Message that the synonym has been added successfully. Synonym data is written to table keyword_synonyms.
To avoid trailing spaces stringr::str_squish
is automatically
applied to all keywords and synonyms.
## Not run:
add_synonym(
keyword = "fc bayern",
synonym = "bayern munich"
)
## End(Not run)