int number = -1;
//todo: refactor this horse shit.
for (String res: results) {
if(number == -1){
if(res.toLowerCase().contains("ten") || res.contains("10") || res.contains("10") || res.contains("十") || res.contains("십")){
number = 10;
}
else if(res.toLowerCase().contains("nine") || res.contains("9") || res.contains("9") || res.contains("九") || res.contains("구")){
number = 9;
}
else if(res.toLowerCase().contains("eight") || res.contains("8") || res.contains("8") || res.contains("八") || res.contains("팔")){
number = 8;
}
else if(res.toLowerCase().contains("seven") || res.contains("7") || res.contains("7") || res.contains("七") || res.contains("칠")){
number = 7;
}
else if(res.toLowerCase().contains("six") || res.contains("6") || res.contains("6") || res.contains("六") || res.contains("육")){
number = 6;
}
else if(res.toLowerCase().contains("five") || res.contains("5") || res.contains("5") || res.contains("五") || res.contains("오")){
number = 5;
}
else if(res.toLowerCase().contains("four") || res.contains("4") || res.contains("4") || res.contains("四") || res.contains("사")){
number = 4;
}
else if(res.toLowerCase().contains("three") || res.contains("3") || res.contains("3") || res.contains("三") || res.contains("삼")){
number = 3;
}
else if(res.toLowerCase().contains("two") || res.contains("2") || res.contains("2") || res.contains("二") || res.contains("이")){
number = 2;
}
else if(res.toLowerCase().contains("one") || res.contains("1") || res.contains("1") || res.contains("一") || res.contains("일")){
number = 1;
}
}
}
refactor this horse shit.