public static double[] evaluate(ArrayList gold_tok, ArrayList eval_tok)
			throws Exception {

		if (gold_tok.size() != eval_tok.size()) {
			System.out.println(gold_tok);
			System.out.println(eval_tok);
			throw new Exception(
					"size of gold standard different from predicted data");
		}

		ArrayList<String> gold = new ArrayList<String>();
		ArrayList<String> eval = new ArrayList<String>();
		for (int i = 0; i < gold_tok.size(); i++) {
			String[] gTok = ((String) gold_tok.get(i)).split("\t");
			String[] eTok = ((String) eval_tok.get(i)).split("\t");

			// check format
			if (gTok.length != 2) {
				System.err
						.println("ERR: format error in gold file. IOB format must be: token<tab>label");
				System.exit(-1);
			} else if (eTok.length != 2) {
				System.err
						.println("ERR: format error in eval file. IOB format must be: token<tab>label");
				System.exit(-1);
			}

			gold.add(gTok[1]);
			eval.add(eTok[1]);
		}

		return getValuesMulti(gold, eval);
	}