public static void main(String[] args) {
		// Parse command line flags and arguments
		Map<String, String> argMap = CommandLineUtils
				.simpleCommandLineParser(args);

		// Set up default parameters and settings
		String basePath = ".";
		boolean verbose = false;
		boolean useValidation = true;

		// Update defaults using command line specifications

		// The path to the assignment data
		if (argMap.containsKey("-path")) {
			basePath = argMap.get("-path");
		}
		System.out.println("Using base path: " + basePath);

		// Whether to use the validation or test set
		if (argMap.containsKey("-test")) {
			String testString = argMap.get("-test");
			if (testString.equalsIgnoreCase("test"))
				useValidation = false;
		}
		System.out.println("Testing on: "
				+ (useValidation ? "validation" : "test"));

		// Whether or not to print the individual errors.
		if (argMap.containsKey("-verbose")) {
			verbose = true;
		}

		// Read in data
		System.out.print("Loading training sentences...");
		List<TaggedSentence> trainTaggedSentences = readTaggedSentences(
				basePath, 200, 2199);
		Set<String> trainingVocabulary = extractVocabulary(trainTaggedSentences);
		System.out.println("done.");
		System.out.print("Loading validation sentences...");
		List<TaggedSentence> validationTaggedSentences = readTaggedSentences(
				basePath, 2200, 2299);
		System.out.println("done.");
		System.out.print("Loading test sentences...");
		List<TaggedSentence> testTaggedSentences = readTaggedSentences(
				basePath, 2300, 2399);
		System.out.println("done.");

		// Construct tagger components
		// TODO : improve on the MostFrequentTagScorer
		LocalTrigramScorer localTrigramScorer = null;
		if (argMap.containsKey("-model")) {
			String modelString = argMap.get("-model");
			if (modelString.equalsIgnoreCase("base")) {
				localTrigramScorer = new MostFrequentTagScorer(false);
			} else if (modelString.equalsIgnoreCase("trigram")) {
				localTrigramScorer = new TrigramTagScorer();
			} else if (modelString.equalsIgnoreCase("memm")) {
                localTrigramScorer = new TrigramMEMMScorer("features.txt");
            }
		} else {
			localTrigramScorer = new MostFrequentTagScorer(false);
		}
		// TODO : improve on the GreedyDecoder
		// TrellisDecoder<State> trellisDecoder = new GreedyDecoder<State>();
		TrellisDecoder<POSTagger.State> trellisDecoder = new Trellis.ViterbiDecoder<POSTagger.State>();

		// Train tagger
		POSTagger posTagger = new POSTagger(localTrigramScorer, trellisDecoder);
		posTagger.train(trainTaggedSentences);
		posTagger.validate(validationTaggedSentences);

		// Test tagger
		evaluateTagger(posTagger, testTaggedSentences, trainingVocabulary,
				verbose);
	}