NAME

Text::Difference - Compare two strings and find which tokens are actually different, with optional stopwords.

VERSION

Version 0.02

SYNOPSIS

Compare two strings to check what tokens (words) are actually different, if any.

use Text::Difference;

my $diff = Text::Difference->new(
    a => 'big blue car',
    b => 'yellow car in small',
    stopwords => [ 'in' ],
    tokens => {
        colour => [ 'blue', 'yellow' ],
        size   => [ 'big', 'small' ],
    }
    debug => 0,
);

$diff->check;

$diff->match;   # true

$diff->a_tokens_remaining;   # a hashref

$diff->a_tokens_matched;     # a hashref

DESCRIPTION

METHODS

Instance Methods

check

$diff->check