Text.java index and createWordlist methode cleanup
This commit is contained in:
		
							parent
							
								
									edba4d5d8c
								
							
						
					
					
						commit
						caec2257e1
					
				| 
						 | 
				
			
			@ -137,10 +137,11 @@ public class Text {
 | 
			
		|||
        wordbook = createWordlist();
 | 
			
		||||
        String input;
 | 
			
		||||
        ArrayList<String> output = new ArrayList<>();
 | 
			
		||||
        ArrayList<Integer> values;
 | 
			
		||||
        for (Map.Entry<String, ArrayList<Integer>> entry : wordbook.entrySet()) {
 | 
			
		||||
            input = "";
 | 
			
		||||
            String key = entry.getKey();
 | 
			
		||||
            ArrayList<Integer> values = entry.getValue();
 | 
			
		||||
            values = entry.getValue();
 | 
			
		||||
            if (values.get(0) >= 3) {
 | 
			
		||||
                input += key + "    ";
 | 
			
		||||
                for (int i = 1; i < values.size(); i++) {
 | 
			
		||||
| 
						 | 
				
			
			@ -167,7 +168,7 @@ public class Text {
 | 
			
		|||
        String firstLetter;
 | 
			
		||||
        String restLetters;
 | 
			
		||||
        for (int i = 0; i < text.size(); i++) {
 | 
			
		||||
            String[] words = text.get(i).trim().toLowerCase().split("[ :;.,!?><'/]+");
 | 
			
		||||
            String[] words = text.get(i).trim().toLowerCase().split("[ :;.,!?><'/\n]+");
 | 
			
		||||
            for (String word : words) {
 | 
			
		||||
                counter = 1;
 | 
			
		||||
                firstLetter = word.substring(0, 1);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue