diff options
author | Victor Chahuneau <vchahune@cs.cmu.edu> | 2012-07-27 22:25:15 -0400 |
---|---|---|
committer | Victor Chahuneau <vchahune@cs.cmu.edu> | 2012-07-27 22:25:15 -0400 |
commit | 9961abf8f756279ac6d839e0b3de2b0d83431965 (patch) | |
tree | 2defad3f49df2921ff68a48a07a9ca0693a1f0f7 /python/cdec/sa/extract.py | |
parent | 733e1b1507d27d4f53055f740e8098f56215ab8f (diff) |
[python] conversion from cdec.sa.Rule to cdec.TRule
+ remove configobj dependency
+ re-structure packages (no more top-level library)
+ "const" stuff
+ use __new__ instead of constructor for some objects
Diffstat (limited to 'python/cdec/sa/extract.py')
-rw-r--r-- | python/cdec/sa/extract.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/python/cdec/sa/extract.py b/python/cdec/sa/extract.py index c6da5e9d..918aa3bb 100644 --- a/python/cdec/sa/extract.py +++ b/python/cdec/sa/extract.py @@ -3,7 +3,6 @@ import sys import os import argparse import logging -import configobj import cdec.sa def main(): @@ -18,7 +17,7 @@ def main(): if not os.path.exists(args.grammars): os.mkdir(args.grammars) - extractor = cdec.sa.GrammarExtractor(configobj.ConfigObj(args.config, unrepr=True)) + extractor = cdec.sa.GrammarExtractor(args.config) for i, sentence in enumerate(sys.stdin): sentence = sentence[:-1] grammar_file = os.path.join(args.grammars, 'grammar.{0}'.format(i)) |