Postboard Markovian Engine - SwiftAusterity/MarkovianEchoes GitHub Wiki

Step by step

Key Legend improvements: stuff not done yet in the code but probably should be. No differentiation of what's coming next just "not done"

Merge the "merge" logic into the experience logic and leave "merge" command for the ConveyMeaning function

Misc

Apply/Remove: Verbs normally use apply status but if done to the same target using the same decorator with a different verb that verb will gain removal status.

Decorator Opposites: Decorators can gain opposite status to other decorators if they are used in a removal verb along with the decorator.

Parsing Order

Split the input by sentences using period + space, question mark, semicolon, excl mark, and "and " using known context PER SENTENCE

  1. isolate known word clusters (think proper names of things like "The Rock" and "Jonathan Swift")
  2. Isolate comma lists using regex ("word, word, word", "word, word and word", "word, word, and word", "word and word and word")
  3. split the rest
  4. Scan comma list clusters and typify unknown words using known words in their cluster
  5. Typify all split phrases from known context (verb, entity(noun), adjective, numerical/amount adjective)
  6. If missing verb, find an unknown early word and mark it as the verb
  7. if missing subject/object find an unknown late word and mark it as an entity/noun
  8. Typify remaining unknown words as adjectives
  • In subsequent sentences do pronoun replacement using prior sentence subject/object

Current comma split regexes

  • word, word, word, word- ([a-zA-Z0-9_.-]+)((,|,\s)[a-zA-Z0-9_.-]+)+
  • word, word, word and word- ([a-zA-Z0-9_.-]+)((,|,\s)[a-zA-Z0-9_.-]+)+(\sand\s)([a-zA-Z0-9_.-]+)
  • word, word, word, and word ([a-zA-Z0-9_.-]+)((,|,\s)[a-zA-Z0-9_.-]+)+(,\sand\s)([a-zA-Z0-9_.-]+)
  • word and word and word and word- ([a-zA-Z0-9_.-]+)((\sand\s)[a-zA-Z0-9_.-]+)+

Actions

  1. Collate individual words and split by separators, punctuation and space (wordlist) possibly pull out separate sentences and comma lists of adjectives or targets
  2. Search through the observer's context and brand any context in the word list as such
  3. Search through the current place for the place's name, things and personas and brand each word in the wordlist as such
  4. Cut out self-identifiers (I, me, etc)
  5. Search for known verbs by the observer
  6. If there are no known verbs declare the first word a verb no matter what it already is.
  7. If the verb is already an entity but not a known verb make it a new verb and add the entities decorator list to it
  8. Split wordlist into individual collections "split" by known entity words and the unknown or decorators that precede them
  9. Isolate and create unknown decorators from known things preceded by unknown words in those collections
  10. Create unknown Things as the last word in any collection
  11. Add the new context to the observer
  12. Apply or remove decorators to the target based on the verb-decorator logic

Construction of output: An action is outputted to observers in white text with a random but not typed in effect as: {0} {1}, Actor, action text

Speech

  1. Collate individual words and split by separators, punctuation and space (wordlist) possibly pull out separate sentences and comma lists of adjectives or targets
  2. Search through the observer's context and brand any context in the word list as such
  3. Search through the current place for the place's name, things and personas and brand each word in the word list as such
  4. Search for all Places in the universe and brand those words as such
  5. For all foreign places mentioned, create a linking context to those places in this place
  6. For all present entities apply or remove decorators (if decorator is on mentioned thing, remove it otherwise apply)
  7. Cut out self-identifiers (I, me, etc)
  8. Generate a new Place using the target word and convey meaning to it from the actor

Construction of output: Speech is outputted to observers in Blue text normal oriented with a typed-in effect as: {0} says "{1}", Actor, action text

⚠️ **GitHub.com Fallback** ⚠️