Learn R Programming

globaltrends (version 0.0.14)

add_synonym: 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 character add_synonym(keyword, synonym)

# S3 method for list add_synonym(keyword, synonym)

Value

Message that the synonym has been added successfully. Synonym data is written to table keyword_synonyms.

Arguments

keyword

Keyword of type character and length 1 for which the synonyms are added.

synonym

Synonym of type character.

See Also

Examples

Run this code
if (FALSE) {
add_synonym(
  keyword = "fc bayern",
  synonym = "bayern munich"
)
}

Run the code above in your browser using DataLab