KSx-Analysis-StripAccents

 view release on metacpan or  search on metacpan

t/test.t  view on Meta::CPAN

    Test::More::is_deeply( \@got, $expected, "analyze_raw: $message" );

    $batch = $analyzer->analyze_field( { content => $source }, 'content' );
    @got = ();
    while ( my $token = $batch->next ) {
        push @got, $token->get_text;
    }
    Test::More::is_deeply( \@got, $expected, "analyze_field: $message" );
}

# Verify an Analyzer's transform, transform_text, and split methods.
sub test_analyzer {
    my ( $analyzer, $source, $expected, $message ) = @_;

    my $inversion = KinoSearch::Analysis::Inversion->new( text => $source );
    $inversion = $analyzer->transform($inversion);
    my @got;
    while ( my $token = $inversion->next ) {
        push @got, $token->get_text;
    }
    Test::More::is_deeply( \@got, $expected, "analyze: $message" );



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