-
Notifications
You must be signed in to change notification settings - Fork 0
Import of Thrax (http://www.openfst.org/twiki/bin/view/GRM/Thrax) with adaptions to compile for Android via NDK. Starting from Thrax 1.3.6
License
grammatek/thrax
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Thrax is a toolkit for compiling grammars based on regular expressions and context-dependent rewrite rules into weighted finite-state transducers (FSTs). The FST representation uses OpenFst. REQUIREMENTS: This version is known to work under Linux using g++ (>= 8) and OS X using XCode (>= 9). It is expected to work wherever adequate POSIX (dlopen, ssize_t, basename), c99 (snprintf, strtoll, <stdint.h>), and C++17 ((ordered_set>, ordered_map>, <forward_list>, constexpr-if) support is available. It assumes you have installed OpenFst (www.openfst.org) configured with the --enable-grm flag. INSTALLATION: Follow the generic GNU build system instructions in ./INSTALL. We recommend configuring with =--enable-static=no= for faster compiles. Configuring with --enable-bin=no excludes the command line utilities (not generally useful). Configuring with --enable-readline enables readline (in-line editing) for thraxrewrite-tester. You must have GNU readline installed. Compiling with '-Wall -Wno-sign-compare' under g++ should give no warnings from this library. USAGE: Assuming you've installed under the default /usr/local, the GRM binaries are found on /usr/local/bin. Headers will be in /usr/local/include/thrax, and libraries in /usr/local/lib. Auxiliary data files -- provided grammars -- are under /usr/local/share/thrax. Syntax highlighters (for vi and emacs) and other useful tools are under /usr/local/share/utils. To use in your own programs you will need to include <thrax/thrax.h>. Compile with '-I /usr/local/include' and link against /usr/local/lib/libfst.so, /usr/local/lib/fst/libfstfar.so and /usr/local/lib/libthrax.so The linking is, by default, dynamic so that the Fst and Arc type DSO extensions can be used correctly if desired. DOCUMENTATION: See www.opengrm.org for general documentation. See ./NEWS for updates since the last release. BUILDING FOR ANDROID This branch has the changes necessary to compile Thrax for all Android platforms. The file build-android.sh is used to call configure / make / make install with the right options. One can/should set a few environment variables to influence build assumptions in build-android.sh. These variables are ANDROID_NDK, ANDROID_NDK_TOOLCHAIN, ANDROID_API, PREFIX. Pleased read the file build-android.sh carefully, how these are used and adapt them to your needs. You need to have an accompanying OpenFst installed with the correct platform inside your installation path. Refer to https://github.com/grammatek/openfst/tree/android. The currently used OpenFST version is 1.8.1 Finally, call ./build-android.sh to configure/make/make install Thrax.
About
Import of Thrax (http://www.openfst.org/twiki/bin/view/GRM/Thrax) with adaptions to compile for Android via NDK. Starting from Thrax 1.3.6
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published