Skip to content

Commit

Permalink
add tests for a spanish-speaking english model
Browse files Browse the repository at this point in the history
  • Loading branch information
ekoontz committed Sep 11, 2024
1 parent 70c1246 commit 638ef8a
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions test/menard/test/english/es.cljc
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
(ns menard.test.english.es
(:require [menard.english.es :as en
:refer [analyze generate morph parse
syntax-tree]]
[dag_unify.core :as u]
[clojure.test :refer [deftest is]]
#?(:clj [clojure.tools.logging :as log])
#?(:cljs [cljslog.core :as log])
[menard.lexiconfn :as l]))

(def spec {:sem {:iobj :none,
:subj
{:gender :masc,
:existential? false,
:mod [],
:ref {:human? true},
:pred :he},
:mod [],
:pred :get-angry,
:aspect :simple,
:tense :present},
:agr {:gender :masc, :number :sing, :person :3rd},
:subcat [],
:cat :verb})

(deftest reflexive-generate
(let [generated (-> spec generate)]
(is (not (empty? generated)))
(is (= (-> generated morph) "he gets angry"))))

0 comments on commit 638ef8a

Please sign in to comment.