PUBLICATIONS

Filters: philosophy taste emotion common sense semantics programming all

NLP (natural language processing) for NLP (natural language programming)

Write a program to generate 10000 random numbers between 0 and 99 inclusive. You should count how many of times each number is generated and write these counts out to the screen.

Feasibility studies for programming in natural language

Pane and Myers conducted studies asking non-programming fifth-grade users to write descriptions of a Pac-Mac game (in another study, college students were given a spreadsheet programming task). The participants also drew sketches of the game so they could make deictic references. Pane and Myers then analyzed the descriptions to discover what underlying abstract programming models were implied by the users' natural language descriptions. They then used this analysis in the design of the HANDS programming language. HANDS uses a direct-manipulation, demonstrational interface. While still a formal programming language, it hopefully embodies a programming model that is closer to users' "natural" understanding of the programming process before they are "corrupted" by being taught a conventional programming language. They learned several important principles, such as that users rarely referred to loops explicitly, and preferred event-driven paradigms.

Programmatic semantics for natural language interfaces

Perhaps one reason for the absence of explicit looping in natural language is that there already exists basic linguistic constructions that imply a class of procedure which reasons about sets using relational descriptions (e.g. "sweet drinks" as a subset of "drinks"); these set-theoretic constructions seem to supplant the need to narrate looping constructions explicitly. For example, consider the following utterance and the procedure it implies (expressed in Python): The bartender makes a random sweet drink from the menu. bartender.make(random.choice(filter(lambda drink: "sweet" in drink.properties, menu.drinks)))

Metafor: visualizing stories as code

As a person types a story into Metafor, the system continuously updates a side-by-side "visualization" of the person"s narrative as scaffolding code. This code may not be directly executable, but it is meant to help a person reify her thoughts. We believe that Metafor is a novel system which can accomplish at least two main goals: 1) assist novice programmers in developing intuitions about programming; and 2) facilitate intermediate programmers with a brainstorming and "outlining" tool, ahead of "writing."

Toward a programmatic semantics of natural language

Natural language is also generic enough to use the same syntax to declare and compute variables, a manner similar to generic functions of the Common LISP Object System (e.g. "Pacman eats yellow dots" can depending on what"s known, declare that dots are yellow, or apply "eat" only to the subset of dots which are yellow). Unlike in most programming languages, the economic and goal-driven nature of story understanding causes evaluation of natural language expressions to almost always be lazy. For example, it may be sufficient to acknowledge that a procedure for generating the "shortest path" exists without actually specifying one.