Class: Legion::Extensions::Agentic::Language::Grammar::Helpers::Construal
- Inherits:
-
Object
- Object
- Legion::Extensions::Agentic::Language::Grammar::Helpers::Construal
- Includes:
- Constants
- Defined in:
- lib/legion/extensions/agentic/language/grammar/helpers/construal.rb
Constant Summary
Constants included from Constants
Legion::Extensions::Agentic::Language::Grammar::Helpers::Constants::ACTIVATION_BOOST, Legion::Extensions::Agentic::Language::Grammar::Helpers::Constants::ACTIVATION_DECAY, Legion::Extensions::Agentic::Language::Grammar::Helpers::Constants::ACTIVATION_LABELS, Legion::Extensions::Agentic::Language::Grammar::Helpers::Constants::CONSTRUAL_OPERATIONS, Legion::Extensions::Agentic::Language::Grammar::Helpers::Constants::DEFAULT_ACTIVATION, Legion::Extensions::Agentic::Language::Grammar::Helpers::Constants::ENTRENCHMENT_THRESHOLD, Legion::Extensions::Agentic::Language::Grammar::Helpers::Constants::EXPRESSION_TYPES, Legion::Extensions::Agentic::Language::Grammar::Helpers::Constants::MAX_CONSTRUALS, Legion::Extensions::Agentic::Language::Grammar::Helpers::Constants::MAX_CONSTRUCTIONS, Legion::Extensions::Agentic::Language::Grammar::Helpers::Constants::MAX_HISTORY, Legion::Extensions::Agentic::Language::Grammar::Helpers::Constants::PROMINENCE_TYPES, Legion::Extensions::Agentic::Language::Grammar::Helpers::Constants::SCOPE_LEVELS, Legion::Extensions::Agentic::Language::Grammar::Helpers::Constants::SPECIFICITY_LEVELS
Instance Attribute Summary collapse
-
#construction_id ⇒ Object
readonly
Returns the value of attribute construction_id.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#dynamicity ⇒ Object
readonly
Returns the value of attribute dynamicity.
-
#figure ⇒ Object
readonly
Returns the value of attribute figure.
-
#ground ⇒ Object
readonly
Returns the value of attribute ground.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#perspective ⇒ Object
readonly
Returns the value of attribute perspective.
-
#scene ⇒ Object
readonly
Returns the value of attribute scene.
-
#scope ⇒ Object
readonly
Returns the value of attribute scope.
-
#specificity ⇒ Object
readonly
Returns the value of attribute specificity.
Instance Method Summary collapse
- #background_element ⇒ Object
- #detailed? ⇒ Boolean
- #global_scope? ⇒ Boolean
-
#initialize(scene:, perspective:, figure:, ground:, specificity: :intermediate, scope: :local, dynamicity: 0.5, construction_id: nil) ⇒ Construal
constructor
A new instance of Construal.
- #prominent_element ⇒ Object
- #to_h ⇒ Object
Constructor Details
#initialize(scene:, perspective:, figure:, ground:, specificity: :intermediate, scope: :local, dynamicity: 0.5, construction_id: nil) ⇒ Construal
Returns a new instance of Construal.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/legion/extensions/agentic/language/grammar/helpers/construal.rb', line 17 def initialize(scene:, perspective:, figure:, ground:, specificity: :intermediate, scope: :local, dynamicity: 0.5, construction_id: nil) @id = SecureRandom.uuid @scene = scene @perspective = perspective @figure = figure @ground = ground @specificity = specificity.to_sym @scope = scope.to_sym @dynamicity = dynamicity.clamp(0.0, 1.0) @construction_id = construction_id @created_at = Time.now.utc end |
Instance Attribute Details
#construction_id ⇒ Object (readonly)
Returns the value of attribute construction_id.
14 15 16 |
# File 'lib/legion/extensions/agentic/language/grammar/helpers/construal.rb', line 14 def construction_id @construction_id end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
14 15 16 |
# File 'lib/legion/extensions/agentic/language/grammar/helpers/construal.rb', line 14 def created_at @created_at end |
#dynamicity ⇒ Object (readonly)
Returns the value of attribute dynamicity.
14 15 16 |
# File 'lib/legion/extensions/agentic/language/grammar/helpers/construal.rb', line 14 def dynamicity @dynamicity end |
#figure ⇒ Object (readonly)
Returns the value of attribute figure.
14 15 16 |
# File 'lib/legion/extensions/agentic/language/grammar/helpers/construal.rb', line 14 def figure @figure end |
#ground ⇒ Object (readonly)
Returns the value of attribute ground.
14 15 16 |
# File 'lib/legion/extensions/agentic/language/grammar/helpers/construal.rb', line 14 def ground @ground end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
14 15 16 |
# File 'lib/legion/extensions/agentic/language/grammar/helpers/construal.rb', line 14 def id @id end |
#perspective ⇒ Object (readonly)
Returns the value of attribute perspective.
14 15 16 |
# File 'lib/legion/extensions/agentic/language/grammar/helpers/construal.rb', line 14 def perspective @perspective end |
#scene ⇒ Object (readonly)
Returns the value of attribute scene.
14 15 16 |
# File 'lib/legion/extensions/agentic/language/grammar/helpers/construal.rb', line 14 def scene @scene end |
#scope ⇒ Object (readonly)
Returns the value of attribute scope.
14 15 16 |
# File 'lib/legion/extensions/agentic/language/grammar/helpers/construal.rb', line 14 def scope @scope end |
#specificity ⇒ Object (readonly)
Returns the value of attribute specificity.
14 15 16 |
# File 'lib/legion/extensions/agentic/language/grammar/helpers/construal.rb', line 14 def specificity @specificity end |
Instance Method Details
#background_element ⇒ Object
36 37 38 |
# File 'lib/legion/extensions/agentic/language/grammar/helpers/construal.rb', line 36 def background_element @ground end |
#detailed? ⇒ Boolean
40 41 42 |
# File 'lib/legion/extensions/agentic/language/grammar/helpers/construal.rb', line 40 def detailed? @specificity == :detailed end |
#global_scope? ⇒ Boolean
44 45 46 |
# File 'lib/legion/extensions/agentic/language/grammar/helpers/construal.rb', line 44 def global_scope? @scope == :global end |
#prominent_element ⇒ Object
32 33 34 |
# File 'lib/legion/extensions/agentic/language/grammar/helpers/construal.rb', line 32 def prominent_element @figure end |
#to_h ⇒ Object
48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/legion/extensions/agentic/language/grammar/helpers/construal.rb', line 48 def to_h { id: @id, scene: @scene, perspective: @perspective, figure: @figure, ground: @ground, specificity: @specificity, scope: @scope, dynamicity: @dynamicity, construction_id: @construction_id, created_at: @created_at } end |