1 OpenFst is a library for constructing, combining, optimizing, and searching
2 weighted finite-state transducers (FSTs).
5 This version is known to work under Linux using g++ (>= 4.9) and OS X using
6 XCode (>= 5). It is expected to work wherever adequate POSIX (dlopen,
7 ssize_t, basename), C99 (snprintf, strtoll, <stdint.h>), and C++11
8 (<unordered_set>, <unordered_map>, <forward_list>) support is available.
11 Follow the generic GNU build system instructions in ./INSTALL. We
12 recommend configuring with --enable-static=no for faster compiles.
16 --enable-bin Enable fst::script and executables (def: yes)
17 --enable-compact-fsts Enable CompactFst extensions (def: no)
18 --enable-compress Enable compression extension (def: no)
19 --enable-const-fsts Enable ConstFst extensions (def: no)
20 --enable-far Enable FAR extensions (def: no)
21 --enable-fsts Enable all FST SO extensions (def: no)
22 --enable-grm Enable all dependencies of OpenGrm (def: no)
23 --enable-linear-fsts Enable LinearTagger/ClassifierFst extensions (def: no)
24 --enable-lookahead-fsts Enable LookAheadFst extensions (def: no)
25 --enable-mpdt Enable MPDT extensions (def: no)
26 --enable-ngram-fsts Enable NGramFst extensions (def: no)
27 --enable-pdt Enable PDT extensions (def: no)
28 --enable-python Enable Python extension (def: no)
29 --enable-special Enable special-matcher extensions (def: no)
31 Configuring with --enable-bin=no gives very fast compiles, but excludes the
32 command line utilities.
34 Configuring with --enable-python will attempt to install the Python module to
35 whichever site-packages (or dist-packages, on Debian or Ubuntu) is found
38 The flag --with-libfstdir specifies where FST extensions should be installed;
39 it defaults to ${libdir}/fst.
41 Compiling with -Wall -Wno-sign-compare under g++ should give no warnings from
44 If you encounter an error about loading shared objects when attempting to use
45 the library immediately after installation, (e.g, `...cannot open shared
46 object file...`) you may need to refresh your system's shared object cache.
47 On Linux, this is accomplished by invoking ldconfig; the corresponding command
48 on OS X is called update_dyld_shared_cache. Both of these require superuser
49 privileges (and so should be executed with sudo).
52 Assuming you've installed under the default /usr/local, the FST binaries are
53 found on /usr/local/bin.
55 To use in your own program, include <fst/fstlib.h> and compile with
56 -I/usr/local/include. The compiler must support C++11 (for g++ add the flag
57 -std=c++11). Link against /usr/local/lib/libfst.so and -ldl. Set your
58 LD_LIBRARY_PATH (or equivalent) to contain /usr/local/lib. The linking is,
59 by default, dynamic so that the Fst and Arc type DSO extensions can be used
60 correctly if desired. Any extensions will be found under /usr/local/lib/fst
61 or /usr/local/include/fst/extensions.
64 Release 1.7.2 provides the ability to build the core library and binaries as
65 well as several extensions with Bazel and to depend on OpenFst as an
66 external dependency in other projects compiled with Bazel. Please refer to
67 https://bazel.build for information on using Bazel. OpenFst can be compiled
68 from anywhere in the source tree, as follows:
72 Tests can be run in a similar fashion:
76 The Bazel build-file is provided as-is.
79 See www.openfst.org for general documentation.
80 See ./NEWS for updates since the last release.