Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "library.h"
- #include <iostream>
- #include <fstream>
- using namespace std;
- int main()
- {
- setlocale(LC_ALL, "Russian");
- ifstream file1("text.txt");
- ifstream file3("phraseBeginning.txt");
- ofstream file2("output.txt");
- List Array;
- string Text;
- Text = ReadText(file1);
- Array.CreareList(Text);
- Array.PrintList(file2);
- ListGramm A2, A3;
- Array.FindNGrams(A2, 2);
- Array.FindNGrams(A3, 3);
- cout << "2gramma" << endl;
- A2.PrintNGram(cout);
- cout << "3gramma" << endl;
- A3.PrintNGram(cout);
- string phraseBeginning , t;
- int WordCount = 0;
- file3 >> WordCount;
- getline(file3, t);
- getline(file3, phraseBeginning);
- cout << WordCount << " " << phraseBeginning << endl;
- int k = 0;
- string result = phraseBeginning;
- SearchPhrase(A2, A3, WordCount, phraseBeginning, k, result, cout);
- cout << result << endl;
- /*
- cin >> n;
- Array.FindNGrams(A, n);
- A.PrintNGram(cout);
- cout << "Result: " << endl;
- A.Counting(cout);
- A.PrintNGram(cout);
- */
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement