// for (int i=0; i<sentences.size(); i++){ // iterate over sentences
List<Token> tokens2 = new ArrayList<Token>(tokens.size());
for (int x=0; x<tokens.size(); x++){ // iterate over tokens of the sentence with their corresponding POS
Token current_token = (Token)tokens.get(x);
if(current_token.pos.startsWith("N")){
current_token.pos="Noun";
}
if(current_token.pos.startsWith("V")){
current_token.pos="Verb";
}
if(current_token.pos.startsWith("ADJ")){
current_token.pos="Adjective";
}
if(current_token.pos.startsWith("P")){
current_token.pos="Pronoun";
}
if(current_token.pos.startsWith("KO")){
current_token.pos="Conjunction";
}
if(current_token.pos.startsWith("AP")){
current_token.pos="Preposition";
}
if(current_token.pos.startsWith("PTK")){
current_token.pos="PTK";
}
if(current_token.pos.startsWith("ADV")){
current_token.pos="Adverb";
}
if(current_token.pos.startsWith("ART")){
current_token.pos="Article";
}
if(current_token.pos.startsWith("ITJ")){
current_token.pos="Interjection";
}
Token zwischen = new Token(current_token.word, current_token.pos);
tokens2.add(zwischen);
}
return tokens2;