获得一个单词类别

时间:2010-11-01 10:35:20

标签: api

是否有API来获取单词的类别? 例如,

word: "joke"; caetgory (retrieved from API) : "Entertainment",
word: "united states"; category(retrieved from API): "countries"
word:"jay leno"; category"celebrities(retrieved from API)", 
and so on...

1 个答案:

答案 0 :(得分:2)

分类总是非常主观的。如果您希望使用主流应用程序,请尝试使用Wordnet(http://wordnet.princeton.edu/)。它被自然语言处理中的大多数工作者使用。这是一个例子

dog, domestic dog, Canis familiaris
    => canine, canid
       => carnivore
         => placental, placental mammal, eutherian, eutherian mammal
           => mammal
             => vertebrate, craniate
               => chordate
                 => animal, animate being, beast, brute, creature, fauna

以下是“笑话”的内容

# S: (n) joke, gag, laugh, jest, jape (a humorous anecdote or remark intended to provoke laughter) "he told a very funny joke"; "he knows a million gags"; "thanks for the laugh"; "he laughed unpleasantly at his own jest"; "even a schoolboy's jape is supposed to have some ascertainable point"

    * direct hyponym / full hyponym
    * part meronym
    * direct hypernym / inherited hypernym / sister term
          o S: (n) wit, humor, humour, witticism, wittiness 
                  (a message whose ingenuity or verbal skill or 
                    incongruity has the power to evoke laughter)

请注意,“hypernym”是一个更广泛的术语,可以用作类别。

对于人们来说,你可以尝试维基百科并刮掉信息框(没那么有趣 - 我花了很多时间去做)。最好尝试DBPedia。

以下是Jay Leno的维基百科信息框:

JayLenoJul08.jpg
Leno in July 2008
Birth name  James Douglas Muir Leno
Born    April 28, 1950 (1950-04-28) (age 60)[1]
New Rochelle, New York, U.S.[1]
Medium  Television
Nationality     American
Years active    1973–present
Genres  Observational comedy
Subject(s)  Everyday life, American culture
Influences  Johnny Carson, Robert Klein, Alan King, George Carlin, Don Rickles, Bob Newhart, Rodney Dangerfield
Influenced  Dennis Miller[2]
Spouse  Mavis Leno (1980–present)
Notable works and roles     The Tonight Show with Jay Leno (host, 1992–2009)
The Jay Leno Show
(host, 2009–2010)
The Tonight Show with Jay Leno (host, 2010– )
Signature   Jay Leno Autograph.svg
Website     The Tonight Show with Jay Leno
Emmy Awards
Outstanding Variety, Music or Comedy Series
1995 The Tonight Show with Jay Leno

我不知道是否已为DBPedia捕获。如果是这样,您将获得一些良好的分类