cl-wordnet
文件大小: unknow
源码售价: 5 个金币 积分规则     积分充值
资源说明:Common lisp wordnet interface for SQL (specifically MSSQL)
CL-Wordnet

This project is released under the GNU Library General Public License (see LICENSE)

Given a MSSQL-based Wordnet setup, we can query information related to Wordnet using clsql

Please note that a lot of the functionality comes from views.  You can create the views by running the scripts within sql-migrations.

Also note, this is pretty dependent on MSSQL for correct operation.
The nice thing about clsql is that we can also use other databases
instead.  There is some basic work for porting the MSSQL wordnet
database into SQLite.  This hasn't been completed yet.

You can get Wordnet-SQLServer here:
http://wordnetsqlserver.googlecode.com/svn/trunk/Database/

 Examples: 

(defpackage :wordnet-examples (:use :cl :wordnet))

(in-package :wordnet-examples)

(defun list-word-defs (word)
  (with-generic-wordnet-mssql-connection (dbms)
    (dolist (obj (query-db :word word :tbl 'worddef :db dbms))
      (format t "Definition: ~a~%" (definition obj)))))

(defun list-word-parse (word)
  (with-generic-wordnet-mssql-connection (dbms)
    (dolist (obj (query-db :word word :tbl 'wordparse :db dbms))
      (format t "parse output: ~a~%" (parse obj)))))

(defun list-word-hypernyms (word)
  (with-generic-wordnet-mssql-connection (dbms)
    (dolist (obj (query-db :word word :tbl 'hypernyms :srcword 'hyponym :order-by 'hypernym :db dbms))
      (format t "Hypernym: ~a~%" (hypernym obj)))))

(defun list-word-hyponyms (word)
  (with-generic-wordnet-mssql-connection (dbms)
    (dolist (obj (query-db :word word :tbl 'hyponyms :srcword 'hypernym :order-by 'hyponym :db dbms))
      (format t "Hyponym: ~a~%" (hyponym obj)))))

(defun list-word-synonyms (word)
  (with-generic-wordnet-mssql-connection (dbms)
    (dolist (obj (query-db :word word :tbl 'synonyms :srcword 'orig_word :db dbms))
      (format t "Synonym: ~a, grammar position: ~a~%" (synonym obj) (grammarpos obj)))))


本源码包内暂不包含可直接显示的源代码文件,请下载源码包。