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