diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2021-11-04 08:31:47 +0100 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2021-11-04 08:33:28 +0100 |
commit | 181df7fbaeaa3ae070c724436c5a5f62fbcb9a32 (patch) | |
tree | 2292878914ba28a070358f73de83c135f3e87855 /dicts/czech-wordnet.pl | |
parent | b36f185426be3ac0bfb942fa4a52528a8d70a61a (diff) | |
download | tdv-181df7fbaeaa3ae070c724436c5a5f62fbcb9a32.tar.gz tdv-181df7fbaeaa3ae070c724436c5a5f62fbcb9a32.tar.xz tdv-181df7fbaeaa3ae070c724436c5a5f62fbcb9a32.zip |
czech-wordnet.pl: fix to work on non-GNU systems
Diffstat (limited to 'dicts/czech-wordnet.pl')
-rwxr-xr-x | dicts/czech-wordnet.pl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/dicts/czech-wordnet.pl b/dicts/czech-wordnet.pl index d626e5a..d1d32f9 100755 --- a/dicts/czech-wordnet.pl +++ b/dicts/czech-wordnet.pl @@ -4,11 +4,14 @@ use warnings; use strict; +# GNU Gzip can unpack a ZIP file, but not the BSD one, and unzip can't use stdin +my $zipcat = qx/command -v bsdtar/ ? 'bsdtar -xOf-' : 'zcat'; + my $base = 'https://lindat.cz/repository/xmlui'; my $path = 'handle/11858/00-097C-0000-0001-4880-3'; open(my $doc, '-|', "curl -Lo- '$base/bitstream/$path/Czech_WordNet_1.9_PDT.zip'" - . ' | zcat | iconv -f latin2 -t UTF-8') or die $!; + . " | $zipcat | iconv -f latin2 -t UTF-8") or die $!; # https://nlp.fi.muni.cz/trac/deb2/wiki/WordNetFormat but not quite; # for terminology see https://wordnet.princeton.edu/documentation/wngloss7wn |