//
// Copyleft RIME Developers
// License: GPLv3
//
// 2011-08-07 GONG Chen <chen.sst@gmail.com>
//
#ifndef RIME_SCRIPT_TRANSLATOR_H_
#define RIME_SCRIPT_TRANSLATOR_H_

#include <string>
#include <rime/common.h>
#include <rime/translation.h>
#include <rime/translator.h>
#include <rime/algo/algebra.h>
#include <rime/gear/memory.h>
#include <rime/gear/translator_commons.h>

namespace rime {

class Code;
struct DictEntry;
struct DictEntryCollector;
class Dictionary;
class UserDictionary;
struct SyllableGraph;

class ScriptTranslator : public Translator,
                         public Memory,
                         public TranslatorOptions {
 public:
  ScriptTranslator(const Ticket& ticket);

  virtual shared_ptr<Translation> Query(const std::string& input,
                                        const Segment& segment,
                                        std::string* prompt);
  virtual bool Memorize(const CommitEntry& commit_entry);

  std::string FormatPreedit(const std::string& preedit);
  std::string Spell(const Code& code);

  // options
  int spelling_hints() const { return spelling_hints_; }

 protected:
  int spelling_hints_ = 0;
};

}  // namespace rime

#endif  // RIME_SCRIPT_TRANSLATOR_H_
