package delta;
import tool.*;
import java.io.File;
public class pro {
int s,datanumber;
String[] data=new String[5000];
String[] date=new String[5000];
String[] race=new String[5000];
String[] rank=new String[5000];
String[] uma=new String[5000];
String[] jok=new String[5000];
String[] time=new String[5000];
String[] rate=new String[5000];
String[] pop=new String[5000];
String[] code_race=new String[5000];
String[] code_date=new String[5000];
String[] subdata=new String[500000];
public static void main(String[] args) {
pro te=new pro();
}
pro(){
int yy;
for(yy=2004;yy<2016;yy++){
File f=new File(""+yy);
String[] ff=f.list();
int m=ff.length;
int n=0;
int tr=7;
int sx=0;
for(tr=0;tr<m;tr++){
readfile sub=new readfile();
sub.makedata(yy+"/"+tr+".txt","UTF-8");
data=sub.data;
datanumber=sub.datanumber;
for(s=1;s<datanumber+1;s++){
String[] x=data[s].split(",");
date[s]="";
race[s]="";
rank[s]="";
uma[s]="";
jok[s]="";
time[s]="";
pop[s]="";
rate[s]="";
if(x.length>12){
date[s]=x[0];
race[s]=x[1];
rank[s]=x[2];
uma[s]=x[4];
jok[s]=x[6];
time[s]=x[7];
pop[s]=x[11];
rate[s]=x[12];
}
}
race[0]="";
for(s=1;s<datanumber+1;s++){
if(date[s].length()>0){
int h=0;
if(race[s].equals(race[s-1]))h=100;
if(h<50)n=n+1;
sx=sx+1;
code_race[s]="r"+n;
code_date[s]="d"+(tr+1);
subdata[sx]=code_date[s]+","+code_race[s]+","+date[s]+","+race[s];
subdata[sx]=subdata[sx]+","+rank[s]+","+uma[s]+","+jok[s]+","+time[s]+","+pop[s]+","+rate[s];
}
}
}
datanumber=sx;
writefile sub5=new writefile();
sub5.data=subdata;
sub5.datanumber=datanumber;
sub5.makedata(yy+".csv");
}
}
}
最終更新:2016年07月20日 15:44