; -*- Mode: Lisp -*- ; ; Author: Henrik Theiling ; ; Description: ; ; The word structure of Tyl-Sjok. Provides some functions and ; variables in the module LEX: STEM, COMPOSITE, *TYL-SJOK* ; ; ; @@LICENCE@@ ; ;; Overview of the current structure of Tyl-Sjok. ;; ;; # syllables # mora # phonemes # values ;;------------------------------------------------------------------ ;; Stufe 0a: k 0 1 1 ;; Stufe 0b: a, ja 1 1 1 ;;------------------------------------------------------------------ ;; Stufe 1: ka 1 1 2 2 ;; Stufe 2: kak 1 2 3 3 ;; Stufe 3: kaka 2 2 4 4 ;; Stufe 4a: kaNka 2 3 5 4 ;; Stufe 4b: kakak 2 3 5 5 ;; Stufe 5: kaNkak 2 4 6 5 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (provide :words-tyl-sjok) (eval-when (:load-toplevel :compile-toplevel :execute) (make-package :words-tyl-sjok) ) (in-package :words-tyl-sjok) ;; this is our implementation package (require :words) (use-package :words) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Structure of Tyl-Sjok (defvar *cons-a* '( ("" "?" "=") ;; When parsing: also accept forms with = or ? at the beginning. "t" "s" "n" "l" "k" "x" "h" ) ) (defvar *cons-am* '( ("=" "?" "") ;; indicator if glottal stop was selected inside word. ;; When parsing, also accept form without = or with leading ? ("t" "=t") ("s" "=s") ("n" "=n") ("l" "=l") ("k" "=k") ("x" "=x") ("h" "=h") ) ) (defvar *cons-m* '( ("ts" "t=s") ("nt" "n=t") ("kx" "k=x") ("ngk" "ng=k") ) ) (defvar *cons-z* '( "t" "s" "n" "l" "k" "x" "ng" ) ) (defvar *vowel* '( "i" "y" "u" "e" "w" "o" "a" "jy" "ju" "je" "jw" "jo" "ja" ) ) (defvar *phonotactics-raw* `( ; 2 phonemes ((,*cons-a* ,*vowel*) 10) ; 3 phonemes ((,*cons-a* ,*vowel* ,*cons-z*) 10) ; 4 phonemes: 2 variants ((,*cons-a* ,*vowel* ,*cons-am* ,*vowel*) 7) ((,*cons-a* ,*vowel* ,*cons-m* ,*vowel*) 3) ; 5 phonemes: 2 variants ((,*cons-a* ,*vowel* ,*cons-am* ,*vowel* ,*cons-z*) 6) ((,*cons-a* ,*vowel* ,*cons-m* ,*vowel* ,*cons-z*) 4) ) ) (defvar *phonotactics* (make-structure *phonotactics-raw* :global-weight t)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Tests: (defun test () (format t "~&~a~&" (decompose-word *phonotactics* "ti")) ) ;; end