Channel Apps
[Markdown] 

GDMWiki: StatementStructureCode1

Statment Structure View

Racket Slideshow's with-steps let me work through an attempt to use on-line class time to see the common structure in statements

  • https://tiksi.net/cloud/bsmall2/001-LPclasses/010-GeneralPrints/Statement-Structure-View.ps

After #lang slideshow


(require racket/draw slideshow/step rsvg); slideshow/text) (enable-click-advance! #f) (set-spotlight-style! ;; from scripts/TH-slides-from-text... #:size 70 #:color (make-object color% 255 0 0 .5)) ;;(define font-size-start (* 7 (current-font-size))) (current-font-size 38) (current-main-font "Manjari") ;; end of settings above (define actor-long-text "The woman ") (define actdo-long-text "is putting ") (define thing-long-text "the letters ") (define dirct-long-text "Direction ") (define place-long-text "the table.") ; add punctuation later? (define actor-text-pict (t actor-long-text)) (define actor-slot (ghost actor-text-pict)) (define (actor-t txt) (actor-jstfy (t txt) actor-slot)) ;; (actor-t "He"); ok! ;; (vl-append (actor-t "The woman ") (actor-t "She ")) ; ok! ;; ; The unit of meaning is the sentence. ; Iar PoR qut Aristotle (define (make-unit-part-slot lng-txt) (ghost (t lng-txt))) (define-values (actor-jstfy actdo-jstfy thing-jstfy dirct-jstfy place-jstfy) (values lc-superimpose cc-superimpose cc-superimpose cc-superimpose rc-superimpose)) (define actdo-slot ;; act verb operation 動詞 (make-unit-part-slot actdo-long-text)) (define thing-slot (make-unit-part-slot thing-long-text)) (define dirct-slot (make-unit-part-slot dirct-long-text)) (define place-slot (make-unit-part-slot place-long-text)) (define (dirct-t txt) (dirct-jstfy (t txt) dirct-slot)) (define (place-t txt) (place-jstfy (t txt) place-slot)) (define (actdo-t txt) (actdo-jstfy (t txt) actdo-slot)) (define (thing-t txt) (thing-jstfy (t txt) thing-slot)) (define (sntnc-t actor actdo thing dirct place) (ht-append (actor-t actor) (actdo-t actdo) (thing-t thing) (dirct-t dirct) (place-t place))) (define thewomanwp (sntnc-t "The woman " "will put " "the bag" "on " "the table.")) (define shewp (sntnc-t "She " "will put " "the bag" "on " "the table.")) (define (size-act-pict-3rd svg) (scale-to-fit (svg-file->pict svg) (- (/ client-w 3) 50) (/ client-h 3))) #;(void (with-steps (sheputwll sheputing sheputdid) (slide (hc-append 50 ;; times 2 and use to scale-down width of fitted pict in Fun:size-act-pict-3rd ((vafter sheputwll) (size-act-pict-3rd "svgs/sheputbagtable020.svg")) ((vafter sheputing) (size-act-pict-3rd "svgs/sheputbagtable030.svg")) ((vafter sheputdid) (size-act-pict-3rd "svgs/sheputbagtable040.svg")) ); hc-append ))) ; slide, with-steps, void (void (with-steps (intro structja thewoman1 she1 sheblnk1 shepting sheblnk2 sheput mantake hetake1 heblnk1 hetking heblnk2 hetook wmngve shegveman shegvehim shegvn shegav shllgo shgoin shewnt ;; shesees shesaid shesaidtohim ;; sheseesontable ;; sheputbird ) (slide ((vonly intro) (colorize (para #:width client-w "These statements are from our class in the form: ") "gray")) (vl-append 20 (sntnc-t "Person " "Act " "Thing " "Directive " "Place ") ((vafter structja) (sntnc-t "人 " "動作 " "物 " "方向詞 " "場所 ")) (lt-superimpose ((vonly thewoman1) thewomanwp) ((vonly she1) shewp) ((vonly sheblnk1) (sntnc-t "She " " " "the bag " "on " "the table.")) ((vonly shepting) (sntnc-t "She " "is putting " "the bag " "on " "the table.")) ((vonly sheblnk2) (sntnc-t "She " " " "the bag" "on " "the table.")) ((vafter sheput) (sntnc-t "She " "put " "the bag " "on " "the table.")) );lt-superimpose (lt-superimpose (hc-append 50 ;; times 2 and use to scale-down width of fitted pict in Fun:size-act-pict-3rd ((vbetween thewoman1 sheput) (size-act-pict-3rd "svgs/sheputbagtable020.svg")) ((vbetween sheblnk1 sheput) (size-act-pict-3rd "svgs/sheputbagtable030.svg")) ((vbetween sheblnk2 sheput) (size-act-pict-3rd "svgs/sheputbagtable040.svg")) );; hcappend (vl-append (lt-superimpose ((vonly mantake) (sntnc-t "The man " "will take " "the book " "off " "the table.")) ((vonly hetake1) (sntnc-t "He " "will take " "the book " "off " "the table.")) ((vonly heblnk1) (sntnc-t "He " " " "the book" "off " "the table.")) ((vonly hetking) (sntnc-t "He " "is taking " "the book " "off " "the table.")) ((vonly heblnk2) (sntnc-t "He " " " "the book " "off " "the table.")) ((vafter hetook) (sntnc-t "He " "took " "the book " "off " "the table.")) ); lt-superimpose (lt-superimpose (hc-append 50 ;; times 2 and use to scale-down width of fitted pict in Fun:size-act-pict-3rd ((vbetween mantake hetook) (size-act-pict-3rd "svgs/hetakebooktable020.svg")) ((vbetween heblnk1 hetook) (size-act-pict-3rd "svgs/hetakebooktable030.svg")) ((vbetween heblnk2 hetook) (size-act-pict-3rd "svgs/hetakebooktable040.svg")) );; hcappend (vl-append (lt-superimpose ((vonly wmngve) (sntnc-t "The woman " "will give " "the bag " "to " "the man.")) ((vonly shegveman) (sntnc-t "She " "will give " "the bag " "to " "the man.")) ((vonly shegvehim) (sntnc-t "She " "will give " "the bag " "to " "him.")) ((vonly shegvn) (sntnc-t "She " "is giving " "the bag " "to " "him.")) ((vafter shegav) (sntnc-t "She " "gave " "the bag " "to " "him.")) ); lt-superimpose (lt-superimpose ((vonly shllgo) (sntnc-t "She " "will go " " " "to " "the door.")) ((vonly shgoin) (sntnc-t "She " "is going " " " "to " "the door.")) ((vafter shewnt) (sntnc-t "She " "went " " " "to " "the door.")) ); lt-superimpose ((vafter shesaid) (sntnc-t "She " "said " "the words." " " " ")) ((vafter shesaidtohim) (sntnc-t "She " "said " "the words " "to " "him.")) ); vl-append, after take sentence for take images ); lt-superimpose, for replacing take images with remaining sentences );vl-append, after put sentence, for put images ); lt-superimpose for replacing first sentences images with rest of sentences #| ((vafter shesees) (sntnc-t "She " "saw " "the bird." " " " ")) ((vafter sheseesontable) (sntnc-t "She " "saw " "the bird " "on " "the table.")) ((vafter sheputbird) (sntnc-t "She " "put " "the bird " "on " "the table.")) |# );;vl-append ))) ;; slide, with-steps, void #;(slide (vl-append (sntnc-t "The woman " "is putting " "the book" "on " "the table.") (sntnc-t "She ""put " "the book " "on ""the table.") (sntnc-t "He " "is taking " "the book " "off " "the table.") (sntnc-t "He " "put " "the book " "in " "the box.") (sntnc-t "She " "is taking " "the book " "from " "the box.") (sntnc-t "She " "will give " "the book " "to " "the man.") ))