File: parallel

package info (click to toggle)
apertium-tur 0.2.0~r83161-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 2,860 kB
  • sloc: python: 476; sh: 119; makefile: 107; xml: 54
file content (17 lines) | stat: -rw-r--r-- 375 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/bash

# set these to the right files:
hfstbin=tur.automorf.hfst
corpus=tr.crp
outfile=/tmp/tr.coverage.txt 


ncores=$(sysctl -n machdep.cpu.thread_count)
blocks=$(calc -p "round($(wc -c < $corpus) / 4)")

date

< "$corpus" parallel --block $blocks --pipe -k "apertium-destxt | hfst-proc -w $hfstbin | apertium-retxt" | gsed 's/\$\W*\^/$\n^/g' > "$outfile"

date