Package ca.phon.ipa.alignment
Class PhoneMap
- All Implemented Interfaces:
IExtendable
-
Field Summary
Fields inherited from class ca.phon.alignment.AlignmentMap
bottomAlignment, bottomElements, INDEL_VALUE, SPACER_VALUE, topAlignment, topElements
-
Constructor Summary
ConstructorDescriptionPhoneMap()
PhoneMap
(IPATranscript targetRep, IPATranscript actualRep) Constructor -
Method Summary
Modifier and TypeMethodDescriptionstatic PhoneMap
fromString
(IPATranscript target, IPATranscript actual, String align) Utility method for building a PhoneMap object given a string provided by the toString method.static PhoneMap
fromString
(String align) Construct alignment given the input string.<T> T
getExtension
(Class<T> cap) Get the requested extension if available.Return all extension types supportedgetSubAlignment
(IPATranscript ipaT, IPATranscript ipaA) Get the sub-alignment from the given elements.int
getSubAlignmentEnd
(IPATranscript ipaT, IPATranscript ipaA) int
getSubAlignmentIndex
(IPATranscript ipaT, IPATranscript ipaA) <T> T
putExtension
(Class<T> cap, T impl) Add a new extension.<T> T
removeExtension
(Class<T> cap) Remove a capability.void
setActualRep
(IPATranscript actualRep) void
setTargetRep
(IPATranscript targetRep) toString()
toString
(boolean includeScType) Methods inherited from class ca.phon.alignment.AlignmentMap
getAligned, getAligned, getAligned, getAlignedElement, getAlignedElements, getAlignmentLength, getBottomAlignment, getBottomAlignmentElements, getBottomElements, getTopAlignment, getTopAlignmentElements, getTopElements, setBottomAlignment, setBottomElements, setTopAlignment, setTopElements
-
Constructor Details
-
PhoneMap
public PhoneMap() -
PhoneMap
Constructor
-
-
Method Details
-
getActualRep
-
setActualRep
-
getTargetRep
-
setTargetRep
-
getExtensions
Description copied from interface:IExtendable
Return all extension types supported- Specified by:
getExtensions
in interfaceIExtendable
-
getExtension
Description copied from interface:IExtendable
Get the requested extension if available.- Specified by:
getExtension
in interfaceIExtendable
- Returns:
- the capability object or
null
if the cability is not available
-
putExtension
Description copied from interface:IExtendable
Add a new extension.- Specified by:
putExtension
in interfaceIExtendable
- Parameters:
cap
- the extension to add- Returns:
- the added extension implementation
-
removeExtension
Description copied from interface:IExtendable
Remove a capability.- Specified by:
removeExtension
in interfaceIExtendable
- Parameters:
cap
- the capability to remove
-
toString
-
toString
-
fromString
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
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
-
getSubAlignmentEnd
-
getSubAlignment
Get the sub-alignment from the given elements.- Parameters:
topElements
-btmElements
-- Returns:
- sub-alignment containing the given top/bottom elements
-