Never thought I’d be recommending that anyone read something on Facebook, but this really is an interesting description of the way Facebook’s natural language interface to Graph Search works. Even better, it’s detailed enough to be useful to anyone else thinking of implementing this sort of capability in their software.
https://www.facebook.com/note.php?note_id=10151432733048920
The Graph Search engine is built upon highly structured datain the form of a graph, representing hundreds of types of nodes and thousands of types of edges. People, pages, places, photos and posts are all nodes in the graph, each with structured information of its own nature. For example, users have gender information, places have addresses, and photos have posting dates. Moreover, the nodes are connected to each other in various ways. Someone can like a page, study at a school, live in a city, be in a relationship with another user, check in at a place, and comment on a photo. A photo, in turn, can be tagged with a person and be taken at a place. It is the richness of the data that defines the nature of Graph Search; the system needs to be designed toward understanding the user intent precisely and serving structured objects.