食品信息提取

时间:2013-04-24 17:39:20

标签: nlp information-extraction

我正在与美国农业部的营养数据库合作,其食品的描述如下:

例如:

Cheese, fontina
Cheese, cheddar
Cheese, cottage, lowfat, 2% milkfat
Cheese, cottage, lowfat, 1% milkfat
Apples, raw, with skin
Apples, dried, sulfured, uncooked
Apples, frozen, unsweetened, heated
McDONALD'S, BIG MAC (without Big Mac Sauce)
McDONALD'S, BIG MAC
Sandwiches and burgers, roast beef sandwich with cheese

这里有一个模式,逗号显然用于分隔实体。按照上面的例子,奶酪是切达干酪,山寨和fontina的父母。

我已经做了一些工作,以便从这个来源中提取信息。我以为:

  • POS标记:如果单词是形容词或动词,则不是食物名称的一部分
  • freqdist / wordcount:这是为了获得食物描述中的单词层次结构

但是当我大规模运行它时,我得到了非真空的结果。在某些描述中,POS标记失败,并且当在同一个句子中出现具有类似频率的单词时,freqdist / wordcount无用。

这是我想得到的结果的一个例子:

输入数据:

Cheese, fontina
Cheese, cheddar
Cheese, cottage, lowfat, 2% milkfat
Cheese, cottage, lowfat, 1% milkfat

输出数据:

Cheese is the parent of fontina, cottage and cheddar. lowfat is a "characteristic" cheese cottage. Cottage, cheddar and fontina are the "principal foods".

输入数据:

Sandwiches and burgers, roast beef sandwich with cheese

输出数据:

Cheese is a characteristic of roast beef sandwich. The category of the food is    sandwiches and burgers and the "principal food" is roast beef sandwich. 

我是初学者,所以我想得到一些指导。有很多关于NLP的信息,如果没有对该主题的广泛了解,很难确定要走哪条路。

1 个答案:

答案 0 :(得分:0)

这不是一个真正的NLP问题......

数据是一棵树。 将每一行视为树形图中的部分路径。第二个逗号之后的单词似乎是叶子的值。