Class HTK2DISC

  • All Implemented Interfaces:
    Function<String,​String>, UnaryOperator<String>

    public class HTK2DISC
    extends PhonemeTranslator
    Translates Hidden Markov Model Toolkit (HTK) dictionary pronunciations like t r _{ n s k r I p S _@ n. to CELEX-DISC-encoded transcriptions, like: tr{nskrIpS@n

    Essentially, spaces and underscores are removed.

    This translator will also handle input that is IPA-encoded, e.g. mʌtnt͡ʃɔps ...becomes: m _ʌ t n̩ t͡ʃ _ɔ p s.

    Mapping
    SourceDestinationExample
    Author:
    Robert Fromont robert@fromont.net.nz
    See Also:
    DISC2HTK
    • Constructor Detail

      • HTK2DISC

        public HTK2DISC()
        Default constructor.
    • Method Detail

      • apply

        public String apply​(String source)
        Translates a phonemic transcription from the source encoding to the destination encoding.
        Specified by:
        apply in interface Function<String,​String>
        Overrides:
        apply in class PhonemeTranslator
        Parameters:
        source - Phonemic transcription in the source encoding.
        Returns:
        Phonemic transcription in the destination encoding.