import java.io.*;
class ren{
int datanumber,authornumber;
String[] data=new String[50000];
String[] word=new String[50000];
String[] p=new String[50000];
int[] wordnumber=new int[500];
String str,file;
int strlong,s,sx;
int t,h,n,n1,year,no;
public static void main(String args[]){
ren test=new ren();
}
ren(){
t=0;
for(year=13;year<20;year++){
n1=makenum(year);
for(n=1;n<n1+1;n++){
no=100*year+n;
file="gdata/";
file=file+no;
file=file+".txt";
System.out.println(file);
readfile(file);
sx=0;
for(s=1;s<datanumber+1;s++){
str=data[s];
String[] x=str.split(" ");
strlong=x.length;
h=0;
if(strlong>2)h=h+1;
if(x[0].equals("@"))h=0;
if(h==1)sx=sx+1;
if(h==1)word[sx]=x[0];
if(h==1)p[sx]=x[3];
}
t=t+1;
wordnumber[t]=sx;
}
}
}
int makenum(int year){
int mk;
mk=35;
if(year==13)mk=35;
if(year==14)mk=42;
if(year==15)mk=30;
if(year==16)mk=35;
if(year==17)mk=31;
if(year==18)mk=31;
if(year==19)mk=10;
return mk;
}
void readfile(String file){
String str;
BufferedReader br;
int s;
s=0;
try {
br = new BufferedReader(new InputStreamReader(new FileInputStream(file),"SJIS"));
while((str = br.readLine()) != null) {
s=s+1;
data[s]=str;
}
br.close();
} catch (IOException e) {System.out.println(e);}
datanumber=s;
}
}
最終更新:2011年06月07日 15:13