def coNLLDataset_full(filename, processing_word=None, processing_tag=None, max_iter=None, which_tags=-1):
    """
    Same as above but simply processes all datasets and returns full lists of X and y in memory (no yield).

    :param filename: path to the file
    :param processing_word: (optional) function that takes a word as input
    :param processing_tag: (optional) function that takes a tag as input
    :param max_iter: (optional) max number of sentences to yield
    :param which_tags: (optional) which tagging scheme to use (-1 -2 -3 or 3 2 1 for task 1 2 3 respectively)
    :return X,y: lists of words and tags in sequences
    """


    X,y = [], []

    niter = 0
    with open(filename) as f:
        words, tags = [], []
        for line in f:
            line = line.strip()
            if (len(line) == 0 or line.startswith("-DOCSTART-")):
                if len(words) != 0:
                    niter += 1
                    if max_iter is not None and niter > max_iter:
                        break
                    X.append(words)
                    y.append(tags)
                    words, tags = [], []
            else:
                ls = line.split()
                word, tag = ls[0],ls[which_tags]
                if processing_word is not None:
                    word = processing_word(word)
                if processing_tag is not None:
                    tag = processing_tag(tag)
                words += [word]
                tags += [tag]

    return X,y