Skip to content

Commit

Permalink
Supporting semi-vowel i in the beginning of the word.
Browse files Browse the repository at this point in the history
  • Loading branch information
amire80 committed Jan 23, 2011
1 parent ef3bfe9 commit d5dc92a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
8 changes: 5 additions & 3 deletions lib/Lingua/IT/Ita2heb.pm
Expand Up @@ -175,8 +175,9 @@ sub ita_to_heb { ## no critic (Subroutines::ProhibitExcessComplexity)
$ita_letter ~~ @ALL_LATIN_VOWELS
and ($seq->at_start or $seq->wrote_vowel)
and not ( $ita_letter ~~ @TYPES_OF_I
and $seq->match_before([\@ALL_LATIN_VOWELS])
and $seq->match_after([\@ALL_LATIN_VOWELS]))
and $seq->match_after([\@ALL_LATIN_VOWELS])
and ( $seq->match_before([\@ALL_LATIN_VOWELS])
or $seq->at_start))
)
{
$heb .= $ALEF;
Expand Down Expand Up @@ -284,7 +285,8 @@ sub ita_to_heb { ## no critic (Subroutines::ProhibitExcessComplexity)
}
elsif ($seq->match_after([\@ALL_LATIN_VOWELS]))
{
if ($seq->match_before([\@ALL_LATIN_VOWELS])) {
if ( $seq->at_start
or $seq->match_before([\@ALL_LATIN_VOWELS])) {
$hebrew_to_add .= $YOD;
}
else {
Expand Down
17 changes: 16 additions & 1 deletion t/08-i.t
Expand Up @@ -4,7 +4,7 @@ use 5.010;
use strict;
use warnings;

use Test::More tests => 2;
use Test::More tests => 3;
use charnames ':full';

use lib './t/lib';
Expand Down Expand Up @@ -45,3 +45,18 @@ check_ita_tr(
. "\N{HEBREW LETTER HE}",
'Gioiosa',
);

# TEST
check_ita_tr(
['Ionica'],
"\N{HEBREW LETTER YOD}"
. "\N{HEBREW LETTER VAV}"
. "\N{HEBREW POINT HOLAM}"
. "\N{HEBREW LETTER NUN}"
. "\N{HEBREW POINT HIRIQ}"
. "\N{HEBREW LETTER YOD}"
. "\N{HEBREW LETTER QOF}"
. "\N{HEBREW POINT QAMATS}"
. "\N{HEBREW LETTER HE}",
'Ionica',
);

0 comments on commit d5dc92a

Please sign in to comment.