0cc7c20d37f76139f27ce171b1dd9289c922efbd,stanfordnlp/models/ner/utils.py,,is_bio_scheme,#Any#,5

Before Change


    
    Check all tags to see if BIO tagging scheme is used. Return True if so.
    
    all_prefix = set([t[0].lower() for t in all_tags])
    if all_prefix == set(["b", "i", "o"]):
        return True
    else:

After Change


    Check if BIO tagging scheme is used. Return True if so.
    
    for tag in all_tags:
        if tag == "O":
            continue
        elif len(tag) > 2 and tag[:2] in ("B-", "I-"):
            continue
        else:
            return False
    return True

def to_bio2(tags):
    
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: stanfordnlp/stanza
Commit Name: 0cc7c20d37f76139f27ce171b1dd9289c922efbd
Time: 2019-12-18
Author: zyh@stanford.edu
File Name: stanfordnlp/models/ner/utils.py
Class Name:
Method Name: is_bio_scheme


Project Name: mlflow/mlflow
Commit Name: 4f9fc9b8698c84f7a7281a2692657a2f1c1368d6
Time: 2020-06-30
Author: 52183359+ankitmathur-db@users.noreply.github.com
File Name: mlflow/utils/search_utils.py
Class Name: SearchUtils
Method Name: _parse_order_by_string


Project Name: deepmipt/DeepPavlov
Commit Name: cb0c025ab87216d35b68a2b4b36d61621acd76ba
Time: 2018-01-31
Author: arkhipov@yahoo.com
File Name: deeppavlov/models/ner/slotfill.py
Class Name: DstcSlotFillingNetwork
Method Name: infer