Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
How does language work?
<!doctype html>
<html lang="en">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
code {
<h3>How Language works:</h3>
<li><p>The user types a command in language that makes sense to them into a search box. Here are some examples:</p>
<p><code>generate an html form with name age and gender fields</code>
<code>draw a teapot</code>
<li><p>The command is parsed generating many possible interpretations. Each interpretation has a widget (i.e. a small webpage) attached to it that performs a corresponding function. For example, if the user's command was "draw a teapot" the interpretations might have widgets that display various teapot drawings and perhaps some that provide instructions how to draw a teapot.</p></li>
<li><p>The widgets are displayed to the user in a ranked list.The user can up-vote good interpretations and down-vote irrelevant interpretations to improve future rankings. In addition to votes, probability of occurance may also affect an interpration's ranking. </p></li>
<li><p>If none of the resulting interpretations are to the user's liking, they can add a new "language node" to the site that interprets their command as they intended. This is easily done using a query like <a href="/category/main?q=add+language+node" target="_blank">"add language node"</a>. Language nodes can be configured to interpret many commands or just a specific few. To get technical, the configuration is essentially a CFG production rule. This makes it possible to compose language nodes so commands like the following can be interpreted: <code>sum(1, difference(2,3))</code></p></li>
"category": "main",
"components": [
"How does language work?"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment