Slashdot Mirror


How Facebook Built Natural Language Into Graph Search

Nerval's Lobster writes "Facebook's Graph Search is an ambitious project: give users the ability to search through the social network's vast webs of data via natural-language queries. But that's much easier said—so to speak—than done. Although human beings think nothing of speaking in 'natural' language, a machine must not only learn all the grammatical building-blocks we take for granted—it needs to compensate for the quirks and errors that inevitably pop up in the course of speech. The Facebook team tasked with building Graph Search also knew that the alternate option, keyword-based search, wasn't a viable one. 'Keywords, which usually consist of nouns or proper nouns, can be nebulous in their intent,' Facebook engineering manager Xiao Li wrote in an April 29 posting on Facebook's blog. 'For example, "friends Facebook" can mean "friends on Facebook," "friends who work at Facebook Inc," or "friends who like Facebook the page."' That left the team with building a natural-language interface. The posting digs deep into the elements of the backend, including everything from 'parse trees' to a lexical analysis system."

39 comments

  1. The brightest minds of a generation by Anonymous Coward · · Score: 5, Insightful

    And all they're doing is coming up with new ways to get you to look at ads.

    1. Re:The brightest minds of a generation by SimonTheSoundMan · · Score: 1, Interesting

      Well I haven't seen it rolled out to anyone yet so they're holding back the ads. Vapourware as far as I care.

      Not seen the new news feed either.

    2. Re:The brightest minds of a generation by fph+il+quozientatore · · Score: 5, Insightful

      Don't forget all those bright minds trying to syphon truckloads of money out of meaningless microsecond virtual financial transations. This should give you a more thorough picture of how screwed up this world is.

      --
      My first program:

      Hell Segmentation fault

    3. Re:The brightest minds of a generation by elloGov · · Score: 3, Insightful

      What about the bright minds coming up with new ways to kill people (military)?
      Moral codes, ethics and philosophies are for the classroom, cash is what rules in the real world. The massive efforts of society to abstract our ill-doings (work) from our morals shouldn't be overlooked either.

    4. Re:The brightest minds of a generation by elloGov · · Score: 4, Interesting

      Civilization is an ongoing collective effort. Why do we whine about this? Next time you or a loved one who desperately needs the same bright minds to come up with remedy or a cure to a devastating disease, tell me why you don't whine.

    5. Re:The brightest minds of a generation by tyrione · · Score: 2, Insightful

      And all they're doing is coming up with new ways to get you to look at ads.

      Whoever said they were the brightest minds? I can guarantee they aren't remotely the brightest of their generation. Not by a long shot.

    6. Re:The brightest minds of a generation by Anonymous Coward · · Score: 2, Informative

      It's not your fucking money.

      Actually it is. Where do you think Hedge funds get their money form? And when the whole thing pisses itself whose Govt creates bailouts to fix the fuck-ups? that's right, it comes from us.

      Say what you want, we are nothing if not generous about it but I wouldn't push the point too hard because confusing generously with idiocy would be your first mistake as history has shown with every civilisation prior to this one. For example http://en.wikipedia.org/wiki/Decline_of_the_Roman_Empire

    7. Re:The brightest minds of a generation by PhamNguyen · · Score: 2

      Capitalist economies always tend to work in strange ways. The first European explorers went in search of trivial luxury items like pepper. When you let people spend their money on precisely what they want, they often spend it in ways that don't seem to match up with what a rational person's wants and needs would seem to be.

      Ads make money because people, for whatever reason, choose to click on ads. In the future, is is possible that people will prefer to pay a flat fee and see no ads? I think this is very likely, but we are not at the stage now, and so ads play a vital role in the economy, forming a kind of implicit micro-payment system.

    8. Re:The brightest minds of a generation by perryizgr8 · · Score: 0

      they most definitely are.

      --
      Wealth is the gift that keeps on giving.
    9. Re:The brightest minds of a generation by turp182 · · Score: 1

      Quote: "[it] is possible that people will prefer to pay a flat fee and see no ads?"

      You are describing cable in the early 1980s, there were no commercials. Where are we now?

      As long as there is something to market, there will be ads. Shoot, I was paying $100 a year for the Wall Street Journal online (great newspaper) and there were still ads (not that I saw them much thanks to AdBlock and Ghostery).

      Even the premium cable channels have ads, except they are for their own shows/movies so it's not so bad (in this case it's nice to know when True Blood will start back up).

      Now if you can make advertisements entertaining (think Old Spice, I would never use the stuff but I watch their commercials) then that's another story. It's basically reverse product-placement, and sometimes quite watchable.

      --
      BlameBillCosby.com
    10. Re:The brightest minds of a generation by tyrione · · Score: 1

      they most definitely are.

      Keep deluding yourself into thinking it is so.

  2. Kind of like Google 10-15 years ago? by xxxJonBoyxxx · · Score: 4, Insightful

    >> give users the ability to search...data via natural-language queries

    Kind of like Google and any other search engine that's caught on since. Cool story, bro. Can anyone explain to me why Facebook thought that its search function v 2.0 deserved its own name - and not a very sexy one at that? ("Graph search?" OK...that's Facebook for math nerds, right?)

    1. Re:Kind of like Google 10-15 years ago? by game+kid · · Score: 1

      As long as they don't break +word searches in the name of The Social(tm), I guess it's an improvement over Google.

      --
      You can hold down the "B" button for continuous firing.
  3. What? by Anonymous Coward · · Score: 0

    Google can already tell the difference. How is this ambitious?

    1. Re:What? by Anonymous Coward · · Score: 1

      Because Facebook's charter allows them to be evil.

  4. It wasn't that hard by ArsonSmith · · Score: 1

    They just compared Slashdot articles to what they were actually suppose to be. After feeding a few years of Slashdot into it they pretty much had every error possible indexed and understood.

    --
    Paying taxes to buy civilization is like paying a hooker to buy love.
    1. Re:It wasn't that hard by Anonymous Coward · · Score: 0

      After feeding a few years of Slashdot into it they pretty much had every error possible indexed and understood.

      You mean like people thinking it's "suppose" to be, instead of "supposed"?

    2. Re:It wasn't that hard by ArsonSmith · · Score: 1

      Exactly!

      --
      Paying taxes to buy civilization is like paying a hooker to buy love.
  5. Punctuation Facebook. Do you speak it? by fahrbot-bot · · Score: 4, Funny

    A Panda walks into a bar ...

    • ... eats, shoots and leaves.
    • ... eats shoots and leaves.
    --
    It must have been something you assimilated. . . .
  6. Predefined grammar... by Anonymous Coward · · Score: 0

    They use predefined grammar and don't allow free form queries, that's very natural...

  7. Fine until.. by Anonymous Coward · · Score: 0

    It's fine and dandy until you try to implement internationalization. You know, the majority in Facebook don't speak English..

  8. Tell us what you really think by omems · · Score: 1

    It shows what they think of users right in the pseudocode:
    "In loose terms, the grammar consists of a set of production rules that generate more specific expressions from abstract symbols:
    start -> users $1
    users => user $1
    start => photos $1"

  9. Stackoverflow posts... by Anonymous Coward · · Score: 0

    Stackoverflow responses fall into two categories:

    1) why would you want to do that?!?
    2) just use boost. it knows all, does all.

  10. Very limited search capabilities by adisakp · · Score: 3, Insightful

    You can't even search your past posts or friends posts for keywords or by a date range... and those seem like "easy" data searches.

  11. I blame Chomsky. by JimtownKelly · · Score: 1

    Facebook also introduced something called “parameterization” ? My hiny. Those tree diagrams come straight out of transformational linguistics.

    --
    -- Jimtown Kelly
  12. Natural Language My Ass by Anonymous Coward · · Score: 0

    Natural Language My Ass
    Most rudimentary NL capabilities ever.

  13. i'll take keywords over natural anyday by Anonymous Coward · · Score: 0

    eom eom eom

  14. Facebook Graph search is a liberal myth by Anonymous Coward · · Score: 0

    Does anyone actually have access to it yet? I've been on the waiting list for ages.

    If I can't actually use it, I'm kind of of the opinion that they can shut the hell up about it.

    At this point, they could post an article, "How Facebook Managed to build Thought-control into Graph Search", like anyone could deny it.

    1. Re:Facebook Graph search is a liberal myth by CannonballHead · · Score: 1

      I do have it. It's not that great. My first searches yielded nothing... it seems you kinda have to use specifically crafted English that makes sense to Facebook... or, at least, choose from the list of search suggestions. That said, it's handy to be able to string multiple search filters together (like, My friends that went to with who like pizza)

  15. Taken for granted by r0kk3rz · · Score: 1

    Although human beings think nothing of speaking in 'natural' language, a machine must not only learn all the grammatical building-blocks we take for granted—it needs to compensate for the quirks and errors that inevitably pop up in the course of speech.

    Excuse me? Humans spend years learning 'natural-language', and even then it is frequently misinterpreted or used incorrectly. Natural language is difficult to say the least.

  16. Priorities by Anonymous Coward · · Score: 0

    Yet I still can't search for people who graduated from my high school the same year as me (without looking through EVERY person who went to the school in the past 50+ years, or searching by name). University is even worse. My small HS graduated 150-250 people per year, I went to a university that graduates one or two hundred times that per year.

  17. Let me guess by FiveLights · · Score: 1

    They asked Jeeves?

  18. Right... and we never had to learn languages? by 1800maxim · · Score: 1

    Although human beings think nothing of speaking in 'natural' language, a machine must not only learn all the grammatical building-blocks we take for granted—it needs to compensate for the quirks and errors that inevitably pop up in the course of speech.

    We, humans, had to "learn" to speak, and the process began at a very young age - at birth (or some say even before that). We only take it for granted because we managed to learn and excel at languages.

    We also need to compensate for the quirks and errors that inevitably pop up. Hang around Slashdot, and you'll read story summaries that will test this ability to the limits.

    The difference is that we do self-learn, and machines do not (at this point).