アットウィキロゴ

データb

package c1;
 
import tool.*;
 
public class pro {
 
    int s,datanumber;
    String[] data=new String[5000];
     String[] name=new String[5000];
      String[] code=new String[5000];
     String[] city=new String[5000];
     int[] pp=new int[5000];
     int[] pref=new int[5000];
     String[] delta=new String[5000];
     double[] point=new double[5000];
 
     public static void main(String[] args) {
       pro test=new pro();
    }
 
    pro(){
 
 
         readfile sub3=new readfile();
        sub3.makedata("city.csv","UTF-8");
        data=sub3.data;
        datanumber=sub3.datanumber;
 
        for(s=1;s<datanumber+1;s++){
        String[] x=data[s].split(",");
        code[s]=x[1];
        name[s]=x[0];
        if(code[s].length()==4)code[s]="0"+code[s];    
        }
 
 
        for(s=2;s<datanumber+1;s++){
        String str="8"+code[s].substring(0,2);    
        int n=Integer.parseInt(str)-800;
        pp[s]=n;
        }
 
        int number=datanumber;
        int tr;
        for(tr=1;tr<296;tr++){
 
        readfile sub=new readfile();
        sub.makedata("gdata/"+tr+".txt","UTF-8");
        data=sub.data;
        datanumber=sub.datanumber;
 
        for(s=1;s<datanumber+1;s++){
        catchword sub2=new catchword();
        String str=sub2.makedata(data[s],"pref");
        pref[s]=Integer.parseInt(str);
        city[s]=sub2.makedata(data[s],"city");  
        str=sub2.makedata(data[s],"value");
        point[s]=Double.parseDouble(str);
        }
 
        int sx;
        for(s=1;s<datanumber+1;s++){
          delta[s]="";
         for(sx=1;sx<number+1;sx++){   
         int h=0;
         if(pref[s]==pp[sx])h=h+1;
         if(city[s].indexOf(name[sx])>-1)h=h+1;
         if(h==2)delta[s]=code[sx];
        } 
        }
 
 
        for(s=1;s<datanumber+1;s++){
        data[s]=data[s]+"<code>"+delta[s]+"</code>";   
        }
 
 
        writefile sub7=new writefile();
        sub7.data=data;
        sub7.datanumber=datanumber;
        sub7.makedata("data/"+tr+".txt");
 
 
 
        }
 
 
    }
 
 
 
}
 
最終更新:2016年04月18日 16:17