Class PhoneMap

All Implemented Interfaces:
IExtendable

public class PhoneMap extends AlignmentMap<IPAElement> implements IExtendable
  • Constructor Details

  • Method Details

    • getActualRep

      public IPATranscript getActualRep()
    • setActualRep

      public void setActualRep(IPATranscript actualRep)
    • getTargetRep

      public IPATranscript getTargetRep()
    • setTargetRep

      public void setTargetRep(IPATranscript targetRep)
    • getExtensions

      public Set<Class<?>> getExtensions()
      Description copied from interface: IExtendable
      Return all extension types supported
      Specified by:
      getExtensions in interface IExtendable
    • getExtension

      public <T> T getExtension(Class<T> cap)
      Description copied from interface: IExtendable
      Get the requested extension if available.
      Specified by:
      getExtension in interface IExtendable
      Returns:
      the capability object or null if the cability is not available
    • putExtension

      public <T> T putExtension(Class<T> cap, T impl)
      Description copied from interface: IExtendable
      Add a new extension.
      Specified by:
      putExtension in interface IExtendable
      Parameters:
      cap - the extension to add
      Returns:
      the added extension implementation
    • removeExtension

      public <T> T removeExtension(Class<T> cap)
      Description copied from interface: IExtendable
      Remove a capability.
      Specified by:
      removeExtension in interface IExtendable
      Parameters:
      cap - the capability to remove
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toString

      public String toString(boolean includeScType)
    • fromString

      public static PhoneMap fromString(IPATranscript target, IPATranscript actual, String align)
      Utility method for building a PhoneMap object given a string provided by the toString method. Original transcriptions are also required.
      Parameters:
      target -
      actual -
      align - the string representation of the alignment
      Throws:
      IllegalArgumentException - if the phones found in the align string do not match the give target/actual forms
    • fromString

      public static PhoneMap fromString(String align)
      Construct alignment given the input string. This method constructs the IPATranscript references from the given input.
      Parameters:
      align -
      Returns:
      alignment
      Throws:
      IllegalArgumentException - if align is not a valid string
    • getSubAlignmentIndex

      public int getSubAlignmentIndex(IPATranscript ipaT, IPATranscript ipaA)
    • getSubAlignmentEnd

      public int getSubAlignmentEnd(IPATranscript ipaT, IPATranscript ipaA)
    • getSubAlignment

      public PhoneMap getSubAlignment(IPATranscript ipaT, IPATranscript ipaA)
      Get the sub-alignment from the given elements.
      Parameters:
      topElements -
      btmElements -
      Returns:
      sub-alignment containing the given top/bottom elements