Skip to content
Josef Fruehwald edited this page Mar 16, 2023 · 1 revision

Development Plan

Step 1:

Figure out how to re-write the basic conversion from CMU to Trager-Labov in just python #1

def recode(phone: SequenceInterval) -> str:
  ...

a.label ==AO1a.label = recode(a)
a.label ==oh

Step 2

Figure out how to encapsulate the logic from step 1 within a dictionary.

def recode(
  phone : SequenceInterval,
  recode_logic : dict
) -> str : 
  ...

a.label ==AO1a.label = recode(a, recode_logic = cmu2labov)
a.label ==oh

Step 3:

Parse an external yaml file to be the recode logic.

def parse_recode_yaml(recode_yaml: str) -> dict:
  ...

def recode(
  phone: SequenceInterval,
  recode_logic: dict
) -> str:
  ...

cmu2labov = parse_recode_yaml(“cmu2labov.yml”)

a.label ==AO1a.label = recode(a, recode_logic = cmu2labov)
a.label ==oh
Clone this wiki locally