~domy/domyce/trunk

« back to all changes in this revision

Viewing changes to lib/corpusfg/plugins/train-tables.py

  • Committer: Tom Hoar
  • Date: 2013-04-28 12:13:05 UTC
  • Revision ID: tahoar@precisiontranslationtools.com-20130428121305-pm7dryk7hlsbenda
Final updates before jtv updates. Cleaned up conf files, renamed default.conf to default.ini, updated demo-2.bat and demo-2.sh to use new file names. Updated to binarize-phrasetable.py to be compatible with Moses RELEASE-1.0. Removed /home/tahoar, /home/tahoar, and  checks in train-lm.py. Referenced mgiza instead of older mgizapp in train-tables.py

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
#===============================================================================
7
7
 
8
8
#version:
9
 
#2.5.337 - display os.path.basename(self.model_dir) in better position
10
 
#        - bugfix for UTF-8 in values that become folder names
11
 
#        - glue-grammar defaults
 
9
#2.5.339 - Changed mgizapp to mgiza
12
10
 
13
11
import os
14
12
import sys
66
64
                'tmgrams': 7,
67
65
                'tmroot': '%(tmroot)s',
68
66
                'defaultfolders': False,
69
 
                'version': '2.5.337',
 
67
                'version': '2.5.339',
70
68
                'root-dir': '',
71
69
                'external-bin-dir': '4,GIZA++',
72
70
                'corpus-dir': '',
301
299
                        if not self.alignment in ['intersect','union','grow','grow-final','grow-diag','grow-diag-final','grow-diag-final-and','srctotgt','tgttosrc',]:
302
300
                                self.errors.append([__name__,'invalid','\"[%s]\"with alignertype=giza, alignment= must be set to \'intersect\', \'union\', \'grow\', \'grow-final\', \'grow-diag\', \'grow-diag-final\' (default), \'grow-diag-final-and\', \'srctotgt\', or \'tgttosrc\''%(__name__,)])
303
301
                                logger.error('%s\t%s',*self.errors[-1][1:])
304
 
                        if not self.p.decodepath('4,mgizapp',True):
305
 
                                self.errors.append([__name__,'missing','\"mgizapp\"'])
 
302
                        if not self.p.decodepath('4,mgiza',True):
 
303
                                self.errors.append([__name__,'missing','\"mgiza\"'])
306
304
                                logger.error('%s\t%s',*self.errors[-1][1:])
307
305
                        if not self.p.decodepath('4,snt2cooc.out',True):
308
306
                                self.errors.append([__name__,'missing','\"snt2cooc.out\"'])