From af217eaeb166206022159b5b16e9efec4f94153b Mon Sep 17 00:00:00 2001 From: Matthew Hall Date: Thu, 4 Apr 2024 01:20:29 +1300 Subject: Add information about literals --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'README.md') diff --git a/README.md b/README.md index 495c95d..0e70de5 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,7 @@ Direct: %%foo%% - choose a word from the 'foo' category Random: %%?%% - choose a word from any category Variable: %%?foo%% - choose a word from the category assigned to the 'foo' variable Multiple: %%foo|bar%% - choose a word from either the 'foo' or 'bar' category +Literal: %%"foo%% - choose the literal string following the double quote ``` Categories are sets of words/phrases that are randomly chosen from during sentence generation. @@ -43,6 +44,10 @@ This is useful for when you want to include multiple words from the same categor Separating category names and variables with a `|` will choose between the given options. This can be used when you want to pick a word from "foo" or "bar", but not "baz". +Literal values are simply copied into the final sentence verbatim. +Note that these values only begin with a double quote (single quotes are not permitted) and do not terminate with an additional double quote. +The primary use case of literal values is to avoid having to create a new category file for only a handful of options you might not use very often. + ### Data files This program requires a directory of text files in a particular format in order to work. @@ -76,11 +81,12 @@ I think %%bar%% is kind of lame. I would take %%foo|baz%% over %%bar%% any day. %%?x%% and %%?x%% are certainly things that exist. %%?%%: kid tested, mother approved. +My favorite text editor is %%"vi|"emacs%%. ``` ## Planned features / TODO -* Special syntax to choose between literal values rather than a category +* ~~Special syntax to choose between literal values rather than a category~~ * Back-reference system to capture and repeat generated phrases * Learn how Markov chains work -- cgit v1.2.1