Commit 8fbd5db6 authored by remivantrijp's avatar remivantrijp
Browse files

Improving the English model.

parent 467b3e24
......@@ -59,6 +59,7 @@
("UH" interjection)
("VB" verb-base-form)
("VBD" verb-past)
("VBN" verb-past-participle)
("VBG" verb-ing-form)
("VBZ" verb-3sg)
("WDT" wh-determiner)
......@@ -66,4 +67,7 @@
("WP$" wh-possessive-pronoun)
("WRB" wh-adverb)
("XX" unknown)
("`" opening-quotation-mark)))
("`" opening-quotation-mark)
;; Adding dependency relations that function as categories as well:
("aux" aux)
("auxpass" auxpass)))
......@@ -30,6 +30,10 @@
;; We use the same method for simultaneously representing information regarding functional structure,
;; dependency relations, and part-of-speech information.
(defun retrieve-lexical-fcg-category (word-dependency-spec &optional (pos-tags *english-pos-tags-spacy*))
(second (or (assoc (word-dependency-spec-syn-role word-dependency-spec) pos-tags :test #'string=)
(assoc (word-dependency-spec-pos-tag word-dependency-spec) pos-tags :test #'string=))))
(defmethod represent-functional-structure ((dependency-tree list)
(transient-structure coupled-feature-structure)
(key (eql :english)) &optional (language *english-dependency-specs*))
......@@ -75,10 +79,12 @@
;; (4) We collect the unit
collect `(,(word-dependency-spec-unit-name word-spec)
,@(if dependent-specs `((dependents ,dependent-unit-names)))
,@(if dependency-head `((dep-head ,dependency-head)))
,@(if functional-structure `((functional-structure ,@functional-structure)))))))
(retrieve-lexical-fcg-category word-spec *english-pos-tags-spacy*)
:features-so-far `(,@(if dependent-specs `((dependents ,dependent-unit-names)))
,@(if dependency-head `((dep-head ,dependency-head)))
,@(if functional-structure `((functional-structure ,functional-structure)))))))))
;; Now we add the new units to the transient structure.
;; This is situated in the left-pole-structure of the transient structure (right-pole-structure is no longer used).
(setf (left-pole-structure transient-structure)
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