summaryrefslogtreecommitdiff
path: root/add_seg
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2014-09-21 14:55:34 +0100
committerPatrick Simianer <p@simianer.de>2014-09-21 14:55:34 +0100
commitfc605b699ee928c529f0f6aa18d666acc54835bd (patch)
treec6ce3d601d497b30c01ea71782cf4ccf066b0855 /add_seg
parent8e3802303408f6ad4b1299a59fc27f3954174992 (diff)
add_seg: fix
Diffstat (limited to 'add_seg')
-rwxr-xr-xadd_seg3
1 files changed, 2 insertions, 1 deletions
diff --git a/add_seg b/add_seg
index c7fd521..e4fe22d 100755
--- a/add_seg
+++ b/add_seg
@@ -23,10 +23,11 @@ while line = STDIN.gets
ext = '' if cfg[:nogz]
s = "<seg"
if cfg[:loo] then s += " exclude=\"#{i}\"" end
- if cfg[:grammar] then s += " grammar=\"#{cfg[:grammar]}/grammar.#{i}#{ext}\"" end
if index.size > 0
puts s + " id=\"#{index[j]}\"> #{line.strip} </seg>"
+ if cfg[:grammar] then s += " grammar=\"#{cfg[:grammar]}/grammar.#{index[j]}#{ext}\"" end
else
+ if cfg[:grammar] then s += " grammar=\"#{cfg[:grammar]}/grammar.#{i}#{ext}\"" end
puts s + " id=\"#{i}\"> #{line.strip} </seg>"
end
i += 1