Lingua-EN-Phoneme

 view release on metacpan or  search on metacpan

t/basic.t  view on Meta::CPAN


my @tests;
while (<DATA>) {
      chomp;
      push @tests, $_;
}

plan tests => scalar(@tests) * 2;

for (@tests) {
    my ($latin, @pronunciation) = split m!\.!;
    my $s = $lep->phoneme($latin) || 'NOT IN DICTIONARY';
    my @a = $lep->phoneme($latin);

    is_deeply (\@a, \@pronunciation, "$latin array");
    is ($s, join(' ', @pronunciation), "$latin scalar");
}
__DATA__
the.DH.AH0
quick.K.W.IH1.K
brown.B.R.AW1.N



( run in 1.563 second using v1.01-cache-2.11-cpan-71847e10f99 )