Skip to content

Instantly share code, notes, and snippets.

@samuelgoto
Last active November 9, 2017 23:18
Show Gist options
  • Save samuelgoto/d8e95464de3f0ce103f9a88814adee1d to your computer and use it in GitHub Desktop.
Save samuelgoto/d8e95464de3f0ce103f9a88814adee1d to your computer and use it in GitHub Desktop.

Markdown

example:

# import "http://commonsense.org/stdlib.en"
# import "http://opentable.com/restaurants.en"

...

Computation

example:

The sum of a and b is ```a + b```.
The address of a restaurant is ```{street name} {city name} {zip code}````.
The times available for reservations for two are ```fetch("/api").then(x => x.slots)```.

Machine Translation

One of the most interesting aspects of CNLs is that the language that one uses to produce the KR is the same one used to queyr it: controlled natural languages. The other interesting aspect is that machine translation has evolved so much lately that it is plausible to explore if one could make an automated translation from "natural language" to "controlled natural language" with enough training.

One idea is to go through all of wikidata and generate CNL out of it programatically. Then, serve it with the original text in english into a neural network. With tha training, would it be possible to take user input (in natural language) and make the translation automatically to query languages (in controlled natural languages)?

The other massive amount of structure that that has accompanying unstructured data is schema.org data on the web.

Related Work

@samuelgoto
Copy link
Author

Cascal

Cascal is a restaurant.

Address

  • street name: castro
  • street number: 1234
  • city: Mountain-View
  • zipcode: 94043

Opening-Hours

  • 11am to 4pm on Mondays, Tuesday, Wednesdays, Thursdays and Fridays
  • 5pm to 9pm on Saturdays and Sundays

Menu

Entrees

Appetizers

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