-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlexicon.TODO
71 lines (63 loc) · 2.18 KB
/
lexicon.TODO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;
;;;; PULL-WORDNET-ENTRY
;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; integrate get-all-synonyms
(defun pull-wordnet-entry (word-forms)
(setf lexical-entry "")
(loop
for word-token in word-forms
do
(snepslog::get-wn-word-info word-token t)
(let ((synset-list
(snewnet::get-synsets-for-word word-token)))
(if (car synset-list)
(setf lexical-entry
(format nil "~A~A~%" lexical-entry
(format nil "~A_n1 := n_-_c_le &~%[ STEM < \"~A\" >,~%SYNSEM [ LKEYS.KEYREL.PRED \"_~A_n_1_rel\",~%PHON.ONSET voc ] ]." word-token word-token word-token)))
(format t "~%Noun form found~%"))
(if (car (cdr synset-list))
(format t "~%Verb form found~%"))
(if (car (cdr (cdr synset-list)))
(format t "~%Adjective form found~%"))
(if (car (cdr (cdr (cdr synset-list))))
(format t "~%Adverb form found~%"))
)
)
(if lexical-entry
(write-new-lexicon-to-file lexical-entry))
)
;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;
;;;; PULL-WORDNET-ENTRY
;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; integrate get-all-synonyms
(defun pull-wordnet-entry (word-forms)
(setf lexical-entry "")
(loop
for word-token in word-forms
do
(snepslog::get-wn-word-info word-token t)
(let ((synset-list
(snewnet::get-synsets-for-word word-token)))
(if (car synset-list)
(setf lexical-entry
(format nil "~A~A~%" lexical-entry
(format nil "~A_n1 := n_-_c_le &~%[ STEM < \"~A\" >,~%SYNSEM [ LKEYS.KEYREL.PRED \"_~A_n_1_rel\",~%PHON.ONSET voc ] ]." word-token word-token word-token)))
(format t "~%Noun form found~%"))
(if (car (cdr synset-list))
(format t "~%Verb form found~%"))
(if (car (cdr (cdr synset-list)))
(format t "~%Adjective form found~%"))
(if (car (cdr (cdr (cdr synset-list))))
(format t "~%Adverb form found~%"))
)
)
;; (if lexical-entry
;; (write-new-lexicon-to-file lexical-entry))
)