Code Search for Developers
 
 
  

ARPABETPhoneme.java from Texai at Krugle


Show ARPABETPhoneme.java syntax highlighted

/*
 * ARPABETPhoneme.java
 *
 * Created on February 8, 2007, 9:56 PM
 *
 * Description: Provides a phoneme construction.
 *
 * Copyright (C) 2007 Stephen L. Reed.
 *
 * This program is free software; you can redistribute it and/or modify it under the terms
 * of the GNU General Public License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along with this program;
 * if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

package org.texai.cmudict.domainEntity;

import javax.persistence.Id;
import org.texai.kb.Constants;
import org.texai.kb.persistence.DomainEntity;
import org.texai.kb.persistence.DomainProperty;

/**
 *
 * @author reed
 */
@DomainEntity(typeOf={Constants.TERM_NAME_LINGUISTIC_OBJECT_TYPE}, subClassOf={Constants.TERM_NAME_COMPUTER_DATA_STRUCTURE})
public class ARPABETPhoneme {
  
  /** example odd --> AA D */
  public static final String PHONEME_AA = "AA";
  
  /** AA with no stress */
  public static final String PHONEME_AA0 = "AA0";
  
  /** AA with primary stress */
  public static final String PHONEME_AA1 = "AA1";
  
  /** AA with secondary stress */
  public static final String PHONEME_AA2 = "AA2";
  
  /** example at --> AE T */
  public static final String PHONEME_AE = "AE";
  
  /** AE with no stress */
  public static final String PHONEME_AE0 = "AE0";
  
  /** AE with secondary stress */
  public static final String PHONEME_AE1 = "AE1";
  
  /** AE with secondary stress */
  public static final String PHONEME_AE2 = "AE2";
  
  /** example hut --> HH AH T */
  public static final String PHONEME_AH = "AH";
  
  /** AH with no stress */
  public static final String PHONEME_AH0 = "AH0";
  
  /** AH with primary stress */
  public static final String PHONEME_AH1 = "AH1";
  
  /** AH with secondary stress */
  public static final String PHONEME_AH2 = "AH2";
  
  /** example ought --> AO T   */
  public static final String PHONEME_AO = "AO";
  
  /** AO with no stress   */
  public static final String PHONEME_AO0 = "AO0";
  
  /** AO with primary stress   */
  public static final String PHONEME_AO1 = "AO1";
  
  /** AO with secondary stress   */
  public static final String PHONEME_AO2 = "AO2";
  
  /** example cow --> K AW  */
  public static final String PHONEME_AW = "AW";
  
  /** AW with no stress  */
  public static final String PHONEME_AW0 = "AW0";
  
  /** AW with primary stress  */
  public static final String PHONEME_AW1 = "AW1";
  
  /** AW with secondary stress  */
  public static final String PHONEME_AW2 = "AW2";
  
  /** example hide --> HH AY D  */
  public static final String PHONEME_AY = "AY";
  
  /** AY with no stress  */
  public static final String PHONEME_AY0 = "AY0";
  
  /** AY with primary stress  */
  public static final String PHONEME_AY1 = "AY1";
  
  /** AY with secondary stress  */
  public static final String PHONEME_AY2 = "AY2";
  
  /** example be --> B IY  */
  public static final String PHONEME_B = "B";
  
  /** example cheese --> CH IY Z  */
  public static final String PHONEME_CH = "CH";
  
  /** example dee --> D IY  */
  public static final String PHONEME_D = "D";
  
  /** example thee --> DH IY  */
  public static final String PHONEME_DH = "DH";
  
  /** example Ed --> EH D  */
  public static final String PHONEME_EH = "EH";
  
  /** EH with no stress  */
  public static final String PHONEME_EH0 = "EH0";
  
  /** EH with primary stress  */
  public static final String PHONEME_EH1 = "EH1";
  
  /** EH with secondary stress  */
  public static final String PHONEME_EH2 = "EH2";
  
  /** example hurt --> HH ER T  */
  public static final String PHONEME_ER = "ER";
  
  /** ER with no stress  */
  public static final String PHONEME_ER0 = "ER0";
  
  /** ER with secondary stress  */
  public static final String PHONEME_ER2 = "ER2";
  
  /** ER with primary stress  */
  public static final String PHONEME_ER1 = "ER1";
  
  /** example ate --> EY T  */
  public static final String PHONEME_EY = "EY";
  
  /** EY with no stress  */
  public static final String PHONEME_EY0 = "EY0";
  
  /** EY with primary stress  */
  public static final String PHONEME_EY1 = "EY1";
  
  /** EY with secondary stress  */
  public static final String PHONEME_EY2 = "EY2";
  
  /** example fee --> F IY  */
  public static final String PHONEME_F = "F";
  
  /** example green --> G R IY N  */
  public static final String PHONEME_G = "G";
  
  /** example he --> HH IY  */
  public static final String PHONEME_HH = "HH";
  
  /** example it --> IH T  */
  public static final String PHONEME_IH = "IH";
  
  /** IH with no stress  */
  public static final String PHONEME_IH0 = "IH0";
  
