Last active
December 31, 2020 23:36
-
-
Save eignnx/1742fcee704f3613dde2eb67c83371e7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- # Generating Center Embeddings | |
-- [This wikipedia article](https://en.wikipedia.org/wiki/Center_embedding) is about a kind of sentence that is REALLY hard to understand. Click the "Generate" button in the top right to generate sentences! | |
rule start = center_embedding | |
rule center_embedding = subject verb_phrase + "." | |
rule verb_phrase | |
= "slept" | |
| "killed" subject | |
| "longed for the sea" | |
| "was murdered on the high seas" | |
| "visited" subject | |
rule subject | |
= article[Subj] @Subj | |
| article[Subj] @Subj "[ {" + that + "}" subject intermediate_verb "]" | |
data Subj | |
= dog ("dog") | |
| cat ("cat") | |
| hamster ("hamster") | |
| porcupine ("porcupine") | |
| ostrich ("ostrich") | |
| giraffe ("giraffe") | |
| sea_turtle ("sea turtle") | |
| aardvark ("aardvark") | |
| porpoise ("porpoise") | |
| dash_hound ("dash hound") | |
| pterodactly ("pterodactyl") | |
rule article[Subj] = | |
[ostrich] -> "an" | "the" | |
[aardvark] -> "an" | "the" | |
[?] -> "a" | "the" | |
rule that = "that" | "who" | " " | |
rule intermediate_verb | |
= "loved" | |
| "spat upon" | |
| "saw" | |
| "intended to kill" | |
| "arrested" | |
| "plucked" | |
| "avoided" | |
| "was attracted to" | |
| "had observed carefully" | |
| "annoyed" | |
| "consumed" | |
| "minimized" | |
| "treated harshly in the workplace" | |
| "patronized" | |
| "complemented" | |
| "insulted" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
view generated sentences here.