public void analyzeLine (String instr) {
		
		//clear the map for new input string
		tf_idf_map.clear();
		core_words.removeAllElements();
		non_core_words.removeAllElements();
		
		System.out.println("analyzing...");
		long start = System.currentTimeMillis();
		//tokenization
		instr = getTokenized(instr);
		//regex
		Pattern p = Pattern.compile("([^\\ ]+)[\\ |.]");
		Matcher m = p.matcher(instr);
		
		while(m.find()) {
			String word = m.group(1);
			//stemming: change the format of the words
			//e.g. making => make goes => go
			word = getStem(word);
			//filter the stop words
			if(stopmap.containsKey(word) == false && idfmap.containsKey(word)) {
				//update the tf
				if(tf_idf_map.containsKey(word)) {
					double freq = tf_idf_map.get(word);
					tf_idf_map.put(word, freq+1);
				}
				else
					tf_idf_map.put(word, 1.0);
			}
		}
		
		//sort the tf_idf_map on score
		List<Map.Entry<String, Double>> list = new ArrayList<Map.Entry<String, Double>>(tf_idf_map.entrySet());
		for(int i = 0; i < list.size(); i++) {
			String key = list.get(i).getKey();
			Double tf_idf = list.get(i).getValue() * idfmap.get(key);
			tf_idf_map.put(key, tf_idf);
		}
		
		Collections.sort(list, new Comparator<Map.Entry<String, Double>>() {   
		    public int compare(Map.Entry<String, Double> o1, Map.Entry<String, Double> o2) {   
		    	//get idf score and multiply the tf
		    	double delta = o1.getValue() - o2.getValue(); 
		    	if (delta > 0)
		    		return -1;
		    	else if (Math.abs(delta) < 0.00000001)
		    		
		    		return 0;
		    	else
		    		return 1;
		    }
		}); 
		
		//20% for core index
		int i;
		for(i = 0; i < list.size() * percentage; i++)
			core_words.add(list.get(i).getKey());
		for(;i < list.size(); i++)
			non_core_words.add(list.get(i).getKey());
		
		long end = System.currentTimeMillis();
		System.out.println("analyzation done! Time(s): " + (end-start)/1000);
		/*for(i = 0; i < list.size(); i++) 
			System.out.println(list.get(i).getKey()+"--"+list.get(i).getValue());*/
		
	}