13 #ifndef _HFST_OL_TRANSDUCER_H_
14 #define _HFST_OL_TRANSDUCER_H_
18 #include "../HfstExceptionDefs.h"
19 #include "../HfstFlagDiacritics.h"
20 #include "../HfstExtractStrings.h"
21 #include "optimized-lookup/transducer.h"
27 namespace hfst {
namespace implementations
36 class HfstOlInputStream
41 istream &input_stream;
43 void skip_identifier_version_3_0(
void);
44 void skip_hfst_header(
void);
46 HfstOlInputStream(
bool weighted);
47 HfstOlInputStream(
const std::string &filename,
bool weighted);
50 bool is_open(
void)
const;
51 bool is_eof(
void)
const;
52 bool is_bad(
void)
const;
53 bool is_good(
void)
const;
54 bool is_fst(
void)
const;
57 short stream_get_short();
58 void stream_unget(
char c);
59 void ignore(
unsigned int n);
61 bool operator() (
void)
const;
65 static int is_fst(FILE * f);
66 static int is_fst(istream &s);
69 class HfstOlOutputStream
74 ostream &output_stream;
77 HfstOlOutputStream(
bool weighted);
78 HfstOlOutputStream(
const std::string &filename,
bool weighted);
81 void write(
const char &c);
85 class HfstOlTransducer
92 static void extract_paths
94 int cycles=-1,
const FdTable<hfst_ol::SymbolNumber>* fd=NULL,
95 bool filter_fd=
false);
96 static const FdTable<hfst_ol::SymbolNumber>*
A compiled transducer format, suitable for fast lookup operations.
Definition: 3831_transducer.h:804