Esempio n. 1
0
 /**
  * Converts an array of phone symbol strings into a single phone string. If stress is marked on
  * input phone symbols ("1" appended), a crude syllabification is done on the phone string.
  */
 public String phoneArray2phoneString(AllophoneSet allophoneSet, String[] voicePhones) {
   StringBuilder phoneBuf = new StringBuilder();
   for (int i = 0; i < voicePhones.length; i++) {
     phoneBuf.append(voicePhones[i]);
   }
   Syllabifier syllabifier = allophoneSet.getSyllabifier();
   return syllabifier.syllabify(phoneBuf.toString());
 }
Esempio n. 2
0
  /**
   * Phone chain is syllabified. After that, no white spaces are included, stress is on syllable of
   * first stress bearing vowal, or assigned rule-based if there is no stress predicted by the tree.
   *
   * @param phones input phone chain, unsyllabified, stress marking attached to vowals
   * @return phone chain, with syllable sepeators "-" and stress symbols "'"
   */
  public String syllabify(String phones) {
    if (syllabifier != null) return syllabifier.syllabify(phones);

    return null;
  }