Exemple #1
0
    def generate_statistics(self):
        '''
        This pipeline step takes the data from the triple store and generate
        some statistics out of it
        '''
        statsGenerator = StatsGenerator(self._conf.get_SPARQL(),
                                self._conf.get_graph_name('raw-data'),
                                self._conf.get_graph_name('rules'),
                                self._conf.get_graph_name('release'))

        # Go !
        statsGenerator.go('stats.html')
Exemple #2
0
    def generate_statistics(self):
        '''
        This pipeline step takes the data from the triple store and generate
        some statistics out of it
        '''
        statsGenerator = StatsGenerator(self._conf.get_SPARQL(),
                                        self._conf.get_graph_name('raw-data'),
                                        self._conf.get_graph_name('rules'),
                                        self._conf.get_graph_name('release'))

        # Go !
        statsGenerator.go('stats.html')
Exemple #3
0
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
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')