add more split-chars to tokenizer, add () support (tested)
This commit is contained in:
parent
8075a2f44e
commit
d6461db848
1 changed files with 13 additions and 3 deletions
16
ISBPL.java
16
ISBPL.java
|
@ -1719,15 +1719,25 @@ public class ISBPL {
|
|||
word.append('"');
|
||||
isInString = true;
|
||||
}
|
||||
else if(c == ' ') {
|
||||
words.add(word.toString());
|
||||
else if(c == ' ' || c == '°' || c == 'ß' || c == '§') {
|
||||
String w = word.toString();
|
||||
while(w.startsWith("(") && w.length() > 1)
|
||||
w = w.substring(1);
|
||||
while(w.endsWith(")") && w.length() > 1)
|
||||
w = w.substring(0, w.length() - 1);
|
||||
words.add(w);
|
||||
word = new StringBuilder();
|
||||
}
|
||||
else {
|
||||
word.append(c);
|
||||
}
|
||||
}
|
||||
words.add(word.toString());
|
||||
String w = word.toString();
|
||||
while(w.startsWith("(") && w.length() > 1)
|
||||
w = w.substring(1);
|
||||
while(w.endsWith(")") && w.length() > 1)
|
||||
w = w.substring(0, w.length() - 1);
|
||||
words.add(w);
|
||||
|
||||
ArrayList<String> cleanWords = new ArrayList<>();
|
||||
for(int i = 0; i < words.size(); i++) {
|
||||
|
|
Loading…
Add table
Reference in a new issue