get_entity_relation_co_occurrence_df

get_entity_relation_co_occurrence_df(dataset, merge_sides=True, merge_subsets=True, add_labels=True)[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.

Return type:

DataFrame

Returns:

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