morph-mode for emacs
a mode for creating morphologically forced connections
version 0.5 (initial release)
 
Copyright (c) 2010 by Andrew Fabbro 
(andrew@fabbro.org or andrew.fabbro@gmail.com)

      This program is free software: you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published by
      the Free Software Foundation, either version 3 of the License, or
      (at your option) any later version.

      This program is distributed in the hope that it will be useful,
      but WITHOUT ANY WARRANTY; without even the implied warranty of
      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      GNU General Public License for more details.

      You should have received a copy of the GNU General Public License
      along with this program.  If not, see <http://www.gnu.org/licenses/>.

INTRODUCTION

 Morph mode allows you to make morphologically forced connections.
 MFCs are sentences or phrases in which various words are randomly
 chosen from lists you've defined.  It's primarily used as a 
 brainstorming tool.

 Let's say you're trying to think up some ideas for a fantasy world
 you want to write a novel about.  You create the following lists:

 government: despotic, democratic, anarchic, plutocratic
 environment: tropical, desert, rainforest, ocean, polar
 leader trait: heroic, paranoid, fiendish, weak-willed
 mood of the people: slavish, rebellious, hedonistic, distracted
  
 Now you create a pattern like this:

 A @government@ government in a @environment@ region where the \
 @leader trait@ ruler leads a nation of @mood of the people@ people.

 When you create a morph, it replaces each list-name (betwen the @
 signs) with a randomly chosen word from each list.  For example:

 "A despotic government in a polar region where the fiendish
  ruler leads a nation of hedonistic people."
 "A democratic government in a tropical region where the paranoid
  ruler leads a nation of rebellious people."
 "A plutocratic government in a desert region where the heroic
  ruler leads a nation of distracted people."

 Of course, you can use MFCs for anything: new invention ideas, 
 names of offspring, website names, new religions, etc.

 Reference: O'Reilly's _Mind Performance Hacks_ 

HOW TO USE THIS MODE

 First, load the package with load-file if you have not done
 so ("M-x load-file /path/to/morph-mode.el")

 Second, switch to morph mode ("M-x morph-mode")

 Third, create your morph file.  You will need to define two things:
    lists
    morph patterns
 
 Then press "Control-J" (or M-x morph-gen) and your morphs will 
 appear in a separate buffer (*Morph Output*).

FORMAT
   
 Lines containing '@' are considered patterns and lines containing
 ':' are considered lists.  You should consider '@' and ':' special
 characters for the purpose of morph-mode.

 Any line not having a '@' or ':' is ignored.
 
LISTS

 Lists are in the form:

     list name : element,element,element,...

 The label always comes first.  Preceding/trailing whitespace is trimmed.
 Elements are comma-delimited.  Preceding/trailing whitespace is trimmed.
 Lists cannot span multiple lines.
 
 Examples:
    text editors: emacs, jove, pico, nano
    cities:Paris,Berlin,New York
    colors : red , blue , yellow , pink,orange , green , white

 Notes on lists:
    - lists do not check for uniqueness.  Duplicating an item 
      simply gives it a higher chance of being chosen.
    - if you have more than one list with the same name, the
      later list will replace the earlier one.

MORPH PATTERNS

 Morph patterns are in the form:
    A @foo@ consisting of @bar@ with a @baz@

 Morph patterns cannot span multiple lines.

 In patterns, list references always begin and end with an @ sign.  
 This allows for the use of white space and other characters in the 
 list name.

OUTPUT

 To "run the morph," press Control-J while in morph-mode.  The 
 interpreter will ask you how many morphs you want (how many 
 combinations of your morph pattern).  If you have more than one 
 pattern, you'll get that many morphs for each pattern.

 The interpreter will output all your morphs in a new buffer 
 (*Morph Output*) 

   

