public void createNegativePairsFile(File negativePairsFile, int n) {
	BufferedOutputStream os = null;
	try {
	    os = new BufferedOutputStream(new FileOutputStream(
		    negativePairsFile));
	    for (int i = 0; i < n; i++) {
		os.write(String.format("-1,%d", i + 1).getBytes());
		for (Integer pair : createRandomPairs()) {
		    for (int j = 0; j < dictionarySize; j++) {
			os.write(",".getBytes());
			int val = 0;
			if (pair == j) {
			    val = 1;
			}
			os.write(Integer.toString(val).getBytes());
		    }
		}
		os.write("\n".getBytes());
	    }
	} catch (FileNotFoundException e) {
	    // TODO Auto-generated catch block
	    e.printStackTrace();
	} catch (IOException e) {
	    // TODO Auto-generated catch block
	    e.printStackTrace();
	} finally {
	    if (os != null) {
		try {
		    os.close();
		} catch (IOException e) {
		    e.printStackTrace();
		}
		os = null;
	    }
	}
    }