playground/compound_disease/transfer_learning_experiment/data/label_functions/disease_gene_lf.py
def LF_DG_ASSOCIATION(c):
    """
    This LF is designed to test if there is a key phrase that suggests
    a d-g pair is an association.
    """
    if re.search(r'(?<!not )(?<!no )' + ltp(direct_association), get_text_between(c), flags=re.I):
        return 1
    elif re.search(r'(?<!not )(?<!no )' + ltp(direct_association) + r".*({{B}}|{{A}})", get_tagged_text(c), flags=re.I):
        return 1
    elif re.search(r"({{B}}|{{A}}).*(?<!not )(?<!no )" + ltp(direct_association), get_tagged_text(c), flags=re.I):
        return 1
    else:
        return 0

    This LF is designed to test if there is a key phrase that suggests
    a d-g pair is an association.
    
This LF is designed to test if there is a key phrase that suggests
a d-g pair is an association.
This LF is designed to test if there is a key phrase that suggests a d - g pair is an association .
def LF_DG_ASSOCIATION(c):
    if re.search(r'(?<!not )(?<!no )' + ltp(direct_association), get_text_between(c), flags=re.I):
        return 1
    elif re.search(r'(?<!not )(?<!no )' + ltp(direct_association) + r".*({{B}}|{{A}})", get_tagged_text(c), flags=re.I):
        return 1
    elif re.search(r"({{B}}|{{A}}).*(?<!not )(?<!no )" + ltp(direct_association), get_tagged_text(c), flags=re.I):
        return 1
    else:
        return 0
def LF_DG_ASSOCIATION ( c ) : if re . search ( r'(?<!not )(?<!no )' + ltp ( direct_association ) , get_text_between ( c ) , flags = re . I ) : return 1 elif re . search ( r'(?<!not )(?<!no )' + ltp ( direct_association ) + r".*({{B}}|{{A}})" , get_tagged_text ( c ) , flags = re . I ) : return 1 elif re . search ( r"({{B}}|{{A}}).*(?<!not )(?<!no )" + ltp ( direct_association ) , get_tagged_text ( c ) , flags = re . I ) : return 1 else : return 0
This LF is designed to test if there is a key phrase that suggests
a d-g pair is an association.
This LF is designed to test if there is a key phrase that suggests a d - g pair is an association .
"""
    This LF is designed to test if there is a key phrase that suggests
    a d-g pair is an association.
    """
c