アットウィキロゴ

AOB++

import java.io.*;

public class pro{

int s,sx,datanumber,articlenumber;
String[] data=new String[50000];
String[][] word=new String[5000][5000];
int[] wordnumber=new int[5000];
int[] ch=new int[5000];
int xlong,h;

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

pro(){        

readfile("data/3.txt");

articlenumber=datanumber;

for(s=1;s<datanumber+1;s++){
String[] x=data[s].split(",");
xlong=x.length;
wordnumber[s]=xlong;
for(sx=1;sx<xlong+1;sx++){
word[s][sx]=x[sx-1];
}
}



for(s=1;s<datanumber+1;s++){
xlong=wordnumber[s];
h=0;
for(sx=1;sx<xlong+1;sx++){
if(word[s][sx].indexOf("税")>-1)h=100;
}
if(h>50)ch[s]=100;
}


for(s=1;s<articlenumber+1;s++){
if(ch[s]>50)System.out.println(s);
}



}


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月12日 21:22