def METHOD_NAME(
    inputname: str,
    out: TextIO,
    out_raw: TextIO,
    reference_vcb: Dict[Tuple[str, str], Dict[str, int]],
    sampling_vcb: Dict[str, int],
) -> None:
    words = []
    reference_words = []  # size may be different
    semiotic_info = []
    raw_lines = []
    sent_ok = True if args.sampling_count == -1 else False
    with open(inputname, "r", encoding="utf-8") as f:
        for line in f:
            if line.startswith("<eos>"):
                if len(words) > 0 and sent_ok:
                    out.write(
                        " ".join(words) + "\t" + " ".join(reference_words) + "\t" + ";".join(semiotic_info) + "\n"
                    )
                    out_raw.write("\n".join(raw_lines) + "\n" + line)
                words = []
                reference_words = []
                semiotic_info = []
                raw_lines = []
                sent_ok = True if args.sampling_count == -1 else False
            else:
                raw_lines.append(line.strip())
                cls, written, spoken = line.strip().split("\t")
                spoken = spoken_preprocessing(spoken)
                written = written.casefold()
                references = set()
                if spoken == "sil":
                    continue
                if spoken == "<self>":
                    words.append(written)
                    reference_words.append(written)
                    # if reference is <self>, but the word has itn conversions in our dictionary, add them
                    for cls in ["CARDINAL", "ORDINAL", "DATE"]:  # date, ex sixties -> 60s
                        k = (cls, written)
                        if k in reference_vcb:
                            for tr_variant in reference_vcb[k]:
                                references.add(tr_variant)
                            semiotic_info.append(
                                cls
                                + " "
                                + str(len(words) - 1)
                                + " "
                                + str(len(words))
                                + " | "
                                + " | ".join(references)
                            )
                            break
                    continue
                spoken_words = spoken.split()
                words.extend(spoken_words)
                k = (cls, spoken)
                if k in reference_vcb:
                    for tr_variant in reference_vcb[k]:
                        references.add(tr_variant)
                references.add(spoken)
                references.add(written)
                for tr_variant in list(references):
                    # 6,51 km² => 6,51 km 2
                    (tr_variant2, n2) = re.subn(r"²", " 2", tr_variant)
                    (tr_variant3, n3) = re.subn(r"³", " 3", tr_variant)
                    if n2 > 0:
                        references.add(tr_variant2)
                    if n3 > 0:
                        references.add(tr_variant3)
                semiotic_info.append(
                    cls
                    + " "
                    + str(len(words) - len(spoken_words))
                    + " "
                    + str(len(words))
                    + " | "
                    + " | ".join(list(references))
                )
                reference_words.append(written.casefold())
                if cls not in sampling_vcb:
                    sampling_vcb[cls] = 0
                if sampling_vcb[cls] < args.sampling_count:
                    sent_ok = True
                    sampling_vcb[cls] += 1