get_relation_count_df

get_relation_count_df(dataset: Dataset, merge_subsets: bool = True, add_labels: bool = True) DataFrame[source]

Create a dataframe with relation counts.

Parameters:
  • dataset (Dataset) – The dataset.

  • add_labels (bool) – Whether to add relation labels to the dataframe.

  • merge_subsets (bool) – Whether to merge subsets, i.e., train/validation/test.

  • add_labels – Whether to add entity / relation labels.

Returns:

A dataframe with columns (relation_id, count, relation_label?, subset?)

Return type:

DataFrame