Datasets:

Modalities:
Text
Languages:
English
Libraries:
Datasets
License:
asahi417 commited on
Commit
84a7df8
1 Parent(s): 6818f83
Files changed (1) hide show
  1. filtering_purify.py +5 -3
filtering_purify.py CHANGED
@@ -105,12 +105,14 @@ if __name__ == '__main__':
105
  df_size = pd.DataFrame([{"min entity": mef, "max predicate": mpf, "freq": x} for x, (mef, mpf) in zip(data_size_full, candidates)])
106
  df_size = df_size.pivot(index="min entity", columns="max predicate", values="freq")
107
  df_size.index.name = "min entity / max predicate"
 
 
108
  df_size_p = pd.DataFrame(
109
  [{"min entity": mef, "max predicate": mpf, "freq": len(x)} for x, (mef, mpf) in zip(p_dist_full, candidates)])
110
  df_size_p = df_size_p.pivot(index="max predicate", columns="min entity", values="freq")
111
- df_size['predicate'] = df_size_p.loc[10]
112
- df_size.to_csv("data/stats.data_size.csv")
113
- print(df_size.to_markdown())
114
 
115
  # plot predicate distribution
116
  df_p = pd.DataFrame([dict(enumerate(sorted(p.values(), reverse=True))) for p in p_dist_full]).T
 
105
  df_size = pd.DataFrame([{"min entity": mef, "max predicate": mpf, "freq": x} for x, (mef, mpf) in zip(data_size_full, candidates)])
106
  df_size = df_size.pivot(index="min entity", columns="max predicate", values="freq")
107
  df_size.index.name = "min entity / max predicate"
108
+ df_size.to_csv("data/stats.data_size.csv")
109
+ print(df_size.to_markdown())
110
  df_size_p = pd.DataFrame(
111
  [{"min entity": mef, "max predicate": mpf, "freq": len(x)} for x, (mef, mpf) in zip(p_dist_full, candidates)])
112
  df_size_p = df_size_p.pivot(index="max predicate", columns="min entity", values="freq")
113
+ df_size_p = df_size_p.loc[10]
114
+ df_size_p.to_csv("data/stats.predicate_size.csv")
115
+ print(df_size_p.to_markdown())
116
 
117
  # plot predicate distribution
118
  df_p = pd.DataFrame([dict(enumerate(sorted(p.values(), reverse=True))) for p in p_dist_full]).T