open(fp,"enwik9_clean");
$count=0;
open(fp2,">./data/enwik9.clean.train") || die("write to file train err");
open(fp3,">./data/enwik9.clean.dev");
open(fp4,">./data/enwik9.clean.test");
while($tmp=readline(fp))
{
	#chomp($tmp);
	$count=$count+1;
	if($count<=9525977) # train set sentence num
	{
		print fp2 $tmp;
	}
	elsif($count<=9525977+529220)
	{
		print fp3 $tmp;
	}
	else
	{
		print fp4 $tmp;
	}
}
close(fp);
close(fp2);
close(fp3);
close(fp4);