Research Article

A Grammar-Based Semantic Similarity Algorithm for Natural Language Sentences

Algorithm 2

Semantic sentence similarity.
INPUT: ,   ,  /* sets of relations of sentences A, B */
OUTPUT:
(1)   LinkingTypes( , )
(2)   LinkingTypes( , )
(3)  FOR ALL   .type .type  DO
(4)   + GrammarMatrix( · , · )
(5)  END FOR
(6)  
(7)  RETURN