diff options
| author | Kenneth Heafield <github@kheafield.com> | 2012-10-22 12:07:20 +0100 | 
|---|---|---|
| committer | Kenneth Heafield <github@kheafield.com> | 2012-10-22 12:07:20 +0100 | 
| commit | 5f98fe5c4f2a2090eeb9d30c030305a70a8347d1 (patch) | |
| tree | 9b6002f850e6dea1e3400c6b19bb31a9cdf3067f /gi/pf/cfg_wfst_composer.h | |
| parent | cf9994131993b40be62e90e213b1e11e6b550143 (diff) | |
| parent | 21825a09d97c2e0afd20512f306fb25fed55e529 (diff) | |
Merge remote branch 'upstream/master'
Conflicts:
	Jamroot
	bjam
	decoder/Jamfile
	decoder/cdec.cc
	dpmert/Jamfile
	jam-files/sanity.jam
	klm/lm/Jamfile
	klm/util/Jamfile
	mira/Jamfile
Diffstat (limited to 'gi/pf/cfg_wfst_composer.h')
| -rw-r--r-- | gi/pf/cfg_wfst_composer.h | 46 | 
1 files changed, 0 insertions, 46 deletions
diff --git a/gi/pf/cfg_wfst_composer.h b/gi/pf/cfg_wfst_composer.h deleted file mode 100644 index cf47f459..00000000 --- a/gi/pf/cfg_wfst_composer.h +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef _CFG_WFST_COMPOSER_H_ -#define _CFG_WFST_COMPOSER_H_ - -#include <iostream> -#include <vector> -#include <utility> - -#include "trule.h" -#include "wordid.h" - -class CFG_WFSTComposerImpl; -class Hypergraph; - -struct WFSTNode { -  virtual ~WFSTNode(); -  // returns the next states reachable by consuming srcindex (which identifies a word) -  // paired with the output string generated by taking that transition. -  virtual std::vector<std::pair<const WFSTNode*,TRulePtr> > ExtendInput(unsigned srcindex) const = 0; -}; - -struct WFST { -  virtual ~WFST(); -  virtual const WFSTNode* Final() const = 0; -  virtual const WFSTNode* Initial() const = 0; -}; - -class CFG_WFSTComposer { - public: -  ~CFG_WFSTComposer(); -  explicit CFG_WFSTComposer(const WFST& wfst); -  bool Compose(const Hypergraph& in_forest, Hypergraph* trg_forest); - -  // reads the grammar from a file. There must be a single top-level -  // S -> X rule.  Anything else is possible. Format is: -  // [S] ||| [SS,1] -  // [SS] ||| [NP,1] [VP,2] ||| Feature1=0.2 Feature2=-2.3 -  // [SS] ||| [VP,1] [NP,2] ||| Feature1=0.8 -  // [NP] ||| [DET,1] [N,2] ||| Feature3=2 -  // ... -  bool Compose(std::istream* grammar_file, Hypergraph* trg_forest); - - private: -  CFG_WFSTComposerImpl* pimpl_; -}; - -#endif  | 
