what is BIO Tags for creating custom NER Named entity recognization?

I want to create custom NER Named entity recognition but im confused with this part of what is BIO Tags .Can any please explain the steps for creating NER anda bout this B,I,O tag .

It is easy. You need to tag a phrase using B (Begin), I (Interior), and E (End). For example, you want to tag "United States of America" as the name of a country. You will tag likes:

United(B_Country) States(I_Country) of(I_Country) America(E_Country)


In the same text if you find "Islamic Republic of Iran", you will tag likes:

Islamic(B_Country) Republic(I_Country) of(I_Country) Iran(E_Country)


Also, you will tag "United Kingdom" likes:

United(B_Country) Kingdom(E_Country)


Therefore, for every label that you have in the label set, you will have three labels in the tagging that is B_LabelName, I_LabelName, and E_LabelName.

Notice that In some tagging systems, also uses from I_LabelName instead of E_LabelName.

Now, what is "O"? In some cases the all part of the phrase is not in the label but comming in the middle of the phrase and we need to say it is out ("O") of the label. For example, in the text analysis we want to take out "of" from country names. Hence we will tag "United States of America" like the following:

United(B_Country) States(I_Country) of(O_Country) America(E_Country/I_Country)

• +1, but the case of O is mostly for anything outside of a NE, not only in the middle of a NE. It's the default category, since most words in a text are not part of a NE. – Erwan Nov 20 at 0:48
• Thank you .but what if i have a long sentence with multiple tokens to tag ? " football wold cup was played between brazil and united states of america in oylmpics statidum " ho do i do the O tagging here ? why is is BIO tag really necessary for NER ? – Aj_MLstater Nov 20 at 5:43
• @Aj_MLstater no difference. "O" is used for the cases that you cannot assign a tag from the tag set to a word. – OmG Nov 20 at 12:20