/usr/include/kytea/feature-io.h is in libkytea-dev 0.4.6+dfsg-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | #ifndef FEATURE_IO_H__
#define FEATURE_IO_H__
// #include <fstream>
// #include <iostream>
// #include <string>
// #include <vector>
#include <kytea/kytea-model.h>
#include <kytea/dictionary.h>
#include <map>
namespace kytea {
class FeatureIO {
protected:
std::ofstream * out_;
TagHash feats_;
typedef std::map<KyteaString, ModelTagEntry*> WordMap;
// Dictionary<ModelTagEntry>::WordMap wm_;
WordMap wm_;
int numTags_, numDicts_;
public:
FeatureIO() : out_(0), numTags_(0), numDicts_(0) { }
~FeatureIO();
int getNumTags() { return numTags_; }
int getNumDicts() { return numDicts_; }
void setNumTags(int numTags) { numTags_ = numTags; }
void load(const std::string& fileName,StringUtil* util);
void openOut(const std::string& fileName);
void closeOut();
WordMap & getWordMap() { return wm_; }
TagHash & getFeatures() { return feats_; }
TagTriplet * getFeatures(const KyteaString & str, bool add);
void printFeatures(const KyteaString & featId, TagTriplet* trip, StringUtil * util);
void printFeatures(const KyteaString & featId, StringUtil * util);
void printWordMap(StringUtil * util);
};
}
#endif
|