def main(**kwargs):
<EOL>_parse_args = kwargs.get('<STR_LIT>', parse_args)<EOL>_load_transactions = kwargs.get('<STR_LIT>', load_transactions)<EOL>_apriori = kwargs.get('<STR_LIT>', apriori)<EOL>args = _parse_args(sys.argv[<NUM_LIT:1>:])<EOL>transactions = _load_transactions(<EOL>chain(*args.input), delimiter=args.delimiter)<EOL>result = _apriori(<EOL>transactions,<EOL>max_length=args.max_length,<EOL>min_support=args.min_support,<EOL>min_confidence=args.min_confidence)<EOL>for record in result:<EOL><INDENT>args.output_func(record, args.output)<EOL><DEDENT>
Executes Apriori algorithm and print its result.