def main(path_to_serialized_model): print('Loading: ' + str(path_to_serialized_model)) network = fieldnetwork.deserialize_network(path_to_serialized_model) api = API(network) api.init_store() ip_shell = InteractiveShellEmbed(banner1=init_banner, exit_msg=exit_banner) ip_shell()
def test_ranking_certainty_chem(self): path = '../models/chemical/' network = deserialize_network(path) api = API(network) api.init_store() table = 'activities' table_drs = api.drs_from_table(table) sim_tables = api.similar_content_to(table_drs) sim_tables.rank_certainty() print("All columns CERTAINTY: ") sim_tables.pretty_print_columns_with_scores() print("") print("All tables CERTAINTY: ") sim_tables.print_tables_with_scores() print("") sim_tables.rank_coverage() print("All columns COVERAGE: ") sim_tables.pretty_print_columns_with_scores() print("") print("All tables COVERAGE: ") sim_tables.print_tables_with_scores() print("")
def init_system(path_to_serialized_model, reporting=True): print_md('Loading: *' + str(path_to_serialized_model) + "*") sl = time.time() network = fieldnetwork.deserialize_network(path_to_serialized_model) api = API(network) if reporting: reporting = Report(network) api.init_store() api.help() el = time.time() print("Took " + str(el - sl) + " to load all data") return api, reporting