77da4251e42f56316942aa33008157ada5112184,allennlp/data/dataset_readers/dataset_utils/span_utils.py,,bio_tags_to_spans,#Any#Any#,56

Before Change


            // The U tag is used to indicate a span of length 1,
            // so if there"s an active tag we end it, and then
            // we add a "length 0" tag.
            if active_conll_tag:
                spans.add((active_conll_tag, (span_start, span_end)))
            spans.add((conll_tag, (index, index)))
            active_conll_tag = None
        elif bio_tag == "B":
            // We are entering a new span; reset indices
            // and active tag to new span.
            if active_conll_tag:

After Change


    for index, string_tag in enumerate(tag_sequence):
        // Actual BIO tag.
        bio_tag = string_tag[0]
        if bio_tag not in ["B", "I", "O"]:
            raise InvalidTagSequence
        conll_tag = string_tag[2:]
        if bio_tag == "O" or conll_tag in classes_to_ignore:
            // The span has ended.
            if active_conll_tag:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: allenai/allennlp
Commit Name: 77da4251e42f56316942aa33008157ada5112184
Time: 2018-03-28
Author: markn@allenai.org
File Name: allennlp/data/dataset_readers/dataset_utils/span_utils.py
Class Name:
Method Name: bio_tags_to_spans


Project Name: shenweichen/DeepCTR
Commit Name: 8182ea386e6529a1a2294d8e2d33fc040d0cbfb2
Time: 2019-07-21
Author: wcshen1994@163.com
File Name: deepctr/inputs.py
Class Name:
Method Name: get_linear_logit


Project Name: arogozhnikov/einops
Commit Name: 680f4831e6c8f3102be8d99056b746b48ce34051
Time: 2018-09-27
Author: iamfullofspam@gmail.com
File Name: einops.py
Class Name:
Method Name: reduce