It would be appreciated that only some examples of dependency relationships are provided above, and more, less, or different dependency relationships may be used to represent the syntactic relationships between the words in the sentence 402.
In some embodiments, when considering the dependency relationships as the syntactic relationships, opposite dependency relationships may also be added into the sentence graph 512. An opposite dependency relationship is a different type of syntactic relationship from the corresponding dependency relationship. The opposite dependency relationships may be indicated by the edges when generating a directed sentence graph 512. For example, if the graph generation module 510 determines that there is a dependency relationship from a first word to a second word in the sentence 402, there might be an opposite relationship dependency relationship from the second word to the first word. As such, a directed edge may be constructed from a first node representing the first word to a second node representing the second word to indicate the dependency relationship, and a further directed edge may be constructed from the second node to the first node to indicate the opposite dependency relationship.