Skip to content

Instantly share code, notes, and snippets.

@aria42
Created September 19, 2010 19:44
Show Gist options
  • Select an option

  • Save aria42/587057 to your computer and use it in GitHub Desktop.

Select an option

Save aria42/587057 to your computer and use it in GitHub Desktop.
;; Gibbs Sampling State - All distributions are DirichletMultinomial
;; type-assigns: map word string to tag state (integer)
;; tag-prior: prior distr over tag assignment
;; trans-distrs: map of tag => P(tag' | tag) distribution
;; emission-distrs: tag => P(word | tag) distribution, word=string representation
;; feat-distrs: tag => feat-type => P(feat-val | feat-type,tag) distribution
(defrecord State [type-assigns tag-prior trans-distrs emission-distrs feat-distrs])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment