summaryrefslogtreecommitdiff
path: root/python/cdec/sa/extract.py
diff options
context:
space:
mode:
authorVictor Chahuneau <vchahune@cs.cmu.edu>2012-07-27 22:25:15 -0400
committerVictor Chahuneau <vchahune@cs.cmu.edu>2012-07-27 22:25:15 -0400
commit1d481414a2fa8505a2591c88e2b7b8f86a682ca2 (patch)
treeed5e9dff569d89da453578ce3d109991623d9303 /python/cdec/sa/extract.py
parentb317e0efd2398d75d70e027bb1e2cf442e683981 (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.py3
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))