// Imprime las k palabras más frecuentes de un texto: top_words archivo k
// Cada línea es "veces palabra", en el orden de MoreFrequent. Ver word_count.h.
#include <cstddef>
#include <exception>
#include <iostream>
#include <string>
#include <vector>

#include "top_k.h"
#include "word_count.h"

int main(int argc, char** argv) {
    if (argc != 3) {
        std::cerr << "uso: top_words archivo k\n";
        return 2;
    }
    try {
        std::size_t k = std::stoul(argv[2]);
        std::string text = read_text(argv[1]);
        // Paso 3: cuenten con count_words, elijan con top_k e impriman.
        (void)k;
        (void)text;
        not_implemented("top_words");
    } catch (const std::exception& error) {
        std::cerr << "top_words: " << error.what() << "\n";
        return 1;
    }
    return 0;
}
