get_entity_relation_co_occurrence_df

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

Create a dataframe of entity/relation co-occurrence.

This information can be seen as a form of pseudo-typing, e.g. entity A is something which can be a head of born_in.

Parameters:
  • dataset (Dataset) – The dataset.

  • merge_sides (bool) – Whether to merge sides, i.e., entity positions: head vs. tail.

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

  • add_labels (bool) – Whether to add entity / relation labels.

Returns:

A dataframe of entity-relation pairs with their occurrence count.

Return type:

DataFrame