=encoding UTF-8

=head1 NAME

Lingua::JA::Gairaigo::Fuzzy - variant spellings of foreign words in Japanese


    use utf8;
    use Lingua::JA::Gairaigo::Fuzzy 'same_gairaigo';
    my $x = 'メインフレーム';
    my $y = 'メーンフレーム';
    if (same_gairaigo ($x, $y)) {
        print "$x and $y may be the same word.\n";

produces output

    メインフレーム and メーンフレーム may be the same word.

(This example is included as L<F<synopsis.pl>|https://fastapi.metacpan.org/source/BKB/Lingua-JA-Gairaigo-Fuzzy-0.08/examples/synopsis.pl> in the distribution.)


Given two Japanese gairaigo words (katakana words), guess whether they
are the same word. Japanese language is somewhat inconsistent in how
it writes foreign loan words. For example "motor" can be モーター or
モータ from the English "motor", or モートル from Dutch "motor". This
module attempts to guess whether two loanwords refer to the same


=head2 same_gairaigo

    my $same = same_gairaigo ('メイン', 'メーン');

This guesses whether the two words are the same. It catches things
like addition and removal of "ー", "・", "ッ", mixing of elements such
as "ティ", "テー", "テイ", and "テ", or combinations like "コウ" and 
"コー".  If the two words appear to be the same, it returns a true
value. If the two words appear not to be the same, it returns a false

As of 0.08, the exact checks this makes are not
documented, so please view the source code to find out the details.



=item Lingua::JA::Moji

L<Lingua::JA::Moji/kana2romaji> is used to compute whether a
particular word ends in one vowel or another.

=item Text::Fuzzy

L<Text::Fuzzy> is used to compare the two katakana words to see what
similarities there may be between them.


=head1 HISTORY

This module started as a script to help with the checking of duplicate
entries for the online Japanese dictionaries by Jim Breen, see

Because this module is intended to deal with natural language, it does
not guarantee to find a correct answer. Bug reports containing test
cases are very much appreciated.

=head1 AUTHOR

Ben Bullock, <bkb@cpan.org>


This package and associated files are copyright (C) 
Ben Bullock.

You can use, copy, modify and redistribute this package and associated
files under the Perl Artistic Licence or the GNU General Public