public static void main(String[] args) {
		String textFile = null;
		if (args.length == 1) {
			textFile = args[0];
		} else if (args.length == 2) {
			configFile = args[0];
			textFile = args[1];
		} else {
			usage();
			System.exit(0);
		}

		// initialize the system
		FigerSystem sys = instance();
		Preprocessing.initPipeline();

		// preprocess the text
		List<String> list = FileUtil.getLinesFromFile(textFile);
		for (int i = 0; i < list.size(); i++) {
			Annotation annotation = new Annotation(list.get(i));
			Preprocessing.pipeline.annotate(annotation);

			// for each sentence
			int sentId = 0;
			for (CoreMap sentence : annotation.get(SentencesAnnotation.class)) {
				System.out.println("[l"
						+ i
						+ "][s"
						+ sentId
						+ "]tokenized sentence="
						+ StringUtils.joinWithOriginalWhiteSpace(sentence
								.get(TokensAnnotation.class)));
				List<Pair<Integer, Integer>> entityMentionOffsets = getNamedEntityMentions(sentence);
				for (Pair<Integer, Integer> offset : entityMentionOffsets) {
					String label = sys.predict(annotation, sentId,
							offset.first, offset.second);
					String mention = StringUtils
							.joinWithOriginalWhiteSpace(sentence.get(
									TokensAnnotation.class).subList(
									offset.first, offset.second));
					System.out.println("[l" + i + "][s" + sentId + "]mention"
							+ mention + "(" + offset.first + ","
							+ offset.second + ") = " + mention + ", pred = "
							+ label);
				}
				sentId++;
			}
		}
	}