If you’re already a Hitchhiker, log in to access this content.
How Synonyms Work| Hitchhikers Platform
What You’ll Learn
In this section, you will learn:
- How the answers algorithm deals with synonyms
So how do synonyms actually work within the context of the Answers algorithm?
One Way Synonyms
Let’s walk through how a one-way synonym would be treated.
For a single query, we take each word, and every combination of sequential words, and check if a synonym exists for that phrase. Using the synonyms that are defined in the backend configuration, the algorithm produces “expanded” versions of the query - e.g., replacing the parts of the query with matching synonyms.
- Original Search Term: “Career information”
- Synonyms: “career” → “Job”,
Expanded Search Terms:
- “Career information”
- “Job information”
Find Potential Matches using natural language processing: Answers then conducts a search using the expanded versions of the query. In looking for matches, it searches across textSearch and NLP searchable fields.
- Taking the above example, Answers searches all verticals for both “career information” and “job information” looking for matches in any pre-defined searchable fields.
Return the Best Results: The Answers Algorithm determines the best results and returns them. This might be a match for the original query (“career information”), or for any of the expanded search terms (“job information”).
Do other full text search: Return other entities using full text search from the original query (just as if the synonyms weren’t there).
Now that you understand how one-way synonyms work - you also understand how synonym sets work. The only difference between the two is that sets expand in both directions. We are essentially just creating many one-way synonyms for all permutations of the set!