| 1 | #!/usr/bin/perl | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | # -*- Mode: Perl -*- | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3 | # Author : Ian Phillipps | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4 | # Last Modified On: Sun May 2 15:35:33 2004 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5 | # Language : CPerl | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 7 | package Text::English; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 9 | 2 | $VERSION = $VERSION = '0.01'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 11 | 680 | ▶ | sub stem { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
stem: called CC=81 SCAR=50.4
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 12 | 680 | my @parms = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 13 | 680 | foreach( @parms ) { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 14 | 680 | $_ = lc $_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 16 | # Step 0 - remove punctuation | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 17 | 680 | s/'s$//; s/^[^a-z]+//; s/[^a-z]+$//; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 18 | 680 | ▶ | next unless /^[a-z]+$/; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 20 | # step1a_rules | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 21 | 674 | ▶ | if( /[^s]s$/ ) { s/sses$/ss/ || s/ies$/i/ || s/s$// } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
Condition66%2/3
s/sses$/ss/ or s/ies$/i/
MC/DC50%1/2
s/sses$/ss/ or s/ies$/i/
s/sses$/ss/
s/ies$/i/
Truth table66%2/3
A or B
A= s/sses$/ss/B= s/ies$/i/
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 23 | # step1b_rules. The business with rule==106 is embedded in the | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 24 | # boolean expressions here. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 25 | 674 | ▶ | (/[aeiouy][^aeiouy].*eed$/ && s/eed$/ee/ ) || | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition75%40/53
/[aeiouy][^aeiouy].*eed$/ && s/eed$/ee/ || (s/([aeiou].*)ed$/$1/ || s/([aeiouy].*)ing$/$1/) && (s/at$/ate/ || s/bl$/ble/ || s/iz$/ize/ || s/bb$/b/ || s/dd$/d/ || s/ff$/f/ || s/gg$/g/ || s/mm$/m/ || s/nn$/n/ || s/pp$/p/ || s/rr$/r/ || s/tt$/t/ || s/ww$/w/ || s/xx$/x/ || s/^[^aeiouy]+[aeiouy][^aeiouy]$/$&e/)
/[aeiouy][^aeiouy].*eed$/ and s/eed$/ee/
s/([aeiou].*)ed$/$1/ || s/([aeiouy].*)ing$/$1/ and s/at$/ate/ || s/bl$/ble/ || s/iz$/ize/ || s/bb$/b/ || s/dd$/d/ || s/ff$/f/ || s/gg$/g/ || s/mm$/m/ || s/nn$/n/ || s/pp$/p/ || s/rr$/r/ || s/tt$/t/ || s/ww$/w/ || s/xx$/x/ || s/^[^aeiouy]+[aeiouy][^aeiouy]$/$&e/
s/([aeiou].*)ed$/$1/ or s/([aeiouy].*)ing$/$1/
s/at$/ate/ or s/bl$/ble/ or s/iz$/ize/ or s/bb$/b/ or s/dd$/d/ or s/ff$/f/ or s/gg$/g/ or s/mm$/m/ or s/nn$/n/ or s/pp$/p/ or s/rr$/r/ or s/tt$/t/ or s/ww$/w/ or s/xx$/x/ or s/^[^aeiouy]+[aeiouy][^aeiouy]$/$&e/
s/at$/ate/ or s/bl$/ble/ or s/iz$/ize/ or s/bb$/b/ or s/dd$/d/ or s/ff$/f/ or s/gg$/g/ or s/mm$/m/ or s/nn$/n/ or s/pp$/p/ or s/rr$/r/ or s/tt$/t/ or s/ww$/w/ or s/xx$/x/
s/at$/ate/ or s/bl$/ble/ or s/iz$/ize/ or s/bb$/b/ or s/dd$/d/ or s/ff$/f/ or s/gg$/g/ or s/mm$/m/ or s/nn$/n/ or s/pp$/p/ or s/rr$/r/ or s/tt$/t/ or s/ww$/w/
s/at$/ate/ or s/bl$/ble/ or s/iz$/ize/ or s/bb$/b/ or s/dd$/d/ or s/ff$/f/ or s/gg$/g/ or s/mm$/m/ or s/nn$/n/ or s/pp$/p/ or s/rr$/r/ or s/tt$/t/
s/at$/ate/ or s/bl$/ble/ or s/iz$/ize/ or s/bb$/b/ or s/dd$/d/ or s/ff$/f/ or s/gg$/g/ or s/mm$/m/ or s/nn$/n/ or s/pp$/p/ or s/rr$/r/
s/at$/ate/ or s/bl$/ble/ or s/iz$/ize/ or s/bb$/b/ or s/dd$/d/ or s/ff$/f/ or s/gg$/g/ or s/mm$/m/ or s/nn$/n/ or s/pp$/p/
s/at$/ate/ or s/bl$/ble/ or s/iz$/ize/ or s/bb$/b/ or s/dd$/d/ or s/ff$/f/ or s/gg$/g/ or s/mm$/m/ or s/nn$/n/
s/at$/ate/ or s/bl$/ble/ or s/iz$/ize/ or s/bb$/b/ or s/dd$/d/ or s/ff$/f/ or s/gg$/g/ or s/mm$/m/
s/at$/ate/ or s/bl$/ble/ or s/iz$/ize/ or s/bb$/b/ or s/dd$/d/ or s/ff$/f/ or s/gg$/g/
s/at$/ate/ or s/bl$/ble/ or s/iz$/ize/ or s/bb$/b/ or s/dd$/d/ or s/ff$/f/
s/at$/ate/ or s/bl$/ble/ or s/iz$/ize/ or s/bb$/b/ or s/dd$/d/
s/at$/ate/ or s/bl$/ble/ or s/iz$/ize/ or s/bb$/b/
s/at$/ate/ or s/bl$/ble/ or s/iz$/ize/
s/at$/ate/ or s/bl$/ble/
MC/DC0%0/19
/[aeiouy][^aeiouy].*eed$/ && s/eed$/ee/ || (s/([aeiou].*)ed$/$1/ || s/([aeiouy].*)ing$/$1/) && (s/at$/ate/ || s/bl$/ble/ || s/iz$/ize/ || s/bb$/b/ || s/dd$/d/ || s/ff$/f/ || s/gg$/g/ || s/mm$/m/ || s/nn$/n/ || s/pp$/p/ || s/rr$/r/ || s/tt$/t/ || s/ww$/w/ || s/xx$/x/ || s/^[^aeiouy]+[aeiouy][^aeiouy]$/$&e/)
too many conditions
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | ( s/([aeiou].*)ed$/$1/ || s/([aeiouy].*)ing$/$1/ ) && | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 27 | ( # step1b1_rules | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 28 | s/at$/ate/ || s/bl$/ble/ || s/iz$/ize/ || s/bb$/b/ || | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 29 | s/dd$/d/ || s/ff$/f/ || s/gg$/g/ || s/mm$/m/ || | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 30 | s/nn$/n/ || s/pp$/p/ || s/rr$/r/ || s/tt$/t/ || | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 31 | s/ww$/w/ || s/xx$/x/ || | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 32 | # This is wordsize==1 && CVC...addanE... | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 33 | s/^[^aeiouy]+[aeiouy][^aeiouy]$/$&e/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 34 | ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 35 | #DEBUG && warn "step1b1: $_\n" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 36 | ; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 37 | # step1c_rules | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 38 | #DEBUG warn "step1c: $_\n" if | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 39 | 674 | s/([aeiouy].*)y$/$1i/; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 40 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 41 | # step2_rules | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 42 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 43 | 674 | ▶ | if ( s/ational$/ate/ || s/tional$/tion/ || s/enci$/ence/ || | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition74%47/63
s/ational$/ate/ or s/tional$/tion/ or s/enci$/ence/ or s/anci$/ance/ or s/izer$/ize/ or s/iser$/ise/ or s/abli$/able/ or s/alli$/al/ or s/entli$/ent/ or s/eli$/e/ or s/ousli$/ous/ or s/ization$/ize/ or s/isation$/ise/ or s/ation$/ate/ or s/ator$/ate/ or s/alism$/al/ or s/iveness$/ive/ or s/fulnes$/ful/ or s/ousness$/ous/ or s/aliti$/al/ or s/iviti$/ive/ or s/biliti$/ble/
s/ational$/ate/ or s/tional$/tion/ or s/enci$/ence/ or s/anci$/ance/ or s/izer$/ize/ or s/iser$/ise/ or s/abli$/able/ or s/alli$/al/ or s/entli$/ent/ or s/eli$/e/ or s/ousli$/ous/ or s/ization$/ize/ or s/isation$/ise/ or s/ation$/ate/ or s/ator$/ate/ or s/alism$/al/ or s/iveness$/ive/ or s/fulnes$/ful/ or s/ousness$/ous/ or s/aliti$/al/ or s/iviti$/ive/
s/ational$/ate/ or s/tional$/tion/ or s/enci$/ence/ or s/anci$/ance/ or s/izer$/ize/ or s/iser$/ise/ or s/abli$/able/ or s/alli$/al/ or s/entli$/ent/ or s/eli$/e/ or s/ousli$/ous/ or s/ization$/ize/ or s/isation$/ise/ or s/ation$/ate/ or s/ator$/ate/ or s/alism$/al/ or s/iveness$/ive/ or s/fulnes$/ful/ or s/ousness$/ous/ or s/aliti$/al/
s/ational$/ate/ or s/tional$/tion/ or s/enci$/ence/ or s/anci$/ance/ or s/izer$/ize/ or s/iser$/ise/ or s/abli$/able/ or s/alli$/al/ or s/entli$/ent/ or s/eli$/e/ or s/ousli$/ous/ or s/ization$/ize/ or s/isation$/ise/ or s/ation$/ate/ or s/ator$/ate/ or s/alism$/al/ or s/iveness$/ive/ or s/fulnes$/ful/ or s/ousness$/ous/
s/ational$/ate/ or s/tional$/tion/ or s/enci$/ence/ or s/anci$/ance/ or s/izer$/ize/ or s/iser$/ise/ or s/abli$/able/ or s/alli$/al/ or s/entli$/ent/ or s/eli$/e/ or s/ousli$/ous/ or s/ization$/ize/ or s/isation$/ise/ or s/ation$/ate/ or s/ator$/ate/ or s/alism$/al/ or s/iveness$/ive/ or s/fulnes$/ful/
s/ational$/ate/ or s/tional$/tion/ or s/enci$/ence/ or s/anci$/ance/ or s/izer$/ize/ or s/iser$/ise/ or s/abli$/able/ or s/alli$/al/ or s/entli$/ent/ or s/eli$/e/ or s/ousli$/ous/ or s/ization$/ize/ or s/isation$/ise/ or s/ation$/ate/ or s/ator$/ate/ or s/alism$/al/ or s/iveness$/ive/
s/ational$/ate/ or s/tional$/tion/ or s/enci$/ence/ or s/anci$/ance/ or s/izer$/ize/ or s/iser$/ise/ or s/abli$/able/ or s/alli$/al/ or s/entli$/ent/ or s/eli$/e/ or s/ousli$/ous/ or s/ization$/ize/ or s/isation$/ise/ or s/ation$/ate/ or s/ator$/ate/ or s/alism$/al/
s/ational$/ate/ or s/tional$/tion/ or s/enci$/ence/ or s/anci$/ance/ or s/izer$/ize/ or s/iser$/ise/ or s/abli$/able/ or s/alli$/al/ or s/entli$/ent/ or s/eli$/e/ or s/ousli$/ous/ or s/ization$/ize/ or s/isation$/ise/ or s/ation$/ate/ or s/ator$/ate/
s/ational$/ate/ or s/tional$/tion/ or s/enci$/ence/ or s/anci$/ance/ or s/izer$/ize/ or s/iser$/ise/ or s/abli$/able/ or s/alli$/al/ or s/entli$/ent/ or s/eli$/e/ or s/ousli$/ous/ or s/ization$/ize/ or s/isation$/ise/ or s/ation$/ate/
s/ational$/ate/ or s/tional$/tion/ or s/enci$/ence/ or s/anci$/ance/ or s/izer$/ize/ or s/iser$/ise/ or s/abli$/able/ or s/alli$/al/ or s/entli$/ent/ or s/eli$/e/ or s/ousli$/ous/ or s/ization$/ize/ or s/isation$/ise/
s/ational$/ate/ or s/tional$/tion/ or s/enci$/ence/ or s/anci$/ance/ or s/izer$/ize/ or s/iser$/ise/ or s/abli$/able/ or s/alli$/al/ or s/entli$/ent/ or s/eli$/e/ or s/ousli$/ous/ or s/ization$/ize/
s/ational$/ate/ or s/tional$/tion/ or s/enci$/ence/ or s/anci$/ance/ or s/izer$/ize/ or s/iser$/ise/ or s/abli$/able/ or s/alli$/al/ or s/entli$/ent/ or s/eli$/e/ or s/ousli$/ous/
s/ational$/ate/ or s/tional$/tion/ or s/enci$/ence/ or s/anci$/ance/ or s/izer$/ize/ or s/iser$/ise/ or s/abli$/able/ or s/alli$/al/ or s/entli$/ent/ or s/eli$/e/
s/ational$/ate/ or s/tional$/tion/ or s/enci$/ence/ or s/anci$/ance/ or s/izer$/ize/ or s/iser$/ise/ or s/abli$/able/ or s/alli$/al/ or s/entli$/ent/
s/ational$/ate/ or s/tional$/tion/ or s/enci$/ence/ or s/anci$/ance/ or s/izer$/ize/ or s/iser$/ise/ or s/abli$/able/ or s/alli$/al/
s/ational$/ate/ or s/tional$/tion/ or s/enci$/ence/ or s/anci$/ance/ or s/izer$/ize/ or s/iser$/ise/ or s/abli$/able/
s/ational$/ate/ or s/tional$/tion/ or s/enci$/ence/ or s/anci$/ance/ or s/izer$/ize/ or s/iser$/ise/
s/ational$/ate/ or s/tional$/tion/ or s/enci$/ence/ or s/anci$/ance/ or s/izer$/ize/
s/ational$/ate/ or s/tional$/tion/ or s/enci$/ence/ or s/anci$/ance/
s/ational$/ate/ or s/tional$/tion/ or s/enci$/ence/
s/ational$/ate/ or s/tional$/tion/
MC/DC0%0/22
s/ational$/ate/ or s/tional$/tion/ or s/enci$/ence/ or s/anci$/ance/ or s/izer$/ize/ or s/iser$/ise/ or s/abli$/able/ or s/alli$/al/ or s/entli$/ent/ or s/eli$/e/ or s/ousli$/ous/ or s/ization$/ize/ or s/isation$/ise/ or s/ation$/ate/ or s/ator$/ate/ or s/alism$/al/ or s/iveness$/ive/ or s/fulnes$/ful/ or s/ousness$/ous/ or s/aliti$/al/ or s/iviti$/ive/ or s/biliti$/ble/
too many conditions
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 44 | s/anci$/ance/ || s/izer$/ize/ || s/iser$/ise/ || | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 45 | s/abli$/able/ || s/alli$/al/ || s/entli$/ent/ || | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 46 | s/eli$/e/ || s/ousli$/ous/ || s/ization$/ize/ || | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 47 | s/isation$/ise/ || s/ation$/ate/ || s/ator$/ate/ || | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 48 | s/alism$/al/ || s/iveness$/ive/ || s/fulnes$/ful/ || | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 49 | s/ousness$/ous/ || s/aliti$/al/ || s/iviti$/ive/ || | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 50 | s/biliti$/ble/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 51 | ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 52 | 11 | my ($l,$m) = ($`,$&); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 53 | #DEBUG warn "step 2: l=$l m=$m\n"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 54 | 11 | ▶ | $_ = $l.$m unless $l =~ /[^aeiou][aeiouy]/; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 55 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 56 | # step3_rules | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 57 | 674 | ▶ | if ( s/icate$/ic/ || s/ative$// || s/alize$/al/ || | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%6/18
s/icate$/ic/ or s/ative$// or s/alize$/al/ or s/iciti$/ic/ or s/ical$/ic/ or s/ful$// or s/ness$//
s/icate$/ic/ or s/ative$// or s/alize$/al/ or s/iciti$/ic/ or s/ical$/ic/ or s/ful$//
s/icate$/ic/ or s/ative$// or s/alize$/al/ or s/iciti$/ic/ or s/ical$/ic/
s/icate$/ic/ or s/ative$// or s/alize$/al/ or s/iciti$/ic/
s/icate$/ic/ or s/ative$// or s/alize$/al/
s/icate$/ic/ or s/ative$//
MC/DC0%0/7
s/icate$/ic/ or s/ative$// or s/alize$/al/ or s/iciti$/ic/ or s/ical$/ic/ or s/ful$// or s/ness$//
s/icate$/ic/
s/ative$//
s/alize$/al/
s/iciti$/ic/
s/ical$/ic/
s/ful$//
s/ness$//
Truth table12%1/8
A or B or C or D or E or F or G
A= s/icate$/ic/B= s/ative$//C= s/alize$/al/D= s/iciti$/ic/E= s/ical$/ic/F= s/ful$//G= s/ness$//
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 58 | s/iciti$/ic/ || s/ical$/ic/ || s/ful$// || | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 59 | s/ness$// | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 60 | ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 61 | 0 | my ($l,$m) = ($`,$&); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 62 | #DEBUG warn "step 3: l=$l m=$m\n"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 63 | 0 | ▶ | $_ = $l.$m unless $l =~ /[^aeiou][aeiouy]/; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 64 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 65 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 66 | # step4_rules | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 67 | 674 | ▶ | if ( s/al$// || s/ance$// || s/ence$// || s/er$// || | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition86%52/60
s/al$// or s/ance$// or s/ence$// or s/er$// or s/ic$// or s/able$// or s/ible$// or s/ant$// or s/ement$// or s/ment$// or s/ent$// or s/sion$/s/ or s/tion$/t/ or s/ou$// or s/ism$// or s/ate$// or s/iti$// or s/ous$// or s/ive$// or s/ize$// or s/ise$//
s/al$// or s/ance$// or s/ence$// or s/er$// or s/ic$// or s/able$// or s/ible$// or s/ant$// or s/ement$// or s/ment$// or s/ent$// or s/sion$/s/ or s/tion$/t/ or s/ou$// or s/ism$// or s/ate$// or s/iti$// or s/ous$// or s/ive$// or s/ize$//
s/al$// or s/ance$// or s/ence$// or s/er$// or s/ic$// or s/able$// or s/ible$// or s/ant$// or s/ement$// or s/ment$// or s/ent$// or s/sion$/s/ or s/tion$/t/ or s/ou$// or s/ism$// or s/ate$// or s/iti$// or s/ous$// or s/ive$//
s/al$// or s/ance$// or s/ence$// or s/er$// or s/ic$// or s/able$// or s/ible$// or s/ant$// or s/ement$// or s/ment$// or s/ent$// or s/sion$/s/ or s/tion$/t/ or s/ou$// or s/ism$// or s/ate$// or s/iti$// or s/ous$//
s/al$// or s/ance$// or s/ence$// or s/er$// or s/ic$// or s/able$// or s/ible$// or s/ant$// or s/ement$// or s/ment$// or s/ent$// or s/sion$/s/ or s/tion$/t/ or s/ou$// or s/ism$// or s/ate$// or s/iti$//
s/al$// or s/ance$// or s/ence$// or s/er$// or s/ic$// or s/able$// or s/ible$// or s/ant$// or s/ement$// or s/ment$// or s/ent$// or s/sion$/s/ or s/tion$/t/ or s/ou$// or s/ism$// or s/ate$//
s/al$// or s/ance$// or s/ence$// or s/er$// or s/ic$// or s/able$// or s/ible$// or s/ant$// or s/ement$// or s/ment$// or s/ent$// or s/sion$/s/ or s/tion$/t/ or s/ou$// or s/ism$//
s/al$// or s/ance$// or s/ence$// or s/er$// or s/ic$// or s/able$// or s/ible$// or s/ant$// or s/ement$// or s/ment$// or s/ent$// or s/sion$/s/ or s/tion$/t/ or s/ou$//
s/al$// or s/ance$// or s/ence$// or s/er$// or s/ic$// or s/able$// or s/ible$// or s/ant$// or s/ement$// or s/ment$// or s/ent$// or s/sion$/s/ or s/tion$/t/
s/al$// or s/ance$// or s/ence$// or s/er$// or s/ic$// or s/able$// or s/ible$// or s/ant$// or s/ement$// or s/ment$// or s/ent$// or s/sion$/s/
s/al$// or s/ance$// or s/ence$// or s/er$// or s/ic$// or s/able$// or s/ible$// or s/ant$// or s/ement$// or s/ment$// or s/ent$//
s/al$// or s/ance$// or s/ence$// or s/er$// or s/ic$// or s/able$// or s/ible$// or s/ant$// or s/ement$// or s/ment$//
s/al$// or s/ance$// or s/ence$// or s/er$// or s/ic$// or s/able$// or s/ible$// or s/ant$// or s/ement$//
s/al$// or s/ance$// or s/ence$// or s/er$// or s/ic$// or s/able$// or s/ible$// or s/ant$//
s/al$// or s/ance$// or s/ence$// or s/er$// or s/ic$// or s/able$// or s/ible$//
s/al$// or s/ance$// or s/ence$// or s/er$// or s/ic$// or s/able$//
s/al$// or s/ance$// or s/ence$// or s/er$// or s/ic$//
s/al$// or s/ance$// or s/ence$// or s/er$//
s/al$// or s/ance$// or s/ence$//
s/al$// or s/ance$//
MC/DC0%0/21
s/al$// or s/ance$// or s/ence$// or s/er$// or s/ic$// or s/able$// or s/ible$// or s/ant$// or s/ement$// or s/ment$// or s/ent$// or s/sion$/s/ or s/tion$/t/ or s/ou$// or s/ism$// or s/ate$// or s/iti$// or s/ous$// or s/ive$// or s/ize$// or s/ise$//
too many conditions
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 68 | s/ic$// || s/able$// || s/ible$// || s/ant$// || | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 69 | s/ement$// || s/ment$// || s/ent$// || s/sion$/s/ || | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 70 | s/tion$/t/ || s/ou$// || s/ism$// || s/ate$// || | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 71 | s/iti$// || s/ous$// || s/ive$// || s/ize$// || | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 72 | s/ise$// | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 73 | ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 74 | 105 | my ($l,$m) = ($`,$&); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 75 | # Look for two consonant/vowel transitions | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 76 | # NB simplified... | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 77 | #DEBUG warn "step 4: l=$l m=$m\n"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 78 | 105 | ▶ | $_ = $l.$m unless $l =~ /[^aeiou][aeiouy].*[^aeiou][aeiouy]/; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 79 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 80 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 81 | # step5a_rules | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 82 | #DEBUG warn("step 5a: $_\n") && | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 83 | 674 | ▶ | s/e$// if ( /[^aeiou][aeiouy].*[^aeiou][aeiouy].*e$/ || | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%6/6
/[^aeiou][aeiouy].*[^aeiou][aeiouy].*e$/ or /[aeiou][^aeiouy].*e/ and not /[^aeiou][aeiouy][^aeiouwxy]e$/
/[aeiou][^aeiouy].*e/ and not /[^aeiou][aeiouy][^aeiouwxy]e$/
MC/DC100%3/3
/[^aeiou][aeiouy].*[^aeiou][aeiouy].*e$/ or /[aeiou][^aeiouy].*e/ and not /[^aeiou][aeiouy][^aeiouwxy]e$/
/[^aeiou][aeiouy].*[^aeiou][aeiouy].*e$/
/[aeiou][^aeiouy].*e/
not /[^aeiou][aeiouy][^aeiouwxy]e$/
Truth table100%4/4
A or B and not(C)
A= /[^aeiou][aeiouy].*[^aeiou][aeiouy].*e$/B= /[aeiou][^aeiouy].*e/C= not /[^aeiou][aeiouy][^aeiouwxy]e$/
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 84 | ( /[aeiou][^aeiouy].*e/ && ! /[^aeiou][aeiouy][^aeiouwxy]e$/) ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 85 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 86 | # step5b_rules | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 87 | #DEBUG warn("step 5b: $_\n") && | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 88 | 674 | ▶ | s/ll$/l/ if /[^aeiou][aeiouy].*[^aeiou][aeiouy].*ll$/; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 89 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 90 | # Cosmetic step | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 91 | 674 | s/(.)i$/$1y/; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 92 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 93 | 680 | @parms; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 94 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 95 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 96 | 2 | 1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 97 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 98 | __END__ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||