for(int i=0;i<taggedstr.length;i++){
String[] words = taggedstr[i][0];
String[] pos = taggedstr[i][1];
PartOfSpeech strtag = null;
PartOfSpeech[] epos = PartOfSpeech.valueOf(pos);
for(int j=0;j<words.length;j++){
index++;
subDistance = 0;
String headword = null;
if(epos[j]==PartOfSpeech.标点&&((words[j].equals(","))
||(words[j].equals(":")))){
subDistance++;
}
if(isPart(epos[j],words[j])){
int id = j;
strdata = words[j];
strtag = epos[j];
headword = words[j];
flag = 0;
ey = new Entity();
ey.start = index;
Singular isSing = Singular.UNKONW;
while(j<words.length-1){
boolean isModify = !(isNN(epos[j])&&words[j+1].equals("的"));
if(isModify&&isPart(epos[j+1],words[j+1])){
if(epos[j]==PartOfSpeech.数词 &&(words[j].equals("一")||
words[j].equals("半")||words[j].equals("1")))
isSing = Singular.Yes;
else if (epos[j]==PartOfSpeech.数词 &&!(words[j].equals("一")
||words[j].equals("半")||words[j].equals("1"))){
isSing = Singular.No;
}
strdata+= words[j+1];
strtag = epos[j+1];
headword = words[j+1];
j++;
flag++;
}
else
break;
}
if(strtag.isPronoun()||strdata.contains("这")||
strdata.contains("那")||strdata.contains("该")){
ey.setIsResolution(true);
}
else
ey.setIsResolution(false);