首页 > 技术文章 > thrax的安装

chenyaling 2019-05-20 16:20 原文

1、thrak概述

thrax是一个将使用正则表达式和基于上下文的重写规则的语法,编译为openfst格式的加权状态机的工具。

2、安装

thrax基于openfst使用,所以在thrax安装前,需要安装openfst。

(1)下载openfst,http://www.openfst.org/twiki/bin/view/FST/FstDownload,解压文件,进入解压的文件目录。

(2)输入./configure --enable-compact-fsts=yes --enable-compress=yes --enable-const-fsts=yes --enable-far=yes --enable-grm=yes --enable-linear-fsts=yes --enable-lookahead-fsts=yes --enable-mpdt=yes --enable-ngram-fsts=yes --enable-pdt=yes   【如果报错zilb,则是需要安装zlib,yum install zilb】

(3)输入make

(4)输出make install

(5)下载thrax,http://www.openfst.org/twiki/bin/view/GRM/ThraxDownload解压文件,进入解压的文件目录

(6)依次输入./configure   ;    make  ; make install

 

推荐阅读