10 #ifndef _HFST_OL_TRANSDUCER_H_
11 #define _HFST_OL_TRANSDUCER_H_
15 #include "../HfstExceptionDefs.h"
16 #include "../HfstFlagDiacritics.h"
17 #include "../HfstExtractStrings.h"
18 #include "optimized-lookup/transducer.h"
24 namespace hfst {
namespace implementations
33 class HfstOlInputStream
38 istream &input_stream;
40 void skip_identifier_version_3_0(
void);
41 void skip_hfst_header(
void);
43 HfstOlInputStream(
bool weighted);
44 HfstOlInputStream(
const std::string &filename,
bool weighted);
47 bool is_open(
void)
const;
48 bool is_eof(
void)
const;
49 bool is_bad(
void)
const;
50 bool is_good(
void)
const;
51 bool is_fst(
void)
const;
54 short stream_get_short();
55 void stream_unget(
char c);
56 void ignore(
unsigned int n);
58 bool operator() (
void)
const;
62 static int is_fst(FILE * f);
63 static int is_fst(istream &s);
66 class HfstOlOutputStream
71 ostream &output_stream;
74 HfstOlOutputStream(
bool weighted);
75 HfstOlOutputStream(
const std::string &filename,
bool weighted);
78 void write(
const char &c);
82 class HfstOlTransducer
89 static void extract_paths
91 int cycles=-1,
const FdTable<hfst_ol::SymbolNumber>* fd=NULL,
92 bool filter_fd=
false);
93 static const FdTable<hfst_ol::SymbolNumber>*
A compiled transducer format, suitable for fast lookup operations.
Definition: transducer.h:833