#include #include #include #include #include #include "Utility.h" using namespace std; int main(){ unordered_map bigram_counts; unordered_map unigram_counts; ifstream inf("corpus.txt"); string line; while (getline(inf,line).good()){ vector tokens; Tokenize(line, tokens, " \t"); int s= tokens.size(); for (int i=0; ifirst << " : " << itr1->second << endl; for (auto itr2=bigram_counts.begin(); itr2!=bigram_counts.end(); itr2++) outf2 << itr2->first << " : " << itr2->second << endl; outf1.close(); outf2.close(); }