a871536bcbb38b9ca03b0bc777712d8c0a79ad90,matchzoo/data_pack/pack.py,,pack,#Any#,17

Before Change


    // Segment input into 3 dataframes.
    relation = df[col_relation]

    left = df[["id_left", "text_left"]].drop_duplicates(["id_left"])
    left.set_index("id_left", inplace=True)
    // Infer the length of the text left
    // left["length_left"] = left.apply(lambda r: len(r["text_left"]), axis=1)

After Change



    // Build Relation
    relation = pd.DataFrame(data={"id_left": id_left, "id_right": id_right})
    for col in df:
        if col not in ["id_left", "id_right", "text_left", "text_right"]:
            relation[col] = df[col]

    // Build Left and Right
    left = _merge(df, id_left, "text_left", "id_left")
    right = _merge(df, id_right, "text_right", "id_right")
    return matchzoo.DataPack(relation, left, right)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: NTMC-Community/MatchZoo
Commit Name: a871536bcbb38b9ca03b0bc777712d8c0a79ad90
Time: 2018-12-13
Author: i@uduse.com
File Name: matchzoo/data_pack/pack.py
Class Name:
Method Name: pack


Project Name: nilmtk/nilmtk
Commit Name: e5cc77e560d2520861a7ce3aec1f6feda4441c9e
Time: 2018-12-16
Author: 10246101+PMeira@users.noreply.github.com
File Name: nilmtk/dataset_converters/greend/convert_greend.py
Class Name:
Method Name: convert_greend


Project Name: gboeing/osmnx
Commit Name: bc844551d6d2829668b9ed8dd5cee3ffdb48f0d8
Time: 2020-07-01
Author: boeing@usc.edu
File Name: osmnx/utils_geo.py
Class Name:
Method Name: _intersect_index_quadrats