public void reduce() throws Exception {
		System.out.println("Start: reducing dimensionality...");
		
		System.out.print("Preparing...");
		InputStreamReader wvinFile = new InputStreamReader(new FileInputStream(this.wvfilepath), this.encoding);
		BufferedReader wvreader = new BufferedReader(wvinFile);
		InputStreamReader wlinFile = new InputStreamReader(new FileInputStream(this.wlfilepath), this.encoding);
		BufferedReader wlreader = new BufferedReader(wlinFile);
		OutputStreamWriter outFile = new OutputStreamWriter(new FileOutputStream(this.outfilepath), this.encoding);
		BufferedWriter writer = new BufferedWriter(outFile);
		ArrayList<Map<Integer, Double>> maplist = new ArrayList<Map<Integer, Double>>();
		ArrayList<String> wordlist = new ArrayList<String>();
		Map<Integer, Double> totalmap = new HashMap<Integer, Double>();
		String line = "";
		System.out.println("Done!");
		
		System.out.print("Step 1: maping article vectors...");
		while((line = wvreader.readLine()) != null) {
			maplist.add(this.wv2map(line));
		}
		System.out.println("Done!");
		
		System.out.print("Step 2: adding all dimensions...");
		for(Map<Integer, Double> m : maplist) {
			Iterator<Entry<Integer, Double>> it = m.entrySet().iterator();
			while(it.hasNext()) {
				Map.Entry<Integer, Double> entry = (Map.Entry<Integer, Double>)it.next();
				int key = (int)entry.getKey();
				double value = (double)entry.getValue();
				if(totalmap.containsKey(key)) {
					double ori_value = totalmap.get(key);
					double new_value = ori_value + value;
					totalmap.remove(key);
					totalmap.put(key, new_value);
				} else {
					totalmap.put(key, value);
				}
			}
		}
		System.out.println("Done!");
		
		System.out.print("Step 3: sorting dimensions...");
		List<Map.Entry<Integer, Double>> infoIds = new ArrayList<Map.Entry<Integer, Double>>(totalmap.entrySet());
		Collections.sort(infoIds, new Comparator<Map.Entry<Integer, Double>>() {
			public int compare(Map.Entry<Integer, Double> o1, Map.Entry<Integer, Double> o2) {
				if(o2.getValue() > o1.getValue()) {
					return 1;
				} else {
					return 0;
				}
			}
		});
		System.out.println("Done!");
		
		System.out.print("Step 4: loading word list...");
		while((line = wlreader.readLine()) != null) {
			if(!line.equals("")) {
				wordlist.add(line);
			}
		}
		System.out.println("Done!");
		
		System.out.print("Step 5: writing to file...");
		for(int i = 0; i < infoIds.size() && i < 8000; ++i) {
			int key = infoIds.get(i).getKey();
			double value = infoIds.get(i).getValue();
			String word = wordlist.get(key);
			writer.write(key + " " + word + " " + value);
			writer.newLine();
		}
		System.out.println("Done!");
		
		wvreader.close();
		wlreader.close();
		writer.close();
		wvinFile.close();
		wlinFile.close();
		outFile.close();
		
		System.out.println("End: dimensionality reduced!");
	}