Skip to content

Instantly share code, notes, and snippets.

@ArcticLight
Created August 10, 2014 18:04
Show Gist options
  • Save ArcticLight/bec5a09e3540d3531d02 to your computer and use it in GitHub Desktop.
Save ArcticLight/bec5a09e3540d3531d02 to your computer and use it in GitHub Desktop.
engrish

Engrish

Imagine a world where everything was written in simple statements that a four year old could understand. Obviously, this is not the world we live in, but try to imagine it. What if you could come up with a gently structured syntax using all English keywords that read like a terrible preschool-level book, but could then be machine parsed to produce useful insight and knowledge? What if this graph could then be traversed and matched in order to produce new facts and insight, then queried like a database? This is Engrish.

Imagine the following:

Sally is a person.
Sally is 45lbs.
lbs is a measure of weight.
Heaviness, heavy, heavier describe weight.
Joe is 50lbs.
~
How much heavier is Joe than Sally?

This is the basic core idea. However, it can be extended to include many important and useful constructs as well as powerful features, such as inferences.

Sally is a child.
A child has a parent.
Molly is Sally's mother.
A mother is a type of parent.
~
Who is Sally's parent?

Obviously, it would not be necessarily be possible to create a general purpose knowledge parser for all forms and instances of the English language, however, building a strict-ish syntax for creating relations, assigning properties and values, and creating new recognizable syntax could have many interesting use cases. Extending this model to databases containing millions of entries about various properties and objects could allow a wide range of useful queries in a much more user friendly way than programming language alternatives such as Prolog.

@hawkw
Copy link

hawkw commented Aug 10, 2014

Okay, this is cool :3

Seems like a version of Prolog but written in English and with the ability to return things other than boolean.

Writing a parser for this language would be, like, the Holy Grail of compiler design :P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment