summaryrefslogtreecommitdiff
path: root/gi/pf/transliterations.h
blob: ea9f9d3f6b4ad197816fd0b5eaa6b6bc239cac86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef _TRANSLITERATIONS_H_
#define _TRANSLITERATIONS_H_

#include <vector>
#include "wordid.h"
#include "prob.h"

struct TransliterationsImpl;
struct Transliterations {
  // max_src and max_trg indicate how big the transliteration phrases can be
  // see reachability.h for information about filter_ratio
  explicit Transliterations(int max_src, int max_trg, double filter_ratio);
  ~Transliterations();
  void Initialize(WordID src, const std::vector<WordID>& src_lets, WordID trg, const std::vector<WordID>& trg_lets);
  void Forbid(WordID src, const std::vector<WordID>& src_lets, WordID trg, const std::vector<WordID>& trg_lets);
  void GraphSummary() const;
  prob_t EstimateProbability(WordID s, const std::vector<WordID>& src, WordID t, const std::vector<WordID>& trg) const;
 private:
  TransliterationsImpl* pimpl_;
};

#endif