Loading...
Given a list of known entities and their types, tag each word in a sentence with its entity type using BIO format.
Input format:
BIO format: B-TYPE for the first word of an entity, O for non-entities. For simplicity, all entities are single words.
Output: Space-separated tags, one per word.
2 John PERSON Google ORG John works at Google
B-PERSON O O B-ORG
Step 1: Build entity lookup john → PERSON, google → ORG
Step 2: Tag each word "John" → found as PERSON → B-PERSON "works" → not found → O "at" → not found → O "Google" → found as ORG → B-ORG