Skip to content

Context-free grammar generator#1

Open
unbibium wants to merge 4 commits intoblhack:gh-pagesfrom
unbibium:gh-pages
Open

Context-free grammar generator#1
unbibium wants to merge 4 commits intoblhack:gh-pagesfrom
unbibium:gh-pages

Conversation

@unbibium
Copy link

@unbibium unbibium commented Feb 2, 2016

These changes will allow more flexibility in phrase generation.

This allows other string patterns to be added easily, for example replacing "the" with a choice of other modifiers.

Also, the random percentage case is calculated each time it is needed, instead of once when the page loads.

New tags should be added to the grammar object.  The key should be a word, and the value should be a list of strings, some of which may contain other keys in the grammar.  Be careful; there is no check for infinite recursion.  Also, if the same tag appears twice at any stage of processing, both tags will be replaced with the same choice.
so that the title shows up in Facebook posts and other things that care about metadata.
changeMessage() is now a context-free grammar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant