Class: ProgramR::Person2

Inherits:
ReplaceTag show all
Defined in:
lib/programr/aiml_elements.rb

Constant Summary collapse

Map =
{
  /\b((with|to|of|for|give|gave|giving) (you|me)|you|i)\b/i => -> (match) do
    if match[3]
      match[2].downcase + ' ' + @@swap[match[3].downcase]
    elsif match[1].downcase == 'you'
      'i'
    elsif match[1].downcase == 'i'
      'you'
    end
  end
}
@@swap =
{'me' => 'you', 'you' => 'me'}

Method Summary

Methods inherited from ReplaceTag

#add, #execute, #initialize

Methods inherited from AimlTag

#inspect, #to_s

Constructor Details

This class inherits a constructor from ProgramR::ReplaceTag