Skip to content

Commit

Permalink
Merge pull request #56 from MarkusQ/patch-1
Browse files Browse the repository at this point in the history
Update observing-sequences.md
  • Loading branch information
longouyang committed Jun 29, 2014
2 parents 01cf625 + f333d03 commit c454f3b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions observing-sequences.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,8 @@ The models above generate sequences of words, but lack constituent structure (or
Probabilistic context-free grammars (PCFGs) are a straightforward (and canonical) way to generate sequences of words with constituent structure. There are many ways to write a PCFG in Church. One especially direct way (inspired by Prolog programming) is to let each non-terminal be represented by a Church procedure; here constituency is embodied by one procedure calling another---that is by causal dependence.

~~~~
(define (sample distribution) (distribution))
(define (terminal t) (lambda () t))
(define D (lambda ()
Expand Down Expand Up @@ -309,8 +311,7 @@ Probabilistic context-free grammars (PCFGs) are a straightforward (and canonical
(S)
~~~~

We have used the procedure `sample`, which applies a thunk (to no arguments), resulting in a sample. `sample` is in fact trivial---it can be defined by:
`(define (sample distribution) (distribution))`.
We have definied a utility procedure `sample`, which applies a thunk (to no arguments), resulting in a sample.

Now, let's look at one of the procedures defining our PCFG in detail.

Expand Down

0 comments on commit c454f3b

Please sign in to comment.