indexTest method added to TextTest
This commit is contained in:
@@ -172,10 +172,12 @@ public class Text {
|
||||
for (int i = 0; i < text.size(); i++) {
|
||||
String[] words = text.get(i).trim().toLowerCase().split("[ :;.,!?><'/\n]+");
|
||||
for (String word : words) {
|
||||
//Words get formatted consistently
|
||||
counter = 1;
|
||||
firstLetter = word.substring(0, 1);
|
||||
restLetters = word.substring(1);
|
||||
word = firstLetter.toUpperCase() + restLetters;
|
||||
//Words are beeing counted
|
||||
if (wordbook.containsKey(word)) {
|
||||
numbersList = wordbook.get(word);
|
||||
counter = numbersList.get(0);
|
||||
|
||||
@@ -3,6 +3,7 @@ public class TextEditor {
|
||||
|
||||
public static void main(String[] args) {
|
||||
TextLogik t = new TextLogik();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user