Trying to get this working... harder than it should be!
This commit is contained in:
commit
d924ef17c6
10 changed files with 615 additions and 0 deletions
7
test/wwui/core_test.clj
Normal file
7
test/wwui/core_test.clj
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
(ns wwui.core-test
|
||||
(:require [clojure.test :refer :all]
|
||||
[wwui.core :refer :all]))
|
||||
|
||||
(deftest a-test
|
||||
(testing "FIXME, I fail."
|
||||
(is (= 0 1))))
|
||||
31
test/wwui/propositions_test.clj
Normal file
31
test/wwui/propositions_test.clj
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
(ns wwui.propositions-test
|
||||
(:require [clojure.test :refer :all]
|
||||
[wwui.propositions :refer :all]))
|
||||
|
||||
(deftest a-test
|
||||
(testing "FIXME, I fail."
|
||||
(is (= 0 1))))
|
||||
|
||||
(deftest "RDP tests"
|
||||
(testing "Simplest constructs"
|
||||
(is (= (recursive-descent-parser [] grammar :noun) nil))
|
||||
(is
|
||||
(=
|
||||
(recursive-descent-parser (pos-tag (tokenize "Brutus killed Caesar")) grammar :noun)
|
||||
'(((["Brutus" "NNP"]) :noun) ["killed" "VBD"] ["Caesar" "NNP"])))
|
||||
(is
|
||||
(=
|
||||
(recursive-descent-parser (pos-tag (tokenize "Brutus killed Caesar")) grammar :noun-phrase)
|
||||
'((((["Brutus" "NNP"]) :noun) :nown-phrase) ["killed" "VBD"] ["Caesar" "NNP"])))
|
||||
(is
|
||||
(=
|
||||
(recursive-descent-parser (pos-tag (tokenize "The Forum")) grammar :noun-phrase)
|
||||
(((["The" "DT"]["Forum" "NNP"]) :noun-phrase))))
|
||||
(is
|
||||
(=
|
||||
(recursive-descent-parser (pos-tag (tokenize "killed Caesar")) grammar :verb)
|
||||
(((["killed" "VBN"]) :verb) ["Caesar" "NNP"])))
|
||||
(is
|
||||
(=
|
||||
(recursive-descent-parser (pos-tag (tokenize "in the Forum")) grammar :locator)
|
||||
(((["in" "IN"]["the" "DT"]["Forum" "NNP"]) :locator) )))))
|
||||
Loading…
Add table
Add a link
Reference in a new issue