Paste: markov

Author: bb
Mode: factor
Date: Sat, 27 Dec 2008 07:02:10
Plain Text |
: add ( seq seq -- seq )
    [ '[ swap _ [ H{ } clone or [ '[ swap _ at+ ] assoc-each ] keep ] change-at ] assoc-each ] keep ;

: weighted-choice ( chain key -- elem )
    swap at dup [ >alist [ swap ] assoc-map random-weighted* ] [ ] if ;
    
: add-line ( chain line -- chain )
    " " split 2 clump  [ first2 1 swap associate swap associate add ] each ;

: sentence ( chain word -- response )
    tuck 1 -rot 
    [ dupd weighted-choice rot 1+ dup 15 < [ -rot ] dip dupd and ] [ dup ] [ 3drop ] produce
    " " join ;
    swap prefix " " join
    CHAR: . suffix ;

Annotation: markov

Author: bb
Mode: factor
Date: Sat, 27 Dec 2008 07:03:19
Plain Text |
: add ( seq seq -- seq )
    [ '[ swap _ [ H{ } clone or [ '[ swap _ at+ ] assoc-each ] keep ] change-at ] assoc-each ] keep ;

: weighted-choice ( chain key -- elem )
    swap at dup [ >alist [ swap ] assoc-map random-weighted* ] [ ] if ;
    
: add-line ( chain line -- chain )
    " " split 2 clump  [ first2 1 swap associate swap associate add ] each ;

: sentence ( chain word -- response )
    tuck 1 -rot [ dupd weighted-choice rot 1+ dup 15 < [ -rot ] dip dupd and ] [ dup ] [ 3drop ] produce " " join swap prefix " " join CHAR: . suffix ;

Annotation: tiny

Author: bb
Mode: factor
Date: Sat, 27 Dec 2008 07:15:33
Plain Text |
USING: splitting random-weighted grouping random fry hashtables ;
  
: add-line ( chain line -- chain )
    " " split 2 clump [ first2 1 swap associate swap associate [ '[ swap _ [ H{ } clone or [ '[ swap _ at+ ] assoc-each ] keep ] change-at ] assoc-each ] keep ] each ;

: sentence ( chain word -- response )
    tuck 1 -rot [ dupd swap at dup [ >alist [ swap ] assoc-map random-weighted* ] [ ] if rot 1+ dup 15 < [ -rot ] dip dupd and ] [ dup ] [ 3drop ] produce swap prefix " " join CHAR: . suffix [ 1 head >upper ] [ rest ] bi append ;

Annotation: Penny

Author: Everyone
Mode: factor
Date: Thu, 15 Jan 2009 16:25:31
Plain Text |
Hello & Good Morning~

 

Now that we have so many folks working in our offices and seem to be adding more all the time, there appears to be a need for a little refresher course on the refrigerator etiquette within our offices.

While DataSoft supplies several snacks, food and drinks to our employees as a courtesy, not all of the snacks, food and drinks in the kitchen are DataSoft provided.

 

Several of our employees purchase their own food items and drinks for their own use while here on-site. If you do purchase items yourself and store them anywhere within the realm of the kitchen, please be certain to clearly label these items with your personal NAME. This way, people attempting to grab something to eat or drink will not mistakenly take your personal stash. This is very important. If food or drinks are not clearly labeled, then it is assumed that these are available for general consumption. On that same note…..while perusing the fridge or cupboards yourself, please do not touch, take, eat or consume any items with someone’s name on it.

 

I know those pickles look mighty tasty….LOL….and probably are. But they do belong to one of our employees and he or she would like to have those pickles for themselves……LOL…….

 

Anyway, you get the picture. Please clearly label your own items, please do not eat items that are clearly labeled with someone else’s name. This way we will all have the peace and happiness in the community kitchen, that we all seek. Please see me if you have questions or concerns. Thank you.

New Annotation

Summary:
Author:
Mode:
Body: