I didn't build the system and may have misunderstood some bits and pieces so take this with a grain of salt.
My understanding is that various conversation lines (f.e. the spouse strings) are tagged and these tags have weights. Tags themselves either require or prohibit (depending on whether they are weighed positive or negative) a particular condition - so f.e. if a dialogue has a positive cruel tag only cruel characters will use it. Weights, in turn, are used to find the most appropriate line (highest weight) out of a pool of possible lines. Very simply put, they are what makes a spouse go with "My Husband/Wife" instead of "Captain". Both are possible, one is more appropriate.