public void setupUrl(String url_file) throws IOException
	{
		long length = 0;
		BufferedReader in = null;
		try {
			in = new BufferedReader(new FileReader(url_file));
			String line;
			totalPageNum = Integer.parseInt(in.readLine());
			while ((line = in.readLine()) != null) 
			{
				String words[] = line.split(" ");
				urlDocMap.put(Integer.parseInt(words[0]),new UrlDocLen(words[1],Integer.parseInt(words[2])));
				length += Integer.parseInt(words[2]);
			}
			//calculate the average length of documents in the collection
			averageLen = (double)length/urlDocMap.size();
		} catch (Exception e) {
			e.printStackTrace();
		}
		finally{in.close();}
		
	}