Mercurial > core / lisp/lib/nlp/tests.lisp
changeset 698: |
96958d3eb5b0 |
parent: |
16bb4464adcb
|
author: |
Richard Westhaver <ellis@rwest.io> |
date: |
Fri, 04 Oct 2024 22:04:59 -0400 |
permissions: |
-rw-r--r-- |
description: |
fixes |
2 (:use :cl :std :rt :nlp)) 4 (in-package :nlp/tests) 9 (defvar *test-docs* (make-instance 'document-collection)) 12 (is (= 3 (length (word-tokenize "foo bar baz")))) 13 (is (= 2 (length (sentence-tokenize "This is the first second. Now the second"))))) 16 (is (typep (extract-sections "Testing 1 2 3") 'document-collection))) 18 (deftest porter-stem () 19 (is (string= (stem "hacking") "hack"))) 22 (let ((doc (make-instance 'document :string-contents "test test test"))) 23 (is (= 3 (nlp/doc:term-count 25 (is (= 1.0 (nlp/doc:term-frequency 30 (typep (summarize-text "This is a test which will be summarized by the 'SUMMARIZE-TEXT' function. Yada yada. Test 1 2 3.")