We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
to obtain the output in the format used by Freeling (https://github.com/TALP-UPC/FreeLing/blob/master/data/pt/senses30.src):
select ?s ?w { graph source:own-pt.nt { ?ss wn30:containsWordSense/wn30:word/wn30:lexicalForm ?w ; wn30:synsetId ?id . } BIND (str(?ss) as ?s) } order by ?s
The CL lisp code for produce the senses30.src is the one below:
(with-open-file (out "senses30.src" :direction :output :if-exists :supersede) (labels ((print-hash-entry (key value) (format out "~a ~{~a~^ ~}~%" key (sort value #'string<=)))) (let ((tb (make-hash-table :test #'equal))) (mapcar (lambda (e) (let ((k (car e)) (v (substitute #\_ #\Space (string-downcase (cadr e))))) (if (gethash k tb nil) (push v (gethash k tb)) (setf (gethash k tb) (list v))))) (cl-csv:read-csv #P"query.csv")) (maphash #'print-hash-entry tb))))