Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Derivational representations of natural language semantics, using a typed lambda calculus, implemented in Racket Scheme.

License

Notifications You must be signed in to change notification settings

emacsomancer/frege

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Frege

./images/frege-racket-lc.jpg An early prototype for an implementation of a Montagovian semantics in Racket, realising a compositional derivational typed semantics for natural language.

[Active development move from Gitlab original forge at https://gitlab.com/emacsomancer/frege/.]

Basic Usage

Run use-lingobj.rkt in Racket, which defines number of example linguistic objects.

Currently semantic expressions are composed using a lisp-like1 syntax. So ⟦Mary snores⟧ can be expressed as (mary snores) or (snores mary); the denotation of ⟦Mary loves Bill⟧ as (mary (loves bill)) or ((loves bill) mary) or (mary (bill loves)) or ((bill loves) mary).

You can form arbitrary expressions including lambdas, e.g. λxλy[Snore(x) ∧ Snore(y)] is currently represented in Frege as:

(λ ([x e]) (λ ([y e]) (and (snores x) (snores y))))

And λP∈D<e,t>[P(b)] as:

(λ ([P (-> e t)]) (P bill))

Frege currently checks to make sure that the composition of elements is valid according to the types of the elements, thus the following – equivalent to λP∈D<e,t>[P(b)](m) – produces an error:

> ((λ ([P (-> e t)]) (P bill)) mary)

; #%app: mismatch: left=(-> (-> e t) t) right=e

Screenshots

./images/screenshot02.png

Types

Currently types are represented in a lisp-like syntax (the Frege -> is equivalent to the standard “,” but in prefix notation). Here are some equivalences:

Montagoid Lambda CalculusFrege
<e, t>(-> e t)
<e, <e, t>>(-> e (-> e t))
<e, <e, <e, t>>>(-> e (-> e (-> e t)))
<<e,t>,<<e,t>, t>>(-> (-> e t) (-> (-> e t) t))

fn1: Lisp-*like*: there is no requirement that the first element in an evaluated expression be a procedure.

About

Derivational representations of natural language semantics, using a typed lambda calculus, implemented in Racket Scheme.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages