summaryrefslogtreecommitdiff
path: root/src/fdict.h
blob: ff491cfb25223ee4256eadbc3aa9b20d9586f414 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#ifndef _FDICT_H_
#define _FDICT_H_

#include <string>
#include <vector>
#include "dict.h"

struct FD {
  static Dict dict_;
  static inline int NumFeats() {
    return dict_.max() + 1;
  }
  static inline WordID Convert(const std::string& s) {
    return dict_.Convert(s);
  }
  static inline const std::string& Convert(const WordID& w) {
    return dict_.Convert(w);
  }
};

#endif