#!/usr/bin/perl

#
# Create a evaluation/pseudo-submission file from a MyMediaLite prediction file
# (generated by --prediction-line=ranking)
# Script for KDD Cup 2012, track 1
# author: Zeno Gantner <zeno.gantner@gmail.com>
# This script is in the public domain.
#

use strict;
use warnings;

use Regexp::Common;

while (<>) {
	s/:$RE{num}{real},/ /g;
	s/:$RE{num}{real}\]//;
	s/\[//;
	s/\t/,/;
	print;
}
