9 stdenvNoCC.mkDerivation (self: {
10 pname = "open-english-wordnet";
13 src = fetchFromGitHub {
14 owner = "globalwordnet";
15 repo = "english-wordnet";
16 rev = "${self.version}-edition";
17 hash = "sha256-a1fWIp39uuJZL1aFX/r+ttLB1+kwh/XPHwphgENTQ5M=";
20 patches = lib.mapAttrsToList (rev: hash: fetchpatch {
21 url = "https://github.com/globalwordnet/english-wordnet/commit/${rev}.patch";
24 # Upstream commit bumping the version number, accidentally ommited from the tagged release
25 "bc07902f8995b62c70f01a282b23f40f30630540" = "sha256-1e4MG/k86g3OFUhiShCCbNXnvDKrYFr1KlGVsGl++KI=";
26 # PR #982, “merge.py: Make result independent of filesystem order”
27 "6da46a48dd76a48ad9ff563e6c807b8271fc83cd" = "sha256-QkkJH7NVGy/IbeSWkotU80IGF4esz0b8mIL9soHdQtQ=";
30 # TODO(nicoo): make compression optional?
33 (python3.withPackages (p: with p; [ pyyaml ]))
36 # TODO(nicoo): generate LMF and WNDB versions with separate outputs
40 echo Generating wn.xml
41 python scripts/from-yaml.py
42 python scripts/merge.py
45 gzip --best --no-name --stdout ./wn.xml > 'oewn:${self.version}.xml.gz'
52 install -Dt $out/share/wordnet 'oewn:${self.version}.xml.gz'
57 description = "Lexical network of the English language";
59 Open English WordNet is a lexical network of the English language grouping
60 words into synsets and linking them according to relationships such as
61 hypernymy, antonymy and meronymy. It is intended to be used in natural
62 language processing applications and provides deep lexical information
63 about the English language as a graph.
65 Open English WordNet is a fork of the Princeton Wordnet developed under an
66 open source methodology.
68 homepage = "https://en-word.net/";
69 license = licenses.cc-by-40;
70 maintainers = with maintainers; [ nicoo ];
71 platforms = platforms.all;