Computational Intelligence and Neuroscience / 2016 / Article / Alg 1

Research Article

A Natural Language Interface Concordant with a Knowledge Base

Algorithm 1

The schema subgraph generation algorithm.
(1)   procedure GENSCHEMASUBGRAPH()
(2)    : a whole schema graph
(3)   begin
(4)    , is a vertex of
(5)    
(6)    for all    do
(7)        GENSUBGRAPH
(8)    end for
(9)   end procedure
(10) function GENSUBGRAPH()  as a set of schema subgraphs
(11)  : a schema subgraph
(12)  : a set of schema subgraphs
(13)  : a whole schema graph
(14) begin
(15)  if    then
(16)     return  
(17)  end if
(18)  for all vertex   do
(19)      for all edge or edge   do
(20)     
(21)     
(22)     
(23)      if    then
(24)   
(25)    GENSUBGRAPH
(26)      end if
(27)      end for
(28)  end for
(29)  return  
(30) end function