アットウィキロゴ

SVMSVM10

import java.io.*;

class pro{

int datanumber,authornumber;
String[] data=new String[50000];
String[] credit=new String[500];
String[][] word=new String[500][20000];
String[][] pword=new String[500][20000];
int[] wordnumber=new int[5000];
int[] pwordnumber=new int[5000];
int n,year,n1,no,t,s,sx;
String file;
int s1,s2;
int tx,h;

public static void main(String args[]){
pro test=new pro();
}

pro(){

tx=0;
t=0;
for(year=13;year<20;year++){
n1=makenum(year);
for(n=1;n<n1+1;n++){

no=100*year+n;

file="credit/";
file=file+no;
file=file+".txt";

readfile(file);
t=t+1;
for(s=1;s<datanumber+1;s++){
String[] x=data[s].split(",");
credit[s]=x[1];
}

authornumber=datanumber;

file="gdata/";
file=file+no;
file=file+".txt";

readfile(file);

for(s=1;s<datanumber+1;s++){
String[] y=data[s].split(",");
if(y.length>2)s1=Integer.parseInt(y[0]);
if(y.length>2)s2=Integer.parseInt(y[1]);
if(y.length>2)wordnumber[s1]=s2;
if(y.length>2)word[s1][s2]=y[2];
}



for(s=1;s<authornumber+1;s++){
h=0;
if(credit[s].equals("額賀議員"))h=100;
t=0;
if(h>50)t=wordnumber[s];
if(h>50)tx=tx+1;
if(h>50)pwordnumber[tx]=t;
for(sx=1;sx<t+1;sx++){
pword[tx][sx]=word[s][sx];
}
}

}
}



for(s=1;s<tx+1;s++){
t=pwordnumber[s];
for(sx=1;sx<t+1;sx++){
System.out.println(word[s][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月05日 20:11