From e26434979adc33bd949566ba7bf02dff64e80a3e Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Tue, 2 Oct 2012 00:19:43 -0400 Subject: cdec cleanup, remove bayesian stuff, parsing stuff --- gi/posterior-regularisation/split-languages.py | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100755 gi/posterior-regularisation/split-languages.py (limited to 'gi/posterior-regularisation/split-languages.py') diff --git a/gi/posterior-regularisation/split-languages.py b/gi/posterior-regularisation/split-languages.py deleted file mode 100755 index 206da661..00000000 --- a/gi/posterior-regularisation/split-languages.py +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/python - -import sys - -sout = open(sys.argv[1], 'w') -tout = open(sys.argv[2], 'w') -for line in sys.stdin: - phrase, contexts = line.rstrip().split('\t') - sp, tp = phrase.split(' ') - sout.write('%s\t' % sp) - tout.write('%s\t' % tp) - parts = contexts.split(' ||| ') - for i in range(0, len(parts), 2): - sc, tc = parts[i].split(' ') - if i != 0: - sout.write(' ||| ') - tout.write(' ||| ') - sout.write('%s ||| %s' % (sc, parts[i+1])) - tout.write('%s ||| %s' % (tc, parts[i+1])) - sout.write('\n') - tout.write('\n') -sout.close() -tout.close() -- cgit v1.2.3