diff options
author | Yury Melnichek <melnichek@gmail.com> | 2013-08-28 04:24:34 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:00:24 +0300 |
commit | 1ce0f2cde7df6c1d3be34c7420b4cce13a50aa0a (patch) | |
tree | ad7acb841072a4e15c3ee77996665b1c0b1f340e /console_sloynik | |
parent | c6513455bc49386c99049c6dec314e5c638a7b53 (diff) |
Remove Sloynik.
Diffstat (limited to 'console_sloynik')
-rw-r--r-- | console_sloynik/console_sloynik.pro | 13 | ||||
-rw-r--r-- | console_sloynik/main.cpp | 39 |
2 files changed, 0 insertions, 52 deletions
diff --git a/console_sloynik/console_sloynik.pro b/console_sloynik/console_sloynik.pro deleted file mode 100644 index 94947fedf8..0000000000 --- a/console_sloynik/console_sloynik.pro +++ /dev/null @@ -1,13 +0,0 @@ -TARGET = console_sloynik -TEMPLATE = app -CONFIG += console -CONFIG -= app_bundle - -ROOT_DIR = .. -DEPENDENCIES = words coding base gflags bzip2 zlib - -include($$ROOT_DIR/common.pri) - -SOURCES += main.cpp - -HEADERS += diff --git a/console_sloynik/main.cpp b/console_sloynik/main.cpp deleted file mode 100644 index 88130e0db8..0000000000 --- a/console_sloynik/main.cpp +++ /dev/null @@ -1,39 +0,0 @@ -#include "../words/slof_dictionary.hpp" -#include "../coding/file_reader.hpp" -#include "../base/logging.hpp" -#include "../std/iostream.hpp" -#include "../std/scoped_ptr.hpp" -#include "../3party/gflags/src/gflags/gflags.h" - -DEFINE_string(dictionary, "", "Path to the dictionary."); -DEFINE_string(lookup, "", "Word to lookup."); - -int main(int argc, char * argv []) -{ - google::ParseCommandLineFlags(&argc, &argv, false); - - scoped_ptr<sl::SlofDictionary> m_pDic; - if (!FLAGS_dictionary.empty()) - { - m_pDic.reset(new sl::SlofDictionary(new FileReader(FLAGS_dictionary))); - cout << "Keys in the dictionary: " << m_pDic->KeyCount() << endl; - } - - if (!FLAGS_lookup.empty()) - { - CHECK(m_pDic.get(), ("Dictionary should not be empty.")); - for (sl::Dictionary::Id i = 0; i < m_pDic->KeyCount(); ++i) - { - string key; - m_pDic->KeyById(i, key); - if (key == FLAGS_lookup) - { - cout << "===== Found id " << i << " =====" << endl; - string article; - m_pDic->ArticleById(i, article); - cout << article << endl; - cout << "================================" << endl; - } - } - } -} |