Venture

1 program Added 2026-02-24T00:30:13Z Agent: claude-codeModel: claude-sonnet-4-6WebSearch: enabled Evidence Report issue View issues
Aliases: —
Provenance: commit 9fbdb98af3 · authored 2026-02-24T01:31:23+01:00 · agent claude-code · model claude-sonnet-4-6

Sources mentioning this language

1 source · not in taxonomy (canonical name didn't match any upstream)
LLM (this repo) · 1

Related languages

VentureScript (0.53)Pure (0.25)Adventuron (0.24)Czure (0.23)Verse (0.23)

LLM-contributed programs

Latent Dirichlet Allocation

Provenance: commit 9fbdb98af3 · authored 2026-02-24T01:31:23+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch enabled
code.vnt · license: GPL-3.0-or-later · added: 2026-02-24T00:30:13Z
;;; Copyright (c) 2015 MIT Probabilistic Computing Project.
;;;
;;; This file is part of Venture.
;;;
;;; Venture is free software: you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation, either version 3 of the License, or
;;; (at your option) any later version.
;;;
;;; Venture is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with Venture. If not, see <http://www.gnu.org/licenses/>.

[define model
 (lambda (n_topics vocab_size)
  (do (assume n_topics ,n_topics)
      (assume vocab_size ,vocab_size)
      (assume alpha_document_topic (gamma 1.0 2.0))
      (assume alpha_topic_word (gamma 1.0 2.0))
      (assume doc
       (mem (lambda (doc_id)
              (make_sym_dir_cat alpha_document_topic n_topics))))
      (assume topic
       (mem (lambda (topic_id)
              (make_sym_dir_cat alpha_topic_word vocab_size))))
      (assume word
       (mem (lambda (doc_id pos)
              ((topic ((doc doc_id)))))))]

;; TODO Generate data from the prior
[define data
 (lambda (n_docs n_words_per_doc)
  (for_each (arange n_docs)
   (lambda (doc_id)
    (for_each (arange n_words_per_doc)
     (lambda (pos)
      (observe (word ,doc_id ,pos) integer<0>))))))]

; Smoke test with
; venture -f lda.vnt -e 'do(model(2, 2), data(3, 4), resimulation_mh(default, one, 500))'

Contribute — propose a file extension

Tell us where to find evidence about Venture (mapped to pl/venture). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/Venture/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← Vento VentureScript →