#!/usr/bin/perl -s

use strict;
use warnings;

use POSIX qw(locale_h);
setlocale(&POSIX::LC_ALL, "pt_PT");
use locale;


use Lingua::PT::PLNbase;

our ($h, $help, $nat, $tokenize, $o);

if ($h || $help) {
  print_usage();
  exit;
}

my $opt = {};

$opt->{o_format} = 'NATools' if $nat;
if ($tokenize) {
    if ($tokenize eq "cqp") {
        $opt->{tokenize} = 'cqp';
    } else {
        $opt->{tokenize} = 1;
    }
}
$opt->{output} = $o if $o;

fsentences($opt,@ARGV);



sub print_usage {
  print "sentences -h/-help   -- This help screen\n";
  print "sentences [-tokenize[=cqp]] [-nat] file...\n";
  print "\t-tokenize: tokenize sentences\n";
  print "\t-nat: output format suitable for NATools\n";
  print "\t-o=<file>: output to a specific file\n";
}
