case TT_NORMAL:
break;
case TT_PERSON:
if (word.indexOf("����") != -1) {
freq = (double) 1 / (double) (context.getFreq(6) + 1);
sn.addPos(new AdjoiningPos(6, freq));
} else {
freq = (double) 1 / (double) (context.getFreq(0) + 1);
sn.addPos(new AdjoiningPos(0, freq));
if (sn.getLen() >= 4) {
freq = (double) 1 / (double) (context.getFreq(0) + 1);
sn.addPos(new AdjoiningPos(0, freq));
freq = (double) 1 / (double) (context.getFreq(11) * 8);
sn.addPos(new AdjoiningPos(11, freq));
freq = (double) 1 / (double) (context.getFreq(12) * 8);
sn.addPos(new AdjoiningPos(12, freq));
freq = (double) 1 / (double) (context.getFreq(13) * 8);
sn.addPos(new AdjoiningPos(13, freq));
} else if (sn.getLen() == 2) {
freq = (double) 1 / (double) (context.getFreq(0) + 1);
sn.addPos(new AdjoiningPos(0, freq));
charType = Utility.charType(word);
if (charType == Utility.CT_OTHER || charType == Utility.CT_CHINESE) {
freq = (double) 1 / (double) (context.getFreq(1) + 1);
sn.addPos(new AdjoiningPos(1, freq));
freq = (double) 1 / (double) (context.getFreq(2) + 1);
sn.addPos(new AdjoiningPos(2, freq));
freq = (double) 1 / (double) (context.getFreq(3) + 1);
sn.addPos(new AdjoiningPos(3, freq));
freq = (double) 1 / (double) (context.getFreq(4) + 1);
sn.addPos(new AdjoiningPos(4, freq));
}
freq = (double) 1 / (double) (context.getFreq(11) * 8);
sn.addPos(new AdjoiningPos(11, freq));
freq = (double) 1 / (double) (context.getFreq(12) * 8);
sn.addPos(new AdjoiningPos(12, freq));
freq = (double) 1 / (double) (context.getFreq(13) * 8);
sn.addPos(new AdjoiningPos(13, freq));
}
}
break;
case TT_PLACE:
freq = (double) 1 / (double) (context.getFreq(0) + 1);
sn.addPos(new AdjoiningPos(0, freq));
if (sn.getLen() >= 4) {
freq = (double) 1 / (double) (context.getFreq(11) * 8);
sn.addPos(new AdjoiningPos(11, freq));
freq = (double) 1 / (double) (context.getFreq(12) * 8);
sn.addPos(new AdjoiningPos(12, freq));
freq = (double) 1 / (double) (context.getFreq(13) * 8);
sn.addPos(new AdjoiningPos(13, freq));
} else if (sn.getLen() == 2) {
freq = (double) 1 / (double) (context.getFreq(0) + 1);
sn.addPos(new AdjoiningPos(0, freq));
charType = Utility.charType(word);
if (charType == Utility.CT_OTHER || charType == Utility.CT_CHINESE) {
freq = (double) 1 / (double) (context.getFreq(1) + 1);
sn.addPos(new AdjoiningPos(1, freq));
freq = (double) 1 / (double) (context.getFreq(2) + 1);
sn.addPos(new AdjoiningPos(2, freq));
freq = (double) 1 / (double) (context.getFreq(3) + 1);
sn.addPos(new AdjoiningPos(3, freq));
freq = (double) 1 / (double) (context.getFreq(4) + 1);
sn.addPos(new AdjoiningPos(4, freq));
}
freq = (double) 1 / (double) (context.getFreq(11) * 8);
sn.addPos(new AdjoiningPos(11, freq));
freq = (double) 1 / (double) (context.getFreq(12) * 8);
sn.addPos(new AdjoiningPos(12, freq));
freq = (double) 1 / (double) (context.getFreq(13) * 8);
sn.addPos(new AdjoiningPos(13, freq));
}
break;
case TT_TRANS_PERSON:
freq = (double) 1 / (double) (context.getFreq(0) + 1);
sn.addPos(new AdjoiningPos(0, freq));
if (!Utility.isAllChinese(word)) {
if (Utility.isAllLetter(word)) {
freq = (double) 1 / (double) (context.getFreq(1) + 1);
sn.addPos(new AdjoiningPos(1, freq));
freq = (double) 1 / (double) (context.getFreq(11) + 1);
sn.addPos(new AdjoiningPos(11, freq));
freq = (double) 1 / (double) (context.getFreq(2) * 2 + 1);
sn.addPos(new AdjoiningPos(2, freq));
freq = (double) 1 / (double) (context.getFreq(3) * 2 + 1);
sn.addPos(new AdjoiningPos(3, freq));
freq = (double) 1 / (double) (context.getFreq(12) * 2 + 1);
sn.addPos(new AdjoiningPos(12, freq));
freq = (double) 1 / (double) (context.getFreq(13) * 2 + 1);
sn.addPos(new AdjoiningPos(13, freq));
}
freq = (double) 1 / (double) (context.getFreq(41) * 8);
sn.addPos(new AdjoiningPos(41, freq));
freq = (double) 1 / (double) (context.getFreq(42) * 8);
sn.addPos(new AdjoiningPos(42, freq));
freq = (double) 1 / (double) (context.getFreq(43) * 8);
sn.addPos(new AdjoiningPos(43, freq));
} else if (sn.getLen() >= 4) {
freq = (double) 1 / (double) (context.getFreq(41) * 8);
sn.addPos(new AdjoiningPos(41, freq));
freq = (double) 1 / (double) (context.getFreq(42) * 8);
sn.addPos(new AdjoiningPos(42, freq));
freq = (double) 1 / (double) (context.getFreq(43) * 8);
sn.addPos(new AdjoiningPos(43, freq));
} else if (sn.getLen() == 2) {
charType = Utility.charType(word);
if (charType == Utility.CT_OTHER || charType == Utility.CT_CHINESE) {
freq = (double) 1 / (double) (context.getFreq(1) * 2 + 1);
sn.addPos(new AdjoiningPos(1, freq));
freq = (double) 1 / (double) (context.getFreq(2) * 2 + 1);
sn.addPos(new AdjoiningPos(2, freq));
freq = (double) 1 / (double) (context.getFreq(3) * 2 + 1);
sn.addPos(new AdjoiningPos(3, freq));
freq = (double) 1 / (double) (context.getFreq(30) * 8 + 1);
sn.addPos(new AdjoiningPos(30, freq));
freq = (double) 1 / (double) (context.getFreq(11) * 4 + 1);
sn.addPos(new AdjoiningPos(11, freq));
freq = (double) 1 / (double) (context.getFreq(12) * 4 + 1);
sn.addPos(new AdjoiningPos(12, freq));
freq = (double) 1 / (double) (context.getFreq(13) * 4 + 1);
sn.addPos(new AdjoiningPos(13, freq));
freq = (double) 1 / (double) (context.getFreq(21) * 2 + 1);
sn.addPos(new AdjoiningPos(21, freq));
freq = (double) 1 / (double) (context.getFreq(22) * 2 + 1);
sn.addPos(new AdjoiningPos(22, freq));
freq = (double) 1 / (double) (context.getFreq(23) * 2 + 1);
sn.addPos(new AdjoiningPos(23, freq));
}
freq = (double) 1 / (double) (context.getFreq(41) * 8);
sn.addPos(new AdjoiningPos(41, freq));
freq = (double) 1 / (double) (context.getFreq(42) * 8);
sn.addPos(new AdjoiningPos(42, freq));
freq = (double) 1 / (double) (context.getFreq(43) * 8);
sn.addPos(new AdjoiningPos(43, freq));
}
break;
default:
break;
}