use strict;
use Lingua::EN::Tagger;
use Data::Dumper;


my $tagger = new Lingua::EN::Tagger;
open (FILE,"< file");
my $text = "";
while (<FILE>){
	$text = $text." ".$_;
}
close(FILE);
$text =~ s/''/"/ig;
$text =~ s/``/"/ig;
my $sentences = $tagger->get_sentences($text);
foreach my $sentence (@$sentences){
	print "----------\n";
	print "ORIGINAL:".$sentence."\n";
	my @temp = $sentence =~ /[\.]?(.*?\s\w{2,}[`'\)\s"]*)\.([\w{1,}]?)/imsgx;
	my $i;
	print "---------\n";
	#print Dumper(@temp);
	#exit;
	for ($i =0;$i<scalar(@temp);){
		if ($i > 1){
			print $temp[$i-1].$temp[$i]."\n";
		}
		else{
			print $temp[$i]."\n";
		}
		$i+=2;
	}
	print $temp[scalar(@temp)-1]."\n";
}
