コード例 #1
0
ファイル: main.py プロジェクト: t-usui/COMES
def extract(args):
    output_file_name = args.output_file_name
    extraction_method = args.extraction_method
    label_type = args.label_type
    
    if output_file_name is None:
        sys.stderr.write('Error: no file name to output is specified')
        sys.exit()
    
    if extraction_method is None:
        extraction_method = '3-gram'        # default: 3-gram
        
    if label_type is None:
        label_type = 'compiler'             # default: compiler
    
    datproc = DataProcessor()
    datproc.save_all_data_in_svmlight_format(output_file_name,
                                             extraction_method, label_type)