受人所托,测试一下champollion的安装和使用,我搜索了半天,只找到一篇有关的文章,为了方便,我便把自己安装的过程贴出来,以供参考:
我下的是champollion-1.2,在虚拟机中安装了Red Hat Linux 6 64位。
1.首先,将champollion-1.2.tgz解压缩到“/home/[你的用户名]”目录下。解压缩可以参考这个http://blog.youkuaiyun.com/zhenwenxian/article/details/4400404;或者你要是跟我一样安装了图形界面,直接“右击”压缩包,选择“解压到”进行解压。
2.解压好以后,打开命令终端,输入:su,输入:[密码];
3.配置CTK环境变量,值就是你解压后的文件路径。输入命令:export CTK=/home/[你的用户名]/champollion-1.2;
4.定位到champollion目录中。输入命令:cd /home/[你的用户名]/champollion-1.2;
5.测试安装。输入命令:./test_installation,这时就差不多了,它会提示“The installation is good.”,或者告诉你安装不成功的原因。
安装好以后,就要开始使用了。命令格式为:
英文中文对照:your_CTK_path/bin/champollion.EC_GB <english sentence file> <chinese sentence file> <alignment file>或者your_CTK_path/bin/champollion.EC_utf8 <english sentence file> <chinese sentence file> <alignment file>
英文Arabic对照:your_CTK_path/bin/champollion.EA <english sentence file> <arabic sentence file> <alignment file>
英文Hindi对照:your_CTK_path/bin/champollion.EH <english sentence file> <hindi sentence file> <alignment file>
另外champollion.generic可以和未知语言对照:your_CTK_path/bin/champollion.generic <LX sentence file>
<LY sentence file> <alignment file> <dictionary>
用它给的demo为例。输入命令:/home/[你的用户名]/champollion-1.2/bin/champollion.EC_GB ./demo/CPP20000210000021.e.st ./demo/CPP20000210000021.c.st ./demo/CPP20000210000021.align。你将会看到提示:
Tokenizing English ...
Tokenizing Chinese ...
Aligning Sentences ...
Reading X stop list... done.
Reading seed translation lexicon... done.
Number of entries: 4807
Loading axis...done.
Number of sentences: 31
Loading axis...done.
Number of sentences: 25
Window size: 10
Aligning Sentences ... done.
然后,打开./demo/CPP20000210000021.align便可以看到对照结果了。
585

被折叠的 条评论
为什么被折叠?



