几种主要的序列标注方式:BIO、BIOSE、IOB


序列标注的方法中有多种标注方式,其中最常见的标注方式是:BIO、BIOSE和IOB 。下面我们来介绍一下。

BIO

  • B stands for 'beginning' (signifies beginning of an Named Entity, i.e. NE)
  • I stands for 'inside' (signifies that the word is inside an NE)
  • O stands for 'outside' (signifies that the word is just a regular word outside of an NE)

BIOES

  • B stands for 'beginning' (signifies beginning of an NE)
  • I stands for 'inside' (signifies that the word is inside an NE)
  • O stands for 'outside' (signifies that the word is just a regular word outside of an NE)
  • E stands for 'end' (signifies that the word is the end of an NE)
  • S stands for 'singleton'(signifies that the single word is an NE )

IOB(即IOB-1)

IOB与BIO字母对应的含义相同,其不同点是IOB中,标签B仅用于两个连续的同类型命名实体的边界区分,不用于命名实体的起始位置,这里举个例子:

词序列:(word)(word)(word)(word)(word)(word)

IOB标注:(I-loc)(I-loc)(B-loc)(I-loc)(o)(o)

BIO标注:(B-loc)(I-loc)(B-loc)(I-loc)(o)(o)

The IOB scheme is similar to the BIO scheme,however, here the tag B- is only used to start a segment if the previous token is of the same class but is not part of the segment.

因为IOB的整体效果不好,所以出现了IOB-2,约定了所有命名实体均以B tag开头。这样IOB-2就与BIO的标注方式等价了。

总结

  • IOB因为缺少B-tag作为实体标注的头部表示,丢失了部分标注信息,导致很多任务上的效果不佳
  • BIO解决了IOB的问题,所以整体效果优于IOB
  • BIOES额外提供了End的信息,并给出了单个词汇的S-tag,提供了更多的信息,可能效果更优,但其需要预测的标签更多(多了E和S),效果也可能受到影响。

下面来看一下各个标注方法的效果比较:
先来看一下数据集,都是比较经典的序列标注数据集,第一列是任务类型:
image
数据集介绍

接下来看一下各个标注方法的效果(这些数字均为多次实验采样的结果):
image
标注方法的效果比对

结论:

  • 可以看到IOB表现很糟糕,大多数情况下,直接用BIO就可以了;
  • BIO和BIOES各有优劣,网上也有一些小伙伴反馈说:BIO和BIOES在很多任务上的表现差异不大,可能是小数点后3-4位的差别。
  • 所有上述结果均为英文数据集上的结果,中文数据上暂无对比结果。

posted on 2021-09-01 23:30  朴素贝叶斯  阅读(4257)  评论(1编辑  收藏  举报

导航