public void map(LongWritable key, Text value, OutputCollector<Text, IntWritable> output,Reporter reporter)
            throws IOException {
    	
        String line = value.toString();
        String[] words = line.split(",");
        int flag = 1;
        
        for(int j=0;j<rule[rule_no].length-1 && flag==1;j++)
		{
			if(rule[rule_no].val[j].equals(words[rule[rule_no].num[j]]))
				flag = 1;
			else 
				flag = 0;
		}
        
        if(flag == 1)
        {
        	if(words[0].equals(rule[rule_no].class_name))
        	{
        		if(rule[rule_no].val[rule[rule_no].length-1].equals(words[rule[rule_no].num[rule[rule_no].length-1]]))
        		{
        			reporter.incrCounter(Counter.PR0, 1);
        			word.set("p0");
        			output.collect(word, one);
        		}
        		reporter.incrCounter(Counter.PR1, 1);
        		word.set("p1");
    			output.collect(word, one);
        	}
        	else
        	{
        		if(rule[rule_no].val[rule[rule_no].length-1].equals(words[rule[rule_no].num[rule[rule_no].length-1]]))
        		{
        			reporter.incrCounter(Counter.NR0, 1);
        			word.set("n0");
        			output.collect(word, one);
        		}
        		reporter.incrCounter(Counter.NR1, 1);
        		word.set("n1");
    			output.collect(word, one);
        	}
        }
    }