340d46fde1be0940629c93004d453cef65b09442,bin/auto_name_variants.py,,,#,101

Before Change


    for (cfirst, clast), names in sorted(clusters.items(), key=lambda i: (normalize(i[0][1]), normalize(i[0][0]))):
        if len(names) > 1 or print_singletons:
            if print_papers:
                comment = " // " + paperlist(papers[cfirst, clast])
            print()
            print("- canonical: {{first: {}, last: {}}}{}".format(cfirst, clast, comment))
        if len(names) > 1:
            print("- variants:")
            for first, last in names:
                if (first, last) == (cfirst, clast): continue
                if print_papers:
                    comment = " // " + paperlist(papers[first, last])
                print("  - {{first: {}, last: {}}}{}".format(first, last, comment))

After Change


            d["papers"] = " ".join(p)
        return d

    doc = []
    for (cfirst, clast), names in sorted(clusters.items(), key=lambda i: (normalize(i[0][1]), normalize(i[0][0]))):
        if len(names) > 1 or print_singletons:
            person = {}
            person["canonical"] = makename(cfirst, clast)
            doc.append(person)
            if len(names) > 1:
                person["variants"] = []
                for first, last in names:
                    if (first, last) == (cfirst, clast): continue
                    person["variants"].append(makename(first, last))

    print(yaml.dump(doc, allow_unicode=True), end="")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: acl-org/acl-anthology
Commit Name: 340d46fde1be0940629c93004d453cef65b09442
Time: 2019-03-28
Author: dchiang@nd.edu
File Name: bin/auto_name_variants.py
Class Name:
Method Name:


Project Name: DT42/BerryNet
Commit Name: 7633670d154df78fe56e4b2f9614ceaf3888e0fe
Time: 2018-02-08
Author: bofu@dt42.io
File Name: inference/classify_movidius_server.py
Class Name:
Method Name: server


Project Name: acl-org/acl-anthology
Commit Name: bfd66ac88c9f4d337150db9353a5247634633f57
Time: 2019-03-26
Author: dchiang@nd.edu
File Name: bin/auto_name_variants.py
Class Name:
Method Name: