f00bbc9ca76a4a1fd9ddc46954a76237ecd4c616,iky_server/try.py,,extract_chunks,#Any#,16

Before Change


    for s, tp in tagged_sent:
        if tp != "O":
            if tp.endswith(chunk_type):
                if not tp.startswith("B"):
                    grp2 = tp
                    grp1.append(s)
                else:
                    if grp1:
                        yield " ".join(grp1), "-".join(grp2)
                    grp1, grp2 = [s], [str(ind)]
    yield " ".join(grp1), grp2

l = [("my", "o"), ("name", "B-DOMAIN"), ("is", "o"), ("Alfred", "B-NAME"),
 ("Francis", "I-NAME")]

After Change


            label = tp[2:]
            if tp.startswith("B"):
                labeled[label] = s
            elif tp.startswith("I") and (label not in labels) :
                labels.append(label)
                labeled[label] = s
            elif (tp.startswith("I") and (label in labels)):
                labeled[label] += " %s"%s
    return labeled
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: alfredfrancis/ai-chatbot-framework
Commit Name: f00bbc9ca76a4a1fd9ddc46954a76237ecd4c616
Time: 2016-05-21
Author: alfred.francis@pearldatadirect.com
File Name: iky_server/try.py
Class Name:
Method Name: extract_chunks


Project Name: akkana/scripts
Commit Name: 1c5022cf24af600351183513af494366f96652ec
Time: 2018-10-15
Author: akkana@shallowsky.com
File Name: phonewords.py
Class Name:
Method Name: find_dups


Project Name: andresriancho/w3af
Commit Name: 69ff07c2bf368ebc0d6f0700a9735451ed851999
Time: 2018-01-02
Author: andres.riancho@gmail.com
File Name: w3af/plugins/audit/global_redirect.py
Class Name: global_redirect
Method Name: _javascript_redirect