public static void main(String[] args) throws IOException {
		HashMap<String, File> fileMap = Utility.prepareDictionaryFiles(args[0]);

		InfoLoader infoLoader = new InfoLoader(fileMap.get("ifo"),
				Constant.UTF8);

		infoLoader.loadData();

		File[] dictFiles = { fileMap.get("idx"), fileMap.get("dict") };
		final DB db = DBMaker.newFileDB(new File(args[1])).make();

		final ConcurrentNavigableMap<String, String> meenings = db
				.getTreeMap("word_meanings");

		DictionaryManager dictManager = new DictionaryManager() {
			public void addBatch(String word, String meening) {
				StringBuilder sb = new StringBuilder();
				boolean f = true;
				boolean t = false;
				for (int i = 0; i < meening.length(); i++) {
					if (meening.charAt(i) == '\n') {
						if (!t) {
							t = true;
							if (f) {
								sb.append(": ");
								f = false;
							} else
								sb.append("; ");
						}
					} else {
						sb.append(meening.charAt(i));
						t = false;
					}
				}
				meening = sb.toString().trim();
				if (meening.endsWith(";"))
					meening = meening.substring(0, meening.length() - 1);
				meenings.put(word, meening);
			};
		};
		DictLoader indexLoader = new DictLoader(dictManager, dictFiles,
				Constant.UTF8);
		indexLoader.loadData();
		db.commit();
		db.compact();
		db.close();
	}