Computational Intelligence and Neuroscience / 2016 / Article / Alg 2

Research Article

A Natural Language Interface Concordant with a Knowledge Base

Algorithm 2

The user question translation algorithm.
(1) procedure TRANSLATEQUESTIONTOQUERY
(2)  : an input user question
(3) begin
(4)   a set of normalized expressions for
(5)  
(6)  for all    do
(7)   expression candidates which share all semantic codes of
(8)  for all    do
(9)  
(10) Add into
(11)  end for
(12)  end for
(13)  
(14)  if    then
(15)  alarm failure
(16)  end if
(17)   a schema graph corresponding to
(18)  Generate a formal query using and
(19) end procedure