Postboard Markovian Engine - SwiftAusterity/MarkovianEchoes GitHub Wiki
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
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.
Split the input by sentences using period + space, question mark, semicolon, excl mark, and "and " using known context PER SENTENCE
- isolate known word clusters (think proper names of things like "The Rock" and "Jonathan Swift")
- Isolate comma lists using regex ("word, word, word", "word, word and word", "word, word, and word", "word and word and word")
- split the rest
- Scan comma list clusters and typify unknown words using known words in their cluster
- Typify all split phrases from known context (verb, entity(noun), adjective, numerical/amount adjective)
- If missing verb, find an unknown early word and mark it as the verb
- if missing subject/object find an unknown late word and mark it as an entity/noun
- Typify remaining unknown words as adjectives
- In subsequent sentences do pronoun replacement using prior sentence subject/object
- 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_.-]+)+
- Collate individual words and split by separators, punctuation and space (wordlist) possibly pull out separate sentences and comma lists of adjectives or targets
- Search through the observer's context and brand any context in the word list as such
- Search through the current place for the place's name, things and personas and brand each word in the wordlist as such
- Cut out self-identifiers (I, me, etc)
- Search for known verbs by the observer
- If there are no known verbs declare the first word a verb no matter what it already is.
- 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
- Split wordlist into individual collections "split" by known entity words and the unknown or decorators that precede them
- Isolate and create unknown decorators from known things preceded by unknown words in those collections
- Create unknown Things as the last word in any collection
- Add the new context to the observer
- 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
- Collate individual words and split by separators, punctuation and space (wordlist) possibly pull out separate sentences and comma lists of adjectives or targets
- Search through the observer's context and brand any context in the word list as such
- Search through the current place for the place's name, things and personas and brand each word in the word list as such
- Search for all Places in the universe and brand those words as such
- For all foreign places mentioned, create a linking context to those places in this place
- For all present entities apply or remove decorators (if decorator is on mentioned thing, remove it otherwise apply)
- Cut out self-identifiers (I, me, etc)
- 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