  /** IH with secondary stress  */
  public static final String PHONEME_IH1 = "IH1";
  
  /** IH with secondary stress  */
  public static final String PHONEME_IH2 = "IH2";
  
  /** example eat --> IY T  */
  public static final String PHONEME_IY = "IY";
  
  /** IY with no stress  */
  public static final String PHONEME_IY0 = "IY0";
  
  /** IY with primary stress  */
  public static final String PHONEME_IY1 = "IY1";
  
  /** IY with secondary stress  */
  public static final String PHONEME_IY2 = "IY2";
  
  /** example gee --> JH IY  */
  public static final String PHONEME_JH = "JH";
  
  /** example  key --> K IY */
  public static final String PHONEME_K = "K";
  
  /** example lee --> L IY  */
  public static final String PHONEME_L = "L";
  
  /** example me --> M IY  */
  public static final String PHONEME_M = "M";
  
  /** example knee --> N IY  */
  public static final String PHONEME_N = "N";
  
  /** example ping --> P IH NG  */
  public static final String PHONEME_NG = "NG";
  
  /** example oat --> OW T  */
  public static final String PHONEME_OW = "OW";
  
  /** OW with no stress  */
  public static final String PHONEME_OW0 = "OW0";
  
  /** OW with primary stress  */
  public static final String PHONEME_OW1 = "OW1";
  
  /** OW with secondary stress  */
  public static final String PHONEME_OW2 = "OW2";
  
  /** example toy --> T OY  */
  public static final String PHONEME_OY = "OY";
  
  /** OY with no stress  */
  public static final String PHONEME_OY0 = "OY0";
  
  /** OY with primary stress  */
  public static final String PHONEME_OY1 = "OY1";
  
  /** OY with secondary stress  */
  public static final String PHONEME_OY2 = "OY2";
  
  /** example pee --> P IY  */
  public static final String PHONEME_P = "P";
  
  /** example ead --> R IY D  */
  public static final String PHONEME_R = "R";
  
  /** example sea --> S IY  */
  public static final String PHONEME_S = "S";
  
  /** example she --> SH IY  */
  public static final String PHONEME_SH = "SH";
  
  /** example tea --> T IY  */
  public static final String PHONEME_T = "T";
  
  /** example theta --> TH EY T AH  */
  public static final String PHONEME_TH = "TH";
  
  /** example UH --> hood	HH UH D  */
  public static final String PHONEME_UH = "UH";
  
  /** UH with no stress  */
  public static final String PHONEME_UH0 = "UH0";
  
  /** UH with primary stress  */
  public static final String PHONEME_UH1 = "UH1";
  
  /** UH with secondary stress  */
  public static final String PHONEME_UH2 = "UH2";
  
  /** example two --> T UW  */
  public static final String PHONEME_UW = "UW";
  
  /** UW with no stress */
  public static final String PHONEME_UW0 = "UW0";
  
  /** UW with primary stress */
  public static final String PHONEME_UW1 = "UW1";
  
  /** UW with secondary stress */
  public static final String PHONEME_UW2 = "UW2";
  
  /** example vee --> V IY  */
  public static final String PHONEME_V = "V";
  
  /** example we --> W IY  */
  public static final String PHONEME_W = "W";
  
  /** example yield --> Y IY L D  */
  public static final String PHONEME_Y = "Y";
  
  /** example zee --> Z IY  */
  public static final String PHONEME_Z = "Z";
  
  /** example seizure --> S IY ZH ER  */
  public static final String PHONEME_ZH = "ZH";
  
  /** the term id */
  @Id
  private Long termId;                                     // NOPMD
  
  /** the phoneme name that identifies this instance */
  @DomainProperty(name=Constants.TERM_NAME_CXG_PHONEME_NAME, identifier=true)
  private String name;
    
  /**
   * Creates a new instance of ARPABETPhoneme.
   */
  public ARPABETPhoneme() {
    super();
  }
  
  /**
   * Creates a new instance of ARPABETPhoneme. 
   * 
   * 
   * @param name the phoneme name that identifies this instance
   */
  public ARPABETPhoneme(final String name) {
    super();
    //Preconditions
    assert name != null : "name must not be null";
    assert name.length() > 0 : "name must not be an empty string";
    
    this.name = name;
  }
  
  /** Gets the term id that identifies this instance.
   *
   * @return the term id that identifies this instance
   */
  public Long getTermId() {
    return termId;
  }
  
  /** Gets the phoneme name that identifies this instance.
   *
   * @return the phoneme name that identifies this instance
   */
  public String getName() {
    return name;
  }
  
  /** Returns a string representation of this object.
   *
   * @return a string representation of this object
   */
  @Override
  public String toString() {
    return "[PHONEME " + name + "]";
  }
  
  
}




See more files for this project here

Texai

Texai is an chatbot that intelligently seeks to acquire knowledge and friendly behaviors.

Project homepage: http://sourceforge.net/projects/texai
Programming language(s): Java,Shell Script,XML
License: other

  ARPABETPhoneme.java
  ARPABETPhonemeAdapter.java
  ARPABETPronunciation.java
  CMUDictionaryEnglishWordForm.java
  package-info.java