String readPOS;
readPOS = jTextArea1.getText();
String []POS;
POS = readPOS.split("[-.!? ,\n]");
jTextArea2.append("Part of Speech Result:\n");
String patternKGN,patternKPF,patternKK,patternKNA,patternKPA,
patternKPC,patternKPK,patternKS,patternKNK;
for(int i = 0; i < POS.length; i++)
{
if (POS[i].equals(POS[i].toUpperCase()))
{
jTextArea2.append(POS[i].toUpperCase() + "/KNK" + " | ");
}
}
i ady split the input with "[-.!? ,\n]", for example when i
input :
DENNIS, MAY! CARRICK?
Output : DENNIS/KNK | /KNK | MAY/KNK | /KNK | CARRICK/KNK | /KNK |
the result like detect "[-.!? ,\n]" after spacing become as uppercase, if no put spacing after "[-.!? ,\n]" then
Output :
DENNIS/KNK | MAY/KNK | CARRICK/KNK |
This result is wat i wish... but after put back spacing.. become problem as mention jz now... who can fix?