Returns all groups of homophones 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 lower case.
defget_homophone_groups(self,word):...
Parameter
Type
Description
word
str
The word for getting groups of homophones.
Returns: list[list[str]]: All groups of homophones to which the specified word belongs.
Raises
Description
ValueError
Raised when word is None.
Example
fromgroupdocs.searchimportIndexindex=Index("./MyIndex")homophones=index.dictionaries.homophone_dictionarygroups=homophones.get_homophone_groups("braid")print("Homophone groups for 'braid':")forgroupingroups:print(" ".join(group))ifhomophones.count>0:# Removing all homophones from the dictionaryhomophones.clear()
Aliases
These names call get_homophone_groups too, limited to the overloads listed.