From 733e1b1507d27d4f53055f740e8098f56215ab8f Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Fri, 27 Jul 2012 17:31:00 -0400 Subject: remove old suffix array extractor (use the one in python/ instead) --- sa-extract/sa2cdec.py | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100755 sa-extract/sa2cdec.py (limited to 'sa-extract/sa2cdec.py') diff --git a/sa-extract/sa2cdec.py b/sa-extract/sa2cdec.py deleted file mode 100755 index 55fb19f3..00000000 --- a/sa-extract/sa2cdec.py +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env python -import sys - -featNames = [ line.strip() for line in open(sys.argv[1]) if not line.startswith('#') ] - -for line in sys.stdin: - try: - (lhs, src, tgt, feats, align) = line.strip("\n").split(' ||| ') - except: - print >>sys.stderr, 'WARNING: No alignments:', line - try: - (lhs, src, tgt, feats) = line.strip().split(' ||| ') - align = '' - except: - print >>sys.stderr, "ERROR: Malformed line:", line - raise - featValues = feats.split(' ') - namedFeats = ' '.join( name+"="+value for (name, value) in zip(featNames, featValues) ) - print " ||| ".join( (lhs, src, tgt, namedFeats, align) ) -- cgit v1.2.3