/** * Klatt Rule 10: Shortening in consonant clusters * * @return A percentage value as a factor for duration (100 corresponds to no change). */ private int klattRule10(Element segment) { boolean hasPrecedingConsonant = false; boolean hasFollowingConsonant = false; if (isConsonant(segment)) { Element preceding = getPreviousSegment(segment); if (preceding != null && isConsonant(preceding)) { hasPrecedingConsonant = true; } Element following = getNextSegment(segment); if (following != null && isConsonant(following)) { hasFollowingConsonant = true; } if (hasPrecedingConsonant && hasFollowingConsonant) { return getPropertyAsInteger("rule10.surrounded"); } else if (hasPrecedingConsonant) { return getPropertyAsInteger("rule10.preceded"); } else if (hasFollowingConsonant) { return getPropertyAsInteger("rule10.followed"); } } // default: Rule not applicable return 100; }
/** * Klatt Rule 10: Shortening in consonant clusters * * @return A percentage value as a factor for duration (100 corresponds to no change). */ private int klattRule10(Element segment) { boolean hasPrecedingConsonant = false; boolean hasFollowingConsonant = false; if (isConsonant(segment)) { Element preceding = getPreviousSegment(segment); if (preceding != null && isConsonant(preceding)) { hasPrecedingConsonant = true; } Element following = getNextSegment(segment); if (following != null && isConsonant(following)) { hasFollowingConsonant = true; } if (hasPrecedingConsonant && hasFollowingConsonant) { return getPropertyAsInteger("rule10.surrounded"); } else if (hasPrecedingConsonant) { return getPropertyAsInteger("rule10.preceded"); } else if (hasFollowingConsonant) { return getPropertyAsInteger("rule10.followed"); } } // default: Rule not applicable return 100; }
/** * Klatt Rule 10: Shortening in consonant clusters * * @return A percentage value as a factor for duration (100 corresponds to no change). */ private int klattRule10(Element segment) { boolean hasPrecedingConsonant = false; boolean hasFollowingConsonant = false; if (isConsonant(segment)) { Element preceding = getPreviousSegment(segment); if (preceding != null && isConsonant(preceding)) { hasPrecedingConsonant = true; } Element following = getNextSegment(segment); if (following != null && isConsonant(following)) { hasFollowingConsonant = true; } if (hasPrecedingConsonant && hasFollowingConsonant) { return getPropertyAsInteger("rule10.surrounded"); } else if (hasPrecedingConsonant) { return getPropertyAsInteger("rule10.preceded"); } else if (hasFollowingConsonant) { return getPropertyAsInteger("rule10.followed"); } } // default: Rule not applicable return 100; }