a871536bcbb38b9ca03b0bc777712d8c0a79ad90,matchzoo/data_pack/pack.py,,pack,#Any#,17
Before Change
col_all = ["id_left", "id_right", "text_left", "text_right"]
col_relation = ["id_left", "id_right"]
if _has_label(data):
col_relation.append("label")
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.
After Change
id_right = df["id_right"]
// 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]
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: streamlit/streamlit
Commit Name: 0fe228aa0bf5479458a68bf90b4430885410bd92
Time: 2018-10-22
Author: thiagot@gmail.com
File Name: lib/streamlit/DeckGlChart.py
Class Name:
Method Name: marshall
Project Name: autonomio/talos
Commit Name: 1e0dc41ed1a7346076f32741323049b631f93e6e
Time: 2019-03-07
Author: mailme@mikkokotila.com
File Name: talos/scan/scan_finish.py
Class Name:
Method Name: scan_finish