#!/usr/bin/perl

use Search::OpenFTS::Parser;

my $parser = Search::OpenFTS::Parser->new();

my $txt = 'Hello world. OpenFTS rules!';

$parser->start_parser( \$txt );

while ( ( ( $type, $word ) = $parser->get_word ) && $type ) {

    print $parser->type_description($type), "\t$word\n";

}

$parser->end_parser;
