'Writes ARFF data to a file for the given data.'

def write(self, outfile, tokens):

    if (not hasattr(outfile, 'write')):
        outfile = open(outfile, 'w')
    outfile.write(self.format(tokens))
    outfile.close()
