:return: User input into a :class:`DataPack` with left, right and
relation..
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.
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)