#!/usr/bin/python
# -*- coding: utf-8 -*-

from nlp_service import Service, create_service_option_parser
import feature


class FeatureService(Service):
	def __init__(self, *args, **kwargs):
		super(FeatureService, self).__init__(*args, **kwargs)
		

	def process(self, inputFile, taskOptions, outputFile):
		feature.run(inputFile,outputFile,taskOptions)
		

if __name__ == '__main__':
	parser = create_service_option_parser()
	args = parser.parse_args()
	config_path = args.config_path
	logfile_path = args.log_file
	logging_lvl = args.logging_lvl
	run_as_daemon = args.daemon

	service = FeatureService(config_path, logfile_path, logging_lvl, run_as_daemon)
	service.run()
