We approach this problem by treating g2p as a function from contiguous sequences of graphemes, which we call 'grapheme subwords', to sequences of phonemes ('phoneme subwords'), so that there is minimal ambiguity in finding the phoneme subword that corresponds to a given grapheme subword.
we seek to minimize both these quantities: 1.