SemanticMemory class

Stores, retrieves, and manages general world-knowledge facts.

Constructors

SemanticMemory({ConsciousnessLogger? logger})

Properties

count → int
Number of facts in semantic memory.
no setter
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

factsAbout(String subject) → List<SemanticFact>
Retrieves facts about a given subject.
forget(String factId) → void
Removes a fact by ID.
generaliseFromEpisodes(List<Memory> memories) → int
Generalises from episodic memories into semantic facts.
getAll() → List<SemanticFact>
All stored facts.
getHighConfidenceFacts({double minConfidence = 0.7}) → List<SemanticFact>
Returns all facts above a minimum confidence threshold.
getMostFrequentFacts(int n) → List<SemanticFact>
Returns the n most frequently seen facts.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
Searches facts whose content contains query tokens.
storeFact({required String subject, required String predicate, required String object, double confidence = 0.5, String? episodeId}) → SemanticFact
Stores or reinforces a subject–predicate–object fact.
storeMemory(Memory memory) → void
Stores a raw Memory object directly (non-triple form).
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited