命名实体识别 实体抽取
Named entity recognition is the task of categorizing text into entities, such as people, locations, and dates. For example, for the sentence, On April 30, 1789, George Washington was inaugurated as the first president of the United States
, this sentence may be tagged with the following entities:
命名实体识别是将文本分类为实体的任务,例如人物,位置和日期。 例如,对于On April 30, 1789, George Washington was inaugurated as the first president of the United States
宣告On April 30, 1789, George Washington was inaugurated as the first president of the United States
,该句子可能带有以下实体标记:
You might be thinking, okay exactly how is this useful? Well, there are many potential uses of named entity recognition, but one is being able to make a database easily searchable. You might be thinking, why would I need to tag entities to make a database easily searchable? Can’t I just use a simple dictionary lookup to exactly match terms? Well, yes, you can, but this is far from ideal and just to show you how ineffective searches can be without named entity recognition, let’s walk through a real life example.
您可能会想,好吧,这到底有什么用? 好的,命名实体识别有许多潜在用途,但是其中一个功能是使数据库易于搜索。 您可能在想,为什么我需要标记实体以使数据库易于搜索? 我不能只使用简单的字典查找来完全匹配术语吗? 是的,可以,但是这远非理想,只是为了向您展示在没有命名实体识别的情况下如何进行无效搜索,让我们来看一个真实的例子。
例 (Example)
Recently I was ordering food at my local grocery store, Weis Markets, and was trying to add to my cart Perdue frozen chicken fingers. So I typed into the search bar:
最近,我在当地的杂货店Weis Markets点菜,并试图将Perdue冷冻鸡手指添加到我的购物车中。 所以我输入了搜索栏:
To my disappointment, my search did not yield any results:
令我失望的是,我的搜索没有得到任何结果:
At first I thought they may have been out of stock, but after searching for several other items, I kept getting no results. After awhile, I started to suspect that Weis’s search engine was only able to find search terms that almost exactly matched the product label (Note: I do not actually know the machinery behind Weis’s search engine). So I looked up on Google what the chicken fingers I wanted were exactly called and I realized they are called chicken tenders not fingers (of course!). So I typed perdue chicken tenders
into the search box and it worked! I was then successfully able to add the chicken fingers to my cart.
起初我以为它们可能没货了,但是在搜索了其他几项之后,我一直没有得到任何结果。 一段时间后,我开始怀疑Weis的搜索引擎只能找到几乎与产品标签完全匹配的搜索词(注意:我实际上并不知道Weis搜索引擎背后的机制)。 因此,我在Google上查到了我想要的鸡手指的确切名称,然后我意识到它们被称为鸡肉嫩而不是手指 (当然!)。 因此,我在搜索框中输入了perdue chicken tenders
,它起作用了! 然后,我成功地将鸡手指添加到购物车中。
I was happy that I was able to add the chicken fingers to my cart, but this was a lot of work to just find one item and I had this same issue with several other items. This made Weis’s online shopping almost unusable! Since then I have not purchased groceries online from this store — it’s just too much work.
我很高兴能够将鸡爪添加到购物车中,但是要找到一个项目却需要很多工作,而其他几个项目也遇到了同样的问题。 这使得Weis的在线购物几乎无法使用! 从那以后,我再也没有从这家商店在线购买杂货了-太累了。
解决方案 (The Solution)
Fortunately for Weis Market, there is a somewhat easy fix to their search engine issue and that is to use named entity recognition. With named entity recognition, the search engine should automatically tag each of the entities. For example, when I typed in perdue chicken fingers
it should have tagged Perdue
as the brand and chicken fingers
as chicken tender (I am not not an expert in food categories, so I do not actually know if chicken tender would be a useful category).
幸运的是,对于Weis Market而言,可以轻松解决其搜索引擎问题,即使用命名实体识别。 使用命名实体识别,搜索引擎应自动标记每个实体。 例如,当我键入perdue chicken fingers
,应该将Perdue
标记为品牌,并且将chicken fingers
标记为鸡嫩(我不是食品类别的专家,所以我实际上不知道鸡嫩是否会是有用的类别) 。
Then, this would search through a database, where each item has been previously tagged. So the actual chicken fingers I wanted may have been previously tagged with the following categories: brand=Perdue; food=chicken tender; frozen, fresh, canned: frozen.
然后,这将在数据库中进行搜索,每个项目之前都已在其中进行了标记。 因此,我之前想要的实际鸡手指可能以前被标记了以下类别: brand = Perdue; 食物 =鸡肉嫩; 冷冻,新鲜,罐头 :冷冻。
With the use of these entities and a structured database, my search for perdue chicken fingers
would have matched Perdue
as the brand and chicken tender
as the food and would likely have included the chicken fingers I wanted in my search results.
通过使用这些实体和结构化的数据库,我对perdue chicken fingers
搜索将与Perdue
作为品牌,而将chicken tender
作为食品,并且可能将我想要的鸡手指包括在搜索结果中。
结论 (Conclusions)
So as you can see, named entity recognition can be extremely useful and is almost essential for some products. You can imagine all the possible other uses besides creating a search engine for a grocery store (e.g., recommending similar online articles based upon tagged entities, creating an easily searchable database of interview transcripts, etc.). Something I have not mentioned in this post is the machine learning approaches that may be used to actually conduct the named entity recognition task (in the example, the task of tagging entities in the search perdue chicken fingers
). This is the first installment of a series of blog posts about named entity recognition and the next post will go more into the technical details. Lastly, if you think your company may benefit from named entity recognition, feel free to reach out to me — my contact information may be found on my website.
如您所见,命名实体识别可能非常有用,并且对于某些产品几乎是必不可少的。 您可以想象除了为杂货店创建搜索引擎之外,所有其他可能的用途(例如,基于标记的实体推荐类似的在线文章,创建易于搜索的采访记录数据库等)。 我在这篇文章中没有提到的是机器学习方法,可用于实际执行命名实体识别任务(在本示例中,是在搜索perdue chicken fingers
中标记实体的任务)。 这是有关命名实体识别的一系列博客文章的第一部分,下一篇文章将进一步介绍技术细节。 最后,如果您认为您的公司可以从命名实体的认可中受益,请随时与我联系-我的联系信息可以在我的网站上找到 。
翻译自: https://towardsdatascience.com/why-your-company-should-care-about-named-entity-recognition-e00de2f45700
命名实体识别 实体抽取
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/242124.shtml
如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!