获取单词类别 [英] Getting a word category

查看:18
本文介绍了获取单词类别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

Is there an API to get a word's category? e.g.,

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...

推荐答案

分类总是非常主观的.如果您希望使用主流方法,请尝试 Wordnet (http://wordnet.princeton.edu/).大多数自然语言处理工作人员都在使用它.举个例子

Categorization is always highly subjective. If you wish to use mainstream appproaches, try Wordnet (http://wordnet.princeton.edu/). It's used by most workers in Natural Language Processing. Here's an example

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"是一个更广泛的术语,可以用作一个类别.

Note that "hypernym" is a broader term and can be used as a category.

对于人们,您可以尝试维基百科并抓取信息框(没什么好玩的 - 我花了很多时间做这件事).最好试试 DBPedia.

For people you can try Wikipedia and scrape the infobox (not much fun - I have spent a lot of time doing it). Better to try DBPedia.

这是杰·雷诺 (Jay Leno) 的维基百科信息框:

Here is the Wikipedia infobox for 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 捕获.如果是这样,你会得到一些很好的分类

I don't know whether that has been captured for DBPedia. If so you will get some good categorization

这篇关于获取单词类别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