def read_pos_file(filename):
    """
    Read the txt file containing all sentences from brat.
    :param filename: the txt file to read.
    :return: a list of all sentences in the txt file.
    Example:
        [Sentence1, Sentence2, Sentence3, ...]
    """
    result = []
    with open(filename.rstrip(), 'r') as file:
        lines = file.readlines()
        sentence = []
        for line in lines:
            splitted_line = line.split(' ')
            if len(splitted_line) > 1:
                sentence.append((splitted_line[0], splitted_line[1],
                    splitted_line[2].strip()))
            else:
                result.append(sentence)
                sentence = []
        if len(sentence) > 0:
            result.append(sentence)
    return result
