def METHOD_NAME():
    try:
        # Read configuration file
        Settings.read(os.path.join(basepath, "config", "GreynirSimple.conf"))
    except ConfigError as e:
        print("Configuration error: {0}".format(e))
        sys.exit(os.EX_CONFIG)
    # Output file
    file = open(OUT_FILENAME, "w", encoding="utf-8")
    total_sent = 0
    total_sent_skipped = 0
    total_arts = 0
    total_arts_skipped = 0
    accumulated = []
    def gen():
        yield from Article.articles({"random": True})
    for art in gen():
        total_arts += 1
        # Load article tree
        try:
            tree = Tree(url=art.url, authority=art.authority)
            tree.load(art.tree)
        except Exception:
            total_arts_skipped += 1
            continue
        # Load simple sentence trees for all sentences in article
        trees = None
        try:
            trees = tree.simple_trees()
        except Exception:
            total_arts_skipped += 1
            continue
        # Iterate over each sentence tree, process
        for ix, stree in trees:
            if not is_acceptable_sentence_tree(stree):
                total_sent_skipped += 1
                continue
            elif is_short(stree):
                atree = gen_anno_tree(art, ix, stree)
                with open("short.txt", "a", encoding="utf-8") as shortfile:
                    shortfile.write(str(atree) + SEPARATOR)
                continue
            # OK, it's acceptable
            annotree = gen_anno_tree(art, ix, stree)
            accumulated.append(annotree)
        num_acc = len(accumulated)
        if num_acc >= BATCH_SIZE:
            total_sent += num_acc
            shuffle(accumulated)
            # Write sentence trees to file
            for s in accumulated:
                file.write(str(s) + SEPARATOR)
            # Empty our list of acc. sentences
            accumulated = []
            # Trigger manual garbage collection
            gc.collect()
            print(f"{total_sent} sentences accumulated")
            print(f"\t{total_sent_skipped} sentences skipped")
        if total_sent + total_sent_skipped > 14000000:
            break
    # All done
    file.close()
    with open("stats_copper.txt", "a") as stats:
        stats.write(f"Total articles: {total_arts}\n")
        stats.write(f"Total articles skipped: {total_arts_skipped}\n")
        stats.write(f"Total sentences: {total_sent}\n")
        stats.write(f"Total sentences skipped: {total_sent_skipped}\n")