def check_load_taxonomy_data(max_items=None): """Load the tables from the source archives Leave max_items to None for processing the complete dumps. """ updated = pg.check_link_table( "redirects", "redirects", predicate_filter="http://dbpedia.org/ontology/wikiPageRedirects", max_items=max_items) updated &= pg.check_link_table( "skos_categories", "categories", predicate_filter="http://www.w3.org/2004/02/skos/core#broader", columns=( ('id', True), ('broader', True), ('candidate_article', True), ), processor=candidate_article_processor, max_items=max_items) updated &= pg.check_link_table( "article_categories", "article_categories", predicate_filter="http://purl.org/dc/terms/subject") if updated: pg.execute("ANALYZE")
def check_load_examples_data(max_items): """Load the abstract data Leave max_items to None for processing the complete dumps. """ updated = pg.check_text_table("long_abstracts", "long_abstracts", max_items=max_items) if updated: pg.execute("ANALYZE")
def check_load_examples_data(max_items): """Load the abstract data Leave max_items to None for processing the complete dumps. """ updated = pg.check_text_table( "long_abstracts", "long_abstracts", max_items=max_items) if updated: pg.execute("ANALYZE")
def check_load_taxonomy_data(max_items=None): """Load the tables from the source archives Leave max_items to None for processing the complete dumps. """ updated = pg.check_link_table( "redirects", "redirects", predicate_filter="http://dbpedia.org/ontology/wikiPageRedirects", max_items=max_items ) updated &= pg.check_link_table( "skos_categories", "categories", predicate_filter="http://www.w3.org/2004/02/skos/core#broader", columns=(("id", True), ("broader", True), ("candidate_article", True)), processor=candidate_article_processor, max_items=max_items, ) updated &= pg.check_link_table( "article_categories", "article_categories", predicate_filter="http://purl.org/dc/terms/subject" ) if updated: pg.execute("ANALYZE")