Research Article

Text Matching and Categorization: Mining Implicit Semantic Knowledge from Tree-Shape Structures

Algorithm 4

BuildTree(R).
Input: SemGraph G; the root node R; int
Output: trees (denoted as , )
() IF R is empty THEN
() select R from G
() 
() add R to
() visit all subsequent nodes of R according to the pointers
() LN records all the subsequent nodes
() IF LN is empty THEN return
() ELSE
() FOREACH node IN LN
()  link R with node in
()  delete the edges that have been visited in G
()  IF node is an isolate node THEN delete node
()  ELSE BuildTree(node)