public void writeOutput(List<Utterance> segUtterances, Lexicon segLexicon) {
		try {
			// Write segmentation
			PrintStream out = new PrintStream(outputBase + "_seg.txt");
			for (Utterance utt : segUtterances) {
				out.println(utt.getSegText());
			}
			out.close();

			// Write lexicon, sorted by score
			ArrayList<Word> words = new ArrayList<Word>(segLexicon.getWords());
			Collections.sort(words, Collections.reverseOrder(segLexicon.new WordScoreComparator()));
			out = new PrintStream(outputBase + "_lex.txt");
			for (Word w : words) {
				out.println(segLexicon.dumpWord(w));
			}
			out.close();

		} catch (FileNotFoundException e) {
			System.err.println("Couldn't open output files");
		}
	}