from util.configuration import Configuration from modules.reporting.stats import StatsGenerator import logging log = logging.getLogger(__name__) if __name__ == '__main__': # Configure a logger root_logger = logging.getLogger('') root_logger.setLevel(logging.INFO) logFormat = '%(asctime)s %(name)-12s %(levelname)-8s %(message)s' ch = logging.StreamHandler() ch.setFormatter(logging.Formatter(logFormat)) root_logger.addHandler(ch) # Load the configuration file config = Configuration( '/home/cgueret/Code/CEDAR/DataDump-mini-vt/config.ini') # Initialise the stats generator statsGenerator = StatsGenerator(config.get_SPARQL(), config.get_graph_name('raw-data'), config.get_graph_name('rules'), config.get_graph_name('release'), True) # Use the cache to speed up testing # Go ! statsGenerator.go('/tmp/stats.html')
import logging if __name__ == '__main__': # Load the configuration file config = Configuration('config-cedar.ini') # Configure the logger root_logger = logging.getLogger('') root_logger.setLevel(logging.DEBUG if config.verbose() else logging.INFO) logFormat = '%(asctime)s %(name)-18s %(levelname)-8s %(message)s' ch = logging.StreamHandler() ch.setFormatter(logging.Formatter(logFormat)) root_logger.addHandler(ch) fh = logging.FileHandler('rules.log') fh.setFormatter(logging.Formatter(logFormat)) root_logger.addHandler(fh) #dataset = config.getURI('cedar',"BRT_1889_02_T1-S0") #dataset = config.getURI('cedar',"VT_1869_01_H1-S0") #dataset = config.getURI('cedar','VT_1879_01_H1-S0') #dataset = config.getURI('cedar','VT_1859_01_H1-S6') dataset = 'VT_1899_07_H1-S0' # Test rulesMaker = RuleMaker(config.get_SPARQL(), dataset, "/tmp/test.ttl") rulesMaker.loadMappings( config.get_path('mappings')) #, ['Sex','MaritalStatus'] rulesMaker.loadHeaders(config.get_graph_name('raw-data')) rulesMaker.process() # ['Sex','MaritalStatus']
from util.configuration import Configuration from modules.reporting.stats import StatsGenerator import logging log = logging.getLogger(__name__) if __name__ == '__main__': # Configure a logger root_logger = logging.getLogger('') root_logger.setLevel(logging.INFO) logFormat = '%(asctime)s %(name)-12s %(levelname)-8s %(message)s' ch = logging.StreamHandler() ch.setFormatter(logging.Formatter(logFormat)) root_logger.addHandler(ch) # Load the configuration file config = Configuration('/home/cgueret/Code/CEDAR/DataDump-mini-vt/config.ini') # Initialise the stats generator statsGenerator = StatsGenerator(config.get_SPARQL(), config.get_graph_name('raw-data'), config.get_graph_name('rules'), config.get_graph_name('release'), True) # Use the cache to speed up testing # Go ! statsGenerator.go('/tmp/stats.html')
from util.configuration import Configuration import logging if __name__ == '__main__': # Load the configuration file config = Configuration('config-cedar.ini') # Configure the logger root_logger = logging.getLogger('') root_logger.setLevel(logging.DEBUG if config.verbose() else logging.INFO) logFormat = '%(asctime)s %(name)-18s %(levelname)-8s %(message)s' ch = logging.StreamHandler() ch.setFormatter(logging.Formatter(logFormat)) root_logger.addHandler(ch) fh = logging.FileHandler('rules.log') fh.setFormatter(logging.Formatter(logFormat)) root_logger.addHandler(fh) #dataset = config.getURI('cedar',"BRT_1889_02_T1-S0") #dataset = config.getURI('cedar',"VT_1869_01_H1-S0") #dataset = config.getURI('cedar','VT_1879_01_H1-S0') #dataset = config.getURI('cedar','VT_1859_01_H1-S6') dataset = 'VT_1899_07_H1-S0' # Test rulesMaker = RuleMaker(config.get_SPARQL(), dataset, "/tmp/test.ttl") rulesMaker.loadMappings(config.get_path('mappings')) #, ['Sex','MaritalStatus'] rulesMaker.loadHeaders(config.get_graph_name('raw-data')) rulesMaker.process() # ['Sex','MaritalStatus']