A text sentence comparison method includes converting a first text
sentence and a second text sentence into a first R tree (or a first RO
tree) and a second R tree (or a second RO tree), respectively,
calculating a distance between the first R tree and the second R tree (or
a distance between the first RO tree and the second RO tree) on the basis
of a distance between two R trees (or a distance between two RO trees),
which is defined at least in accordance with a condition of a mapping
between vertexes and edges of the two R trees (or the two RO trees), and
calculating a distance between the first text sentence and the second
text sentence on the basis of the calculated distance between the first R
tree and the second R tree (or the calculated distance between the first
RO tree and the second RO tree).