private static void build(ArrayList<String> sentences) {
			for (String sentence : sentences) {
				String[] words = sentence.split(" ");
				int len = words.length;
				
				if (len < prefix_len)
					continue;
				
				// Set the first prefix to be the empty string's suffix
				String suffix = "";
				for (int i = 0; i < prefix_len; i++) {
					suffix += (i < prefix_len - 1) ? words[i] + " " : words[i];
				}
				add("", suffix);
				
				// Sentence shorter than the suffix length will not be used
				for (int i = 0; i < len - prefix_len; i++) {
					String prefix = "";
					for (int j = 0; j < prefix_len; j++) {
						prefix += (j < prefix_len - 1) ? words[i + j] + " ": words[i + j];
					}
					// Add suffix to state table
					add(prefix, words[i + prefix_len]);
					
					// Append to eol suffix list if it's the last word
					if ((i + prefix_len) == (len - 1)) {
						String last_word = prefix.split(" ")[prefix_len - 1];
						ArrayList<String> suf_lst = (eol_suffix.containsKey(last_word)) ? 
								eol_suffix.get(last_word) : new ArrayList<String>();
						
						suf_lst.add(words[i + prefix_len]);
						eol_suffix.put(last_word, suf_lst);
					}
				}
			}
		}