Patent 9477760 was granted and assigned to Facebook on October, 2016 by the United States Patent and Trademark Office.
In one embodiment, a method includes accessing a set of nodes of a social graph of an online social network. The social graph includes a number of nodes and a number of edges connecting the nodes. Each of the edges between two of the nodes representing a single degree of separation between them. The nodes include a first node that corresponds to the first user and a number of nodes that each correspond to a concept or a second user associated with the online social network. The method also includes accessing one or more grammar tokens. Each grammar token includes references to zero or more nodes and one or more edges. Each grammar token corresponds to a particular type of completion token. Each grammar token may be based on a natural-language string. The method also includes receiving from the first user a selection of one or more of the grammar tokens and one or more of the completion tokens.