Homophones
transcribe.homophones
create_convert(*families)
Return a converter function that converts a list to the same list with only main words
Parameters:
Name | Type | Description | Default |
---|---|---|---|
families |
List[Set[str]]
|
List of homophone families. |
()
|
Returns:
Type | Description |
---|---|
List[List[str]]
|
List[List[str]]: True if all paths exist in |
Source code in src/transcribe/homophones.py
match_sequence(list1, list2, homophones)
Finds index of overlaps between two lists given a homophone mapping.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
list1 |
List[str]
|
List of words in a sequence. |
required |
list2 |
List[str]
|
List of words in another sequence for matching/comparison. |
required |
homophones |
List[Set[str]]
|
List of homophone families. |
required |
Returns:
Type | Description |
---|---|
Tuple[List[int], List[int], List[Tuple[str, int, int, int, int]]]
|
Tuple[List[int], List[int], List[Tuple[str, int, int, int, int]]]: Pair of lists containing list of indices of overlap. |