def safe_disambiguation_iteration(): from bibauthorid_tortoise import tortoise from bibauthorid_rabbit import rabbit from bibauthorid_personid_maintenance import check_personid_papers, check_results, repair_personid if not check_personid_papers(): rabbit([]) repair_personid() rabbit([]) assert check_personid_papers() tortoise() assert check_results()
def safe_disambiguation_iteration(): from bibauthorid_tortoise import tortoise from bibauthorid_rabbit import rabbit from bibauthorid_personid_maintenance import check_personid_papers \ , check_results \ , repair_personid if not check_personid_papers(): rabbit([]) repair_personid() rabbit([]) assert check_personid_papers() tortoise() assert check_results()
def run_tortoise(from_scratch): from bibauthorid_tortoise import tortoise, tortoise_from_scratch if from_scratch: tortoise_from_scratch() else: start_time = get_sql_time() tortoise_db_name = 'tortoise' last_run = get_user_log(userinfo=tortoise_db_name, only_most_recent=True) if last_run: modified = get_recently_modified_record_ids(last_run[0][2]) else: modified = [] tortoise(modified) insert_user_log(tortoise_db_name, '-1', '', '', '', timestamp=start_time)
def test_accuracy(): from bibauthorid_tortoise import tortoise from bibauthorid_rabbit import rabbit from bibauthorid_personid_maintenance import check_personid_papers \ , check_results \ , repair_personid from bibauthorid_merge import matched_claims if not check_personid_papers(): rabbit([]) repair_personid() rabbit([]) assert check_personid_papers() tortoise(pure=True) assert check_results() return matched_claims()
def run_tortoise(from_scratch): from bibauthorid_tortoise import tortoise, tortoise_from_scratch if from_scratch: tortoise_from_scratch() else: tortoise()