@Override
	public void addNgram(Ngram ngram) throws Exception {
		Connection conn = JDBC.createConnection();

		String wordAfterHandle = ngram.getWordGroup();

		if (ngram.getWordGroup().contains("'")) {
			// System.out.println(ngram.getWordGroup());
			String spiltArray[] = ngram.getWordGroup().split("\'");

			wordAfterHandle = spiltArray[0];
			for (int i = 1; i < spiltArray.length; i++)
				wordAfterHandle += "\\" + "\'" + spiltArray[1];
		}

		String sql = "insert ignore into ngram(wordGroup,wordAttribute) values('"
				+ wordAfterHandle + "','" + ngram.getWordAttribute() + "');";

		// System.out.println(sql);
		PreparedStatement stat = JDBC.getSatement(conn, sql);
		stat.executeUpdate();
		JDBC.close(stat);

		JDBC.close(conn);
	}