def test_parse_patent(self):
     testdir = os.path.join(basedir, './fixtures/xml')
     xmlregex = r'ipg120327.one.xml'
     filelist = parse.list_files(testdir, xmlregex)
     grant_list = list(parse.parse_files(filelist))
     parsed_grants = list(parse.parse_patents(grant_list))
     self.assertTrue(len(parsed_grants) == len(grant_list)*len(xmlclasses))
Exemple #2
0
def run_parse():
    import parse
    import time
    import sys
    import itertools
    parsed_xmls = parse.parse_files(files)
    parsed_grants = parse.parse_patents(parsed_xmls)
    parse.build_tables(parsed_grants)
    return parse.get_inserts()