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

Before Change


        col_all.append("label")

    // prepare data pack.
    df = pd.DataFrame(data, columns=col_all)
    df.fillna("missing")  // avoid tokenization exception.

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

After Change


        3     L-2         C      R-2          c      0

    
    if "text_left" not in df or "text_right" not in df:
        raise ValueError(
            "Input data frame must have `text_left` and `text_right`.")

    // Gather IDs
    if "id_left" not in df:
        id_left = _gen_ids(df, "text_left", "L-")
    else:
        id_left = df["id_left"]
    if "id_right" not in df:
        id_right = _gen_ids(df, "text_right", "R-")
    else:
        id_right = df["id_right"]

    // Build Relation
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

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: NifTK/NiftyNet
Commit Name: 223bce2eb5903bf58a12250f3ea5585c33a7778e
Time: 2019-06-05
Author: carole.sudre@kcl.ac.uk
File Name: niftynet/contrib/csv_reader/csv_reader.py
Class Name: CSVReader
Method Name: initialise


Project Name: ClimbsRocks/auto_ml
Commit Name: 343a835a26b6fbf1b7bd62965b74ed2d688319a5
Time: 2016-12-08
Author: ClimbsBytes@gmail.com
File Name: auto_ml/utils_ensemble.py
Class Name: Ensemble
Method Name: get_summary_stats