Skip to content

Commit

Permalink
#148 #146 - dns:supersense -> wn:lexfile
Browse files Browse the repository at this point in the history
  • Loading branch information
simongray committed Dec 2, 2024
1 parent e203b0d commit 97a8315
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
16 changes: 16 additions & 0 deletions src/main/dk/cst/dannet/db/bootstrap.clj
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,22 @@
(println "... adding" (count triples-to-add) "supersenses")
(db/safe-add! g triples-to-add))))

(defn rename-supersense->lexfile!
[dataset]
(let [g (db/get-graph dataset prefix/dn-uri)
model (db/get-model dataset prefix/dn-uri)
ms (q/run g '[:bgp
[?synset :dns/supersense ?supersense]])
triples-to-add (map (fn [{:syms [?synset ?supersense]}]
[?synset :wn/lexfile ?supersense])
ms)]
(txn/transact-exec model
(println "... removing" (count ms) "supersense rels")
(db/remove! model '[_ :dns/supersense _]))
(txn/transact-exec g
(println "... adding" (count triples-to-add) "lexfile rels")
(db/safe-add! g triples-to-add))))

(defn fix-verb-creation-supersenses!
[dataset]
(let [g (db/get-graph dataset prefix/dn-uri)
Expand Down
4 changes: 3 additions & 1 deletion src/main/dk/cst/dannet/web/section.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@
:lexinfo/partOfSpeech
:wn/partOfSpeech
:dns/sentiment
:dns/ontologicalType
:skos/definition
:dns/ontologicalType
:wn/lexfile
:wn/definition
:rdfs/comment
:lexinfo/senseExample
Expand All @@ -33,6 +34,7 @@
[semantic-title
(some-fn (prefix/with-prefix 'wn :except #{:wn/partOfSpeech
:wn/definition
:wn/lexfile
:wn/example})
(comp #{:dns/usedFor
:dns/usedForObject
Expand Down

0 comments on commit 97a8315

Please sign in to comment.