def read_queries(file, interactive=False):
    """ Return list of reference and generated queries """
    query_list = []
    with open(file, 'r') as src:
        for line in src.readlines():
            if interactive is True:
                reference, gen = line.strip('\n').split(",")
            else:
                # output files by fairseq-generate contain an ID code as
                # first element, which can be omitted
                _, reference, gen = line.strip('\n').split(",")
            query_list.append([reference, gen])
    src.close()
    return query_list