Package ca.phon.ipa

Class IPAElementFactory

java.lang.Object
ca.phon.ipa.IPAElementFactory

public class IPAElementFactory extends Object
A factory for creating various types of IPAElement objects.
  • Constructor Details

    • IPAElementFactory

      public IPAElementFactory()
  • Method Details

    • createPhone

      public Phone createPhone()
      New basic phone
    • createPhone

      public Phone createPhone(Character basePhone)
      Create a new basic phone
      Parameters:
      basePhone -
      Returns:
      the created IPAElement object
    • createPhone

      public Phone createPhone(Character basePhone, Diacritic[] combiningDiacritics)
    • createPhone

      public Phone createPhone(Diacritic prefix, Character basePhone)
      Create a new basic phone
      Parameters:
      prefix -
      basePhone -
    • createPhone

      public Phone createPhone(Diacritic prefix, Character basePhone, Diacritic suffix)
      Create a new basic phone
      Parameters:
      prefix -
      basePhone -
      suffix -
    • createPhone

      public Phone createPhone(Diacritic prefix, Character basePhone, Diacritic[] combining, Diacritic suffix)
      Create a new basic phone
      Parameters:
      prefix -
      basePhone -
      combining -
      suffix -
    • createPhone

      public Phone createPhone(Diacritic[] prefix, Character basePhone, Diacritic[] combining, Diacritic[] suffix)
      Create a new basic phone
      Parameters:
      prefix -
      basePhone -
      combining -
      suffix -
    • clonePhone

      public Phone clonePhone(Phone p)
    • createDiacritic

      public Diacritic createDiacritic(Character dia)
    • createDiacritic

      public Diacritic createDiacritic(Diacritic[] prefix, Character dia, Diacritic[] suffix)
    • copyDiacritic

      public Diacritic copyDiacritic(Diacritic dia)
    • createCompoundPhone

      public CompoundPhone createCompoundPhone()
      Create an empty compound phone
    • createCompoundPhone

      public CompoundPhone createCompoundPhone(Phone phone1, Phone phone2, Character ligature)
      Create a new compound phone
      Parameters:
      phone1 -
      phone2 -
      ligature -
    • cloneCompoundPhone

      public CompoundPhone cloneCompoundPhone(CompoundPhone cp)
    • createSyllableBoundary

      public SyllableBoundary createSyllableBoundary()
      Create a 'hard' syllable boundary. I.e., a '.'
      Returns:
      a syllable boundary marker
    • createStress

      public StressMarker createStress(StressType type)
      Create a new stress marker
      Parameters:
      type -
      Returns:
      a new stress marker of the given type
    • cloneStress

      public StressMarker cloneStress(StressMarker sm)
    • createPrimaryStress

      public StressMarker createPrimaryStress()
      Create a primary stress marker
      Returns:
      a new primary stress marker
    • createSecondaryStress

      public StressMarker createSecondaryStress()
      Create a secondary stress marker
      Returns:
      a new secondary stress marker
    • createIntonationGroup

      public IntonationGroup createIntonationGroup(IntonationGroupType type)
      Create a new intonation group
      Parameters:
      type -
      Returns:
      a new intonation group marker
    • cloneIntonationGroup

      public IntonationGroup cloneIntonationGroup(IntonationGroup ig)
    • createMajorIntonationGroup

      public IntonationGroup createMajorIntonationGroup()
      Create a major intonation group marker
      Returns:
      a new major intonation group marker
    • createMinorIntonationGroup

      public IntonationGroup createMinorIntonationGroup()
      Create a minor intonation group marker
      Returns:
      a new minor intonation group marker
    • createWordBoundary

      public WordBoundary createWordBoundary()
      Create a new word boundary. I.e., a ' '
      Returns:
      a new word boundary marker
    • createPause

      public Pause createPause(PauseLength length)
      Create a pause
      Parameters:
      length -
      Returns:
      a new pause of the given length
    • clonePause

      public Pause clonePause(Pause pause)
    • createIntraWordPause

      public IntraWordPause createIntraWordPause()
      Create an intra-word pause
      Returns:
      new intra-word pause
    • createCompoundWordMarker

      public CompoundWordMarker createCompoundWordMarker()
      Create the default compound word marker ('+')
      Returns:
      compound word marker
    • createCompoundWordMarkerPlus

      public CompoundWordMarker createCompoundWordMarkerPlus()
    • createCompoundWordMarkerTilde

      public CompoundWordMarker createCompoundWordMarkerTilde()
    • createLinker

      public Linker createLinker()
      Create a linker
      Returns:
      linker (sandhi)
    • createContraction

      public Contraction createContraction()
      Create a contraction
      Returns:
      contraction (sandhi)
    • createSandhi

      public Sandhi createSandhi(String text)
      Create a sandhi element based on given text
      Returns:
      sandhi
    • cloneSandhi

      public Sandhi cloneSandhi(Sandhi s)
    • createPhonexMatcherReference

      public PhonexMatcherReference createPhonexMatcherReference(int groupIndex)
      Create a phonex matcher reference.
      Parameters:
      groupIndex -
    • createPhonexMatcherReference

      public PhonexMatcherReference createPhonexMatcherReference(String groupName)
      Create a phonex matcher reference.
      Parameters:
      groupName -
      Returns:
    • clonePhonexMatcherReference

      public PhonexMatcherReference clonePhonexMatcherReference(PhonexMatcherReference ref)
    • createAlignmentMarker

      public AlignmentMarker createAlignmentMarker()
      Create a new alignment marker (left-right arrow 0x2194)
      Returns:
    • cloneElement

      public IPAElement cloneElement(IPAElement ele)
      Clone the given IPAElement the returned element will have the exact content and same SyllableConstituentType as the original element
      Parameters:
      ele -
      Returns:
      a copy of the given element
      Throws:
      NullPointerException - if ele is null
    • copySyllabification

      public void copySyllabification(IPAElement ele1, IPAElement ele2)
      Copy syllabification information from ele1 to ele2
      Parameters:
      ele1 -
      ele2 -