public static void main(String[] args) {
		try {

			if (args.length < 3) {
				System.out
						.println("usage: java FormatConverter <iobFile> <posFile> [further meta data files] <outFile> <taglist (or 0 if not used)>");
				System.exit(0);
			}

			File iobFile = new File(args[0]);
			ArrayList<File> metaDataFiles = new ArrayList<File>();
			for (int i = 1; i < args.length - 2; i++) {
				metaDataFiles.add(new File(args[i]));
			}
			File outFile = new File(args[args.length - 2]);

			System.out.println("Reading iob and meta data files...");
			ArrayList<String> iobData = Utils.readFile(iobFile);
			ArrayList<ArrayList<String>> metaData = new ArrayList<ArrayList<String>>();
			for (int i = 0; i < metaDataFiles.size(); i++) {
				metaData.add(Utils.readFile(metaDataFiles.get(i)));
			}

			TreeSet<String> tagList = null;
			if (!args[args.length - 1].equals("0")) {
				tagList = new TreeSet<String>(Utils.readFile(new File(
						args[args.length - 1])));
			}

			// make piped format
			System.out.println("Making piped format...");
			ArrayList<String> pipedData = makePipedFormat(iobData, metaData,
					tagList);
			Utils.writeFile(outFile, pipedData);

		} catch (Exception e) {
			e.printStackTrace();
		}

	}