谢谢,斑竹阿,我了解了,但是还有个问题
import java.util.*;
import java.net.*;
import java.io.*;
import org.w3c.tidy.Tidy;
import com.objectspace.jgl.PriorityQueue;
import org.w3c.dom.*;
import edu.gatech.disl.qr.util.*;
//import edu.gatech.disl.qr.wrapper.base.*;
import edu.gatech.disl.qr.xml.Piece;
public class Test
{
public int extractObjects(Node parsedPage) {
TreeTuple treeTuple = new TreeTuple(null);
TreeTuple rootTuple = new TreeTuple(null);
if (results == null) {
results = new Vector();
}
Node subtree = getSubtree(parsedPage, treeTuple, rootTuple, getSubtreePath(), getSubtreeRule());
finalSubtree = subtree;
TagHeuristic heuristic = new HighestCountTagHeuristic(null, configuration);
heuristic.process(subtree);
out.println("Tag count: "+heuristic.getTagCount());
fireWrapperBeganExtraction();
int count = printResults(finalTag, heuristic, treeTuple, rootTuple, results);
return count;
}
public static void main(String args[])
{
System.out.println("This is a test!");
Node p = null;
//Node p = new Node(3,3);带参数的形式
//Node p = new Node();//不带参数的形式
System.out.println("There are " +extractObjects(p);
}
}
在这个程序里TagHeuristic heuristic = new HighestCountTagHeuristic(null, configuration);
heuristic.process(subtree);应该就是启发式算法部分把,他的意义是什么啊?