;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; This file is part of AIslash. ; ; AIslash is free software: you can redistribute it and/or modify ; it under the terms of the GNU General Public License as published by ; the Free Software Foundation, either version 3 of the License, or ; (at your option) any later version. ; ; AIslash is distributed in the hope that it will be useful, ; but WITHOUT ANY WARRANTY; without even the implied warranty of ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ; GNU General Public License for more details. ; ; You should have received a copy of the GNU General Public License ; along with AIslash. If not, see . ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;

Linguistic Hedges

;

This file implements a set of linguistic hedges (e.g. ; "normal", ;"lots", "few") as a fuzzy logic membership functions. ;Note that all these functions are labelled top to bottom, 0.1, 0.2, ;0.3, ... 1.0. ;

Normal

(defun normal! ()
   (buckets
    ~
    ~
    ~~~
    ~~~~~~
    ~~~~~~~~~~
    ~~~~~~~~~~
    ~~~~~~
    ~~~
    ~
    ~))
;

True (ish)!

(defun true! ()
  (buckets
   ~
   ~
   ~
   ~
   ~
   ~~~~~~~
   ~~~~~~~
   ~~~~~~~
   ~~~~~~~
   ~~~~~~~
   ))
(defun true-ish! ()
  (buckets
   ~
   ~
   ~
   ~~
   ~~~
   ~~~~~
   ~~~~~~~
   ~~~~~~~~~
   ~~~~~~~~~
   ~~~~~~~~~
   ))
(defun false! ()  (flip (true!)))
;

False (ish)!

(defun false-ish! () (opposite (true-ish!)))
(defun false!     () (opposite (true!)))
;

Lots! Some! Few! Rare!

(defun lots! ()
  (buckets
   ~
   ~
   ~
   ~
   ~
   ~
   ~~~
   ~~~~~
   ~~~~~~~~
   ~~~~~
   ))
(defun some! ()
  (buckets
   ~
   ~
   ~
   ~
   ~
   ~~~
   ~~~~~~~
   ~~~~~~~
   ~~~
   ~~
   ))
(defun few!  () (opposite (some!)))
(defun rare! () (opposite (lots!)))
;