- if ($also) { # 'is also'.
- if ($also_or) { # 'is also ||'.
- $rhs = $exists.' || '.$rhs;
- } else {
- if ($rhs =~ /^[A-Z]/) {
- if ($rhs =~ /\w+\s*$/) {
- &status("auto insert period to factoid.");
- $rhs = $exists.". ".$rhs;
- } else { # '?' or '.' assumed at end.
- &status("orig factoid already had trailing symbol; not adding period.");
- $rhs = $exists." ".$rhs;
- }
- } elsif ($exists =~ /[\,\.\-]\s*$/) {
- &VERB("U: current has trailing symbols; inserting whitespace + new.",2);
- $rhs = $exists." ".$rhs;
- } elsif ($rhs =~ /^\./) {
- &VERB("U: new text has ^.; appending directly",2);
- $rhs = $exists.$rhs;
- } else {
- $rhs = $exists.', or '.$rhs;
- }
- }