Class IPAElementFactory
java.lang.Object
ca.phon.ipa.IPAElementFactory
A factory for creating various types of
IPAElement
objects.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncloneElement(IPAElement ele) Clone the givenIPAElementthe returned element will have the exact content and sameSyllableConstituentTypeas the original elementcloneElementWithSyllableInfo(IPAElement ele, SyllableInfo syllableInfo) Clone the givenIPAElementthe returned element will have the exact content and sameSyllableConstituentTypeas the original element with new syllable infoclonePause(Pause pause) clonePhone(Phone p) clonePhoneWithScType(Phone p, SyllableConstituentType scType) clonePhoneWithSyllableInfo(Phone p, SyllableInfo syllInfo) cloneStressWithSyllableInfo(StressMarker sm, SyllableInfo syllInfo) cloneToneNumberWithSyllableInfo(ToneNumber tn, SyllableInfo syllInfo) copyDiacritic(Diacritic dia) Create a new alignment marker (left-right arrow 0x2194)Create an empty compound phonecreateCompoundPhone(Phone phone1, Phone phone2, Character ligature) Create a new compound phonecreateCompoundPhone(Phone phone1, Phone phone2, Character ligature, Diacritic[] prefixDiacritics, Diacritic[] combiningDiacritics, Diacritic[] suffixDiacritics, FeatureSet overrides, SyllableInfo syllInfo) createCompoundPhone(Phone phone1, Phone phone2, Character ligature, FeatureSet overrides, SyllableInfo syllInfo) Create the default compound word marker ('+')Create a contractioncreateDiacritic(Diacritic[] prefix, Character dia, Diacritic[] suffix) Create diacritic from prefix diacritics, dia, and suffix (or combining) diacriticscreateDiacritic(Character dia) Create diacritic from given charcreateDiacritic(String text) Create diacritic from given string.Create a new intonation groupCreate an intra-word pauseCreate a linkerCreate a major intonation group markerCreate a minor intonation group markercreatePause(float secs) createPause(PauseLength length) Create a pauseNew basic phonecreatePhone(Diacritic[] prefix, Character basePhone, Diacritic[] combining, Diacritic[] suffix) Create a new basic phonecreatePhone(Diacritic[] prefix, Character basePhone, Diacritic[] combining, Diacritic[] suffix, FeatureSet overrides, SyllableInfo syllInfo) Create a new basic phone with feature overrides and syllable infocreatePhone(Diacritic prefix, Character basePhone) Create a new basic phonecreatePhone(Diacritic prefix, Character basePhone, Diacritic suffix) Create a new basic phonecreatePhone(Diacritic prefix, Character basePhone, Diacritic[] combining, Diacritic suffix) Create a new basic phonecreatePhone(Character basePhone) Create a new basic phonecreatePhone(Character basePhone, Diacritic[] combiningDiacritics) createPhonexMatcherReference(int groupIndex) Create a phonex matcher reference.createPhonexMatcherReference(String groupName) Create a phonex matcher reference.createPhonexMatcherReference(String groupName, Integer groupIndex, Diacritic[] prefixDiacritics, Diacritic[] combiningDiacritics, Diacritic[] suffixDiacritics) Create a primary stress markercreateSandhi(String text) Create a sandhi element based on given textCreate a secondary stress markercreateStress(StressType type) Create a new stress markerCreate a 'hard' syllable boundary.createToneNumber(char[] toneChars) Create a tone number elementCreate a new word boundary.
-
Constructor Details
-
IPAElementFactory
public IPAElementFactory()
-
-
Method Details
-
createPhone
New basic phone -
createPhone
Create a new basic phone- Parameters:
basePhone-- Returns:
- the created
IPAElementobject
-
createPhone
-
createPhone
-
createPhone
-
createPhone
-
createPhone
-
createPhone
public Phone createPhone(Diacritic[] prefix, Character basePhone, Diacritic[] combining, Diacritic[] suffix, FeatureSet overrides, SyllableInfo syllInfo) Create a new basic phone with feature overrides and syllable info- Parameters:
prefix- prefix diacriticsbasePhone- base phone charactercombining- combining diacriticssuffix- suffix diacriticsoverrides- feature overridessyllInfo- syllable info- Returns:
- the created
IPAElementobject
-
clonePhone
-
clonePhoneAsDiphthong
-
clonePhoneWithScType
-
clonePhoneWithSyllableInfo
-
createDiacritic
Create diacritic from given string. Given string must match one of:
- PREFIX COMBINING*
- SUFFIX ROLE_REVERSAL COMBINING*
- SUFFIX COMBINING* LIGATURE
- SUFFIX COMBINING*
- PREFIX ROLE_REVERSAL COMBINING*
- LIGATURE PREFIX COMBINING*
- Parameters:
text-- Returns:
- diacritic for given string
- Throws:
IllegalArgumentException- if text does not match prefix/suffix diacritic rules
-
createDiacritic
-
createDiacritic
-
copyDiacritic
-
createCompoundPhone
Create an empty compound phone -
createCompoundPhone
Create a new compound phone- Parameters:
phone1-phone2-ligature-
-
createCompoundPhone
public CompoundPhone createCompoundPhone(Phone phone1, Phone phone2, Character ligature, FeatureSet overrides, SyllableInfo syllInfo) -
createCompoundPhone
public CompoundPhone createCompoundPhone(Phone phone1, Phone phone2, Character ligature, Diacritic[] prefixDiacritics, Diacritic[] combiningDiacritics, Diacritic[] suffixDiacritics, FeatureSet overrides, SyllableInfo syllInfo) -
cloneCompoundPhone
-
createSyllableBoundary
Create a 'hard' syllable boundary. I.e., a '.'- Returns:
- a syllable boundary marker
-
createStress
Create a new stress marker- Parameters:
type-- Returns:
- a new stress marker of the given type
-
cloneStress
-
cloneStressWithSyllableInfo
-
createPrimaryStress
Create a primary stress marker- Returns:
- a new primary stress marker
-
createSecondaryStress
Create a secondary stress marker- Returns:
- a new secondary stress marker
-
createIntonationGroup
Create a new intonation group- Parameters:
type-- Returns:
- a new intonation group marker
-
cloneIntonationGroup
-
createMajorIntonationGroup
Create a major intonation group marker- Returns:
- a new major intonation group marker
-
createMinorIntonationGroup
Create a minor intonation group marker- Returns:
- a new minor intonation group marker
-
createWordBoundary
Create a new word boundary. I.e., a ' '- Returns:
- a new word boundary marker
-
createPause
Create a pause- Parameters:
length-- Returns:
- a new pause of the given length
-
createPause
-
clonePause
-
createIntraWordPause
Create an intra-word pause- Returns:
- new intra-word pause
-
createCompoundWordMarker
Create the default compound word marker ('+')- Returns:
- compound word marker
-
createCompoundWordMarkerPlus
-
createCompoundWordMarkerTilde
-
createLinker
-
createContraction
-
createSandhi
-
cloneSandhi
-
createPhonexMatcherReference
Create a phonex matcher reference.- Parameters:
groupIndex-
-
createPhonexMatcherReference
Create a phonex matcher reference.- Parameters:
groupName-- Returns:
-
createPhonexMatcherReference
-
clonePhonexMatcherReference
-
createAlignmentMarker
Create a new alignment marker (left-right arrow 0x2194)- Returns:
-
cloneElement
Clone the givenIPAElementthe returned element will have the exact content and sameSyllableConstituentTypeas the original element- Parameters:
ele-- Returns:
- a copy of the given element
- Throws:
NullPointerException- if ele isnull
-
cloneElementWithSyllableInfo
Clone the givenIPAElementthe returned element will have the exact content and sameSyllableConstituentTypeas the original element with new syllable info- Parameters:
ele-syllableInfo-- Returns:
- a copy of the given element
- Throws:
NullPointerException- if ele isnull
-
createToneNumber
Create a tone number element- Parameters:
toneChars- tone character (0-9 in superscript)- Returns:
- tone number element
-
cloneToneNumber
-
cloneToneNumberWithSyllableInfo
-