package pen;
import tool.*;
public class pro {
int s,datanumber,number;
String[] data=new String[5000];
String[] name=new String[5000];
int[][] code=new int[5000][50];
int[] number_code=new int[5000];
String urlx;
public static void main(String[] args) {
pro y=new pro();
}
pro(){
urlx="http://www.akb48.co.jp/about/members/";
getdata sub=new getdata();
sub.makedata(urlx,"UTF-8");
data=sub.data;
datanumber=sub.datanumber;
int sx;
sx=0;
for(s=1;s<datanumber+1;s++){
if(data[s].indexOf("memberListNamej")>-1)sx=sx+1;
if(data[s].indexOf("memberListNamej")>-1)name[sx]=data[s];
}
number=sx;
int p1,p2;
sx=0;
for(s=1;s<number+1;s++){
p1=name[s].indexOf(">");
p2=name[s].indexOf("<",p1);
name[s]=name[s].substring(p1+1,p2);
name[s]=name[s].replace(" ","");
}
int dicnumber,tx;
String[] dic=new String[5000];
dicnumber=0;
int h;
for(s=1;s<number+1;s++){
for(sx=0;sx<name[s].length();sx++){
String str=name[s].substring(sx,sx+1);
h=0;
for(tx=1;tx<dicnumber+1;tx++){
if(str.equals(dic[tx]))h=100;
}
if(h<50)dicnumber=dicnumber+1;
if(h<50)dic[dicnumber]=str;
}
}
for(s=1;s<number+1;s++){
number_code[s]=name[s].length();
for(sx=0;sx<name[s].length();sx++){
String str=name[s].substring(sx,sx+1);
for(tx=1;tx<dicnumber+1;tx++){
if(str.equals(dic[tx]))code[s][sx+1]=tx;
}
}
}
int s1=10;
int t1=2;
int c1=code[s1][t1];
System.out.println(name[s1]);
int k1,k2;
k1=0;
k2=0;
for(s=1;s<number+1;s++){
for(sx=1;sx<number_code[s]+1;sx++){
if(c1==code[s][sx])k1=s;
if(c1==code[s][sx])k2=sx;
}
}
System.out.println(name[k1]);
}
}
最終更新:2015年05月22日 06:44