Gets all groups of synonyms to which the specified word belongs.
The case of the letters of the word is not taken into account: the groups contain the word as the dictionary keeps it, in the lower case.
defget_synonym_groups(self,word):...
Parameter
Type
Description
word
str
The word for getting groups of synonyms.
Returns: list[list[str]]: All groups of synonyms to which the specified word belongs.
Raises
Description
ValueError
If word is None.
Example
fromgroupdocs.searchimportIndexindex=Index("./MyIndex")synonyms=index.dictionaries.synonym_dictionarygroups=synonyms.get_synonym_groups("make")print("Synonym groups for 'make':")forgroupingroups:print(" ".join(group))# Optionally clear the dictionaryifsynonyms.count>0:synonyms.clear()
Aliases
These names call get_synonym_groups too, limited to the overloads listed.