Commit 0ee77487 authored by remivantrijp's avatar remivantrijp

Correction in handling of conjunctors.

parent 54cb43bb
......@@ -75,7 +75,7 @@
("npadvmod" functional nominal adverbial "NP as adverbial modifier.")
;; Coordination-related modifiers.
("conj" ignoreable nominal conjunt "Conjunct dependent, e.g. John, Mary and Sam")
("cc" conjunction conjunction "Coordinating conjunction.")
("cc" lexical conjunction "Coordinating conjunction.")
("preconj" conjunction conjunction conjunction "Pre-correlative conjunction.")
;; NP-modifiers.
("nmod" lexical nominal modifier "Unclassified modifier of the head noun.")
......
......@@ -139,6 +139,13 @@
when (and (= (word-dependency-spec-head-id spec) head-word-id)
(string= "conj" (word-dependency-spec-syn-role spec)))
collect spec))
(conjunctors (loop for spec in word-specs
when (and (= (word-dependency-spec-head-id spec) head-word-id)
(string= "cc" (word-dependency-spec-syn-role spec)))
collect (progn (push (word-dependency-spec-unit-name spec) constituents)
`(,(word-dependency-spec-unit-name spec)
(parent ,(unit-name mother-unit))
(syn-cat ((lex-class conjunctor)))))))
(units-to-append (loop for other-conjunct in (cons head-word-spec other-conjuncts)
for phrase-unit-name = (make-const "conj")
do (push phrase-unit-name constituents)
......@@ -146,10 +153,10 @@
word-specs preprocessed-units))))
(cons `(,(unit-name mother-unit)
,@(loop for feature in (unit-body mother-unit)
collect (if (eql 'constituents (feature-name feature))
`(constituents ,constituents)
feature)))
units-to-append)))
collect (if (eql 'constituents (feature-name feature))
`(constituents ,constituents)
feature)))
(append conjunctors units-to-append))))
;; (comprehend "I like Mickey Mouse and Donald Duck.")
;;;;; ----------------------------------------------------------------------------------------------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment