source/dataparsing/text_tagging.py
def compare_citation_and_text_terms(tags,
                                    unique_terms_citations_CD,
                                    unique_terms_citations_JJ,
                                    unique_terms_citations_NN,
                                    unique_terms_citations_NNP,
                                    if_detect_NNP = False,
                                    if_detect_JJ = False, 
                                    if_detect_NN = False,
                                    if_detect_CD = False):
    """Compare unique citation terms of specific type and article text of the same type"""
    text_JJ = []
    text_NN = []
    text_NNP = []
    text_CD = []
    if if_detect_JJ:
        text_JJ = tag_text_of_type("JJ", tags)
        tags = tag_comparisons(text_JJ, unique_terms_citations_JJ, tags)
    if if_detect_NNP:
        text_NNP = tag_text_of_type("NNP", tags)
        tags = tag_comparisons(text_NNP, unique_terms_citations_NNP, tags)
    if if_detect_NN:
        text_NN = tag_text_of_type("NN", tags)
        tags = tag_comparisons(text_NN, unique_terms_citations_NN, tags)
    if if_detect_CD:
        text_CD = tag_text_of_type("CD", tags)
        tags = tag_comparisons(text_CD, unique_terms_citations_CD, tags)
    return tags
Compare unique citation terms of specific type and article text of the same type
Compare unique citation terms of specific type and article text of the same type
Compare unique citation terms of specific type and article text of the same type
def compare_citation_and_text_terms(tags,
                                    unique_terms_citations_CD,
                                    unique_terms_citations_JJ,
                                    unique_terms_citations_NN,
                                    unique_terms_citations_NNP,
                                    if_detect_NNP = False,
                                    if_detect_JJ = False, 
                                    if_detect_NN = False,
                                    if_detect_CD = False):
    text_JJ = []
    text_NN = []
    text_NNP = []
    text_CD = []
    if if_detect_JJ:
        text_JJ = tag_text_of_type("JJ", tags)
        tags = tag_comparisons(text_JJ, unique_terms_citations_JJ, tags)
    if if_detect_NNP:
        text_NNP = tag_text_of_type("NNP", tags)
        tags = tag_comparisons(text_NNP, unique_terms_citations_NNP, tags)
    if if_detect_NN:
        text_NN = tag_text_of_type("NN", tags)
        tags = tag_comparisons(text_NN, unique_terms_citations_NN, tags)
    if if_detect_CD:
        text_CD = tag_text_of_type("CD", tags)
        tags = tag_comparisons(text_CD, unique_terms_citations_CD, tags)
    return tags
def compare_citation_and_text_terms ( tags , unique_terms_citations_CD , unique_terms_citations_JJ , unique_terms_citations_NN , unique_terms_citations_NNP , if_detect_NNP = False , if_detect_JJ = False , if_detect_NN = False , if_detect_CD = False ) : text_JJ = [ ] text_NN = [ ] text_NNP = [ ] text_CD = [ ] if if_detect_JJ : text_JJ = tag_text_of_type ( "JJ" , tags ) tags = tag_comparisons ( text_JJ , unique_terms_citations_JJ , tags ) if if_detect_NNP : text_NNP = tag_text_of_type ( "NNP" , tags ) tags = tag_comparisons ( text_NNP , unique_terms_citations_NNP , tags ) if if_detect_NN : text_NN = tag_text_of_type ( "NN" , tags ) tags = tag_comparisons ( text_NN , unique_terms_citations_NN , tags ) if if_detect_CD : text_CD = tag_text_of_type ( "CD" , tags ) tags = tag_comparisons ( text_CD , unique_terms_citations_CD , tags ) return tags
Compare unique citation terms of specific type and article text of the same type
Compare unique citation terms of specific type and article text of the same type
"""Compare unique citation terms of specific type and article text of the same type"""
tags
unique_terms_citations_CD
unique_terms_citations_JJ
unique_terms_citations_NN
unique_terms_citations_NNP
if_detect_NNP
if_detect_JJ
if_detect_NN
if_detect_CD