summaryrefslogtreecommitdiff
path: root/phrase2_extraction
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2016-07-20 10:55:28 +0200
committerPatrick Simianer <p@simianer.de>2016-07-20 10:55:28 +0200
commit47b04c4d2e72a473d1b7595c1a6655bcd351f65e (patch)
treed4c8709f6f7b2ec0a1f917f85af06d4750995610 /phrase2_extraction
parent893f1b87ff267a6afd886951c91a64573f4d9c9f (diff)
parentfac00976168c6b3c94d01d76babede147e4a0710 (diff)
Merge branch 'master' of github.com:pks/lfpe
Diffstat (limited to 'phrase2_extraction')
-rwxr-xr-xphrase2_extraction/phrase2_extraction.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/phrase2_extraction/phrase2_extraction.rb b/phrase2_extraction/phrase2_extraction.rb
index 1f268cd..b376953 100755
--- a/phrase2_extraction/phrase2_extraction.rb
+++ b/phrase2_extraction/phrase2_extraction.rb
@@ -178,6 +178,16 @@ class Rule
}
astr.strip!
+ #a = []
+ #source_string.strip.lstrip.split.each_with_index { |s,i|
+ # target_string.strip.lstrip.split.each_with_index { |t,j|
+ # if !s.match /\[X,\d+\]/ and !t.match /\[X,\d+\]/
+ # a << "#{i}-#{j}"
+ # end
+ # }
+ #}
+ #astr = a.join ' '
+
return "[X] ||| #{source_string} ||| #{target_string} ||| NewRule=1 ||| #{astr}"
end