hce-node application  1.4.3
HCE Hierarchical Cluster Engine node application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
main.cpp
Go to the documentation of this file.
1 //#include <ProcessInfo.hpp>
2 #include <Refine.hpp>
3 #include <CWords.hpp>
4 #include <OutDataRefine.hpp>
5 
6 #include <string>
7 #include <vector>
8 #include <iostream>
9 #include <streambuf>
10 #include <Poco/String.h>
11 #include <Poco/StringTokenizer.h>
12 
13 
14 int main()
15 {
16  std::string content(std::istreambuf_iterator<char>(std::cin), std::istreambuf_iterator<char>());
18  Poco::SharedPtr<HCE::DataBase> inData(new HCE::InDataRefine(HCE::CT_REFINE, 0, 0, content));
19 
23  std::vector<HCE::component::ProcessInfo> processInfoTable;
24  HCE::component::ProcessInfo processInfo;
26  processInfoTable.push_back(processInfo);
27  inData.cast<HCE::InDataRefine>()->setProcessInfoTable(processInfoTable);
28 
29  Poco::SharedPtr<HCE::DataBase> outData = refine.process(inData);
30  std::vector<HCE::CWords> cWords = outData.cast<HCE::OutDataRefine>()->getCWords();
31  std::vector<HCE::RWords> rWords = outData.cast<HCE::OutDataRefine>()->getRWords();
32 
33 
34  for_each( cWords.begin(), cWords.end(), [](HCE::CWords val) { std::cout << val.getOriginWord() << std::endl;} );
35  return EXIT_SUCCESS;
36 }
37