def run(xml_path):
    articles = glob.glob(os.path.join(xml_path, "*"))
    nb_articles = len(articles)
    count_a = 0
    for article in articles:
        count_a += 1
        pmid = re.sub(".xml", "", article.split("/")[-1])
        xml = fix_xml(open(article, "r").read())
        xml_parsing(xml, pmid)
def run(xml_path):
    articles = glob.glob(os.path.join(xml_path, '*'))
    nb_articles = len(articles)
    count_a = 0
    for article in articles:
        count_a +=1
        pmid = re.sub('.xml', '', article.split('/')[-1])
        xml = fix_xml(open(article, 'r').read())
        xml_parsing(xml, pmid)
示例#3
0
def run(xml_path):
    articles = glob.glob(os.path.join(xml_path, '*'))
    nb_articles = len(articles)
    for article in articles:
        pmid = re.sub('.xml', '', article.split('/')[-1])
        parse(fix_xml(open(article, 'r').read()), pmid)