https://github.com/RichardMoot/GrailLight
Tip revision: 67fbacd0e365d9008c021016377c0cfe1f1e309d authored by Richard Moot on 27 April 2021, 15:02:38 UTC
Update Supertag.tcl
Update Supertag.tcl
Tip revision: 67fbacd
collect_comments.tcl
#!/usr/bin/tclsh
if {$argc == 0} {
set flist [list "maxentdata.txt"]
} else {
set flist $argv
}
set sent 0
foreach f $flist {
set fs [open $f r]
while {[gets $fs line] >= 0} {
if {[string equal -length 1 $line "#"]} {
puts "$sent [string range $line 2 end]"
} else {
incr sent
}
}
close $fs
}