Patent ID: 9703844
Date: 2017-07-11
CPC Classifications: G06F,G06Q

Claim:
1. A method comprising, by a computing device: accessing a graph data structure of an online social network, the graph data structure comprising a plurality of nodes and a plurality of edges connecting the nodes, each of the edges between two of the nodes representing a single degree of separation between them, the nodes comprising: receiving an unstructured text query inputted by the first user; generating, responsive to receiving the unstructured text query, one or more structured queries corresponding to the unstructured text query, each structured query corresponding to a selected grammar of a context-free grammar model, wherein each structured query is based on a natural-language string generated by the corresponding selected grammar, each structured query comprising references to one or more edges and one or more second nodes each corresponding to at least a portion of the unstructured text query; receiving from the first user a selection of a first structured query of the one or more structured queries, wherein the first structured query comprises references to one or more selected nodes from the plurality of second nodes and one or more selected edges from the plurality of edges, wherein each selected node is connected by at least one of the selected edges; and generating one or more search results corresponding to the first structured query, wherein each search result corresponds to a second node of the plurality of second nodes that is connected to one or more of the selected nodes by one or more of the selected edges, each search result comprising one or more snippets, each snippet comprising contextual information about the second node corresponding to the search result, wherein at least one of the snippets of each search result comprises one or more references to the selected nodes and the selected edges of the first structured query.