#!/usr/local/bin/perl

## Enter a short description of the script

use strict;
use warnings;

my $inDir = shift;
my $outDir = shift;

opendir(LDIR,$inDir) or die('Failed to open the urdu Dir !\n');
my $count = 0;
while(defined(my $file = readdir(LDIR))){
# 	print $file,"\n";
	next unless($file =~ /\.pos$/);
	$file =~ /(.*)\.pos$/;
	my $fileName = $1;
	$count++;
	print $count,"\n" if($count % 1000 == 0);
# 	next unless (-e "/usr4/abhayaa/urdu/pos-tagged/$fileName.tagged");
	print $fileName,"\n";
	`./ltf2pos.py $inDir/$file > $outDir/$1.pos`;
# 	`mv /tmp/pos-in/$file /tmp/pos-done/`
}
