Class TierAligner
java.lang.Object
ca.phon.session.alignment.TierAligner
Helper class for aligning two tiers of a record. Tier values are first filtered using tier alignment rules
and then left-aligned. The result is a list of tuples where each tuple contains an element from the top tier
and an element from the bottom tier. If one tier has more elements than the other, nulls are used to fill in the gaps
(i.e., 'indels.')
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TierAlignmentalignTiers(Tier<?> topTier, Tier<?> bottomTier) static TierAlignmentalignTiers(Tier<?> topTier, Tier<?> bottomTier, TierAlignmentRules tierAlignmentRules, Transcriber transcriber) Align two tiers using the given tier alignment rulesstatic TierAlignmentalignTiers(Tier<?> topTier, Tier<?> bottomTier, Transcriber transcriber) static CrossTierAlignmentcalculateCrossTierAlignment(Record record, Tier<?> topTier) Calculates cross tier alignment for all tiers against the Orthography tierstatic CrossTierAlignmentcalculateCrossTierAlignment(Record record, Tier<?> topTier, Transcriber transcriber) Calculate cross tier alignment for all tiers which align by typestatic CrossTierAlignmentcalculateCrossTierAlignment(Record record, Transcriber transcriber) Calculates cross tier alignment for all tiers against the Orthography tiermapAlignedElements(List<?> topElements, List<?> bottomElements) Return a list of left-aligned tuples
-
Constructor Details
-
TierAligner
public TierAligner()
-
-
Method Details
-
mapAlignedElements
-
alignTiers
public static TierAlignment alignTiers(Tier<?> topTier, Tier<?> bottomTier, TierAlignmentRules tierAlignmentRules, Transcriber transcriber) Align two tiers using the given tier alignment rules- Parameters:
topTier- top tierbottomTier- bottom tiertierAlignmentRules- tier alignment rulestranscriber- transcriber the blind transcriber used to transcribe the record- Returns:
- tier alignment
-
alignTiers
-
alignTiers
public static TierAlignment alignTiers(Tier<?> topTier, Tier<?> bottomTier, Transcriber transcriber) -
calculateCrossTierAlignment
public static CrossTierAlignment calculateCrossTierAlignment(Record record, Transcriber transcriber) Calculates cross tier alignment for all tiers against the Orthography tier- Parameters:
record-- Returns:
- cross tier alignment for record against Orthography
-
calculateCrossTierAlignment
Calculates cross tier alignment for all tiers against the Orthography tier- Parameters:
record- the recordtopTier- the top tier to align against (usually orthography or morphology- Returns:
- cross tier alignment for record
-
calculateCrossTierAlignment
public static CrossTierAlignment calculateCrossTierAlignment(Record record, Tier<?> topTier, Transcriber transcriber) Calculate cross tier alignment for all tiers which align by type- Parameters:
record- the recordtopTier- the top tier to align against (usually orthography or morphologytranscriber- the transcriber to use for blind tiers- Returns:
- cross tier alignment for record
-