问题
I'm guessing I'm on thin ice with regards to a question that can be answered instead of just discussed as from my research Facebook's Graph Search seems to be in stealth mode with nothing much officially shared by Facebook, except this.
I'm interested in how facebook are getting this to work. So I've been playing with OpenNLP and the POS Tagger (parts of speech). I've got that far, but then it became obvious how many nuances exist with natural language, kinda knew that but didn't respect it, until I hacked something together.
So I got this far -
[Debug] Question :: Friends from France who like England
[Debug] Token = Friends :: POS = NNS
[Debug] Token = from :: POS = IN
[Debug] Token = France :: POS = NNP
[Debug] Token = who :: POS = WP
[Debug] Token = like :: POS = VBP
[Debug] Token = England :: POS = NNP
Where POS is part of speech as described here
I guess from there I can take the POS tags and where I have a rule set look for similar terms in my schema? Rules seem a brittle approach. Perhaps I should have an ontology to have thing related to a friend in there some how? The problem seems "easier" for a triple store, where the semantics are already tagged e.g. "James","likes","England" and I have another triple where "James","comes from","France" it's essentially just a just a join in SQL.
This is purely academic, a little hack for the evenings. I'm just interested in how this works for them. This google search throws up some things of interest.
So specific questions are, how does graph search work? How is natural language mapped to what ever query/ datastore they use? Other than Wolfram Alpha are there any other good examples of this type of thing? Is there anything open source? What computer science concepts are used here that I should go and read up on?
Cheers
David
来源:https://stackoverflow.com/questions/14498507/how-does-facebook-graph-search-work