diff --git a/requirements.txt b/requirements.txt index 20487e1b..f8778227 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,6 +12,5 @@ seaborn strsim pyecharts rltk==2.0.0a20 -kgtk==0.7.1 +kgtk==1.0.1 Unidecode -pyrallel.lib==0.0.10 diff --git a/tl/features/cell_context_matches.py b/tl/features/cell_context_matches.py index 4c3a1e21..a76678ef 100644 --- a/tl/features/cell_context_matches.py +++ b/tl/features/cell_context_matches.py @@ -239,6 +239,7 @@ def initialize(self, raw_input_df, context_dict, label_column): raw_input_df['kg_labels'].fillna("", inplace=True) raw_input_df['kg_aliases'].fillna("", inplace=True) + raw_input_df['context'].fillna("", inplace=True) if self.ignore_column is not None: _input_df = raw_input_df[(raw_input_df[self.ignore_column].astype(float) == 0) @@ -386,7 +387,8 @@ def compute_property_scores(self, row_column_pairs: set, n_context_columns: set) int_prop['column'] = col int_prop['col2'] = col2 properties_df_list.append(int_prop) - properties_df = pd.concat(properties_df_list) + if len(properties_df_list) > 0: + properties_df = pd.concat(properties_df_list) property_value_list = [] grouped_obj = properties_df.groupby(['column', 'col2', 'property_']) for cell, group in grouped_obj: