Methods
_analyzeQuery()
Analyze query to determine search characteristics
.Analyze query to determine search characteristics
- Source:
_buildContext()
Build context for the LLM from conversation history and relevant memories
.Build context for the LLM from conversation history and relevant memories
- Source:
_buildFilterClauses(filters) → {string}
Build SPARQL filter clauses from ZPT pan parameters
.Build SPARQL filter clauses from ZPT pan parameters
Parameters:
Name | Type | Description |
---|---|---|
filters |
Object | Filter configuration (domains, keywords, temporal, etc.) |
- Source:
Returns:
SPARQL filter clauses
- Type
- string
_calculateCosineSimilarity(vecA, vecB) → {number}
Calculate cosine similarity between two vectors
.Calculate cosine similarity between two vectors
Parameters:
Name | Type | Description |
---|---|---|
vecA |
Array.<number> | First vector |
vecB |
Array.<number> | Second vector |
- Source:
Returns:
Similarity score between 0 and 1
- Type
- number
_calculateFinalScore()
Calculate final score based on query analysis and result characteristics
.Calculate final score based on query analysis and result characteristics
- Source:
(async) _callChat()
Call chat method using the appropriate provider interface
.Call chat method using the appropriate provider interface
- Source:
(async) _callCompletion()
Call completion method using the appropriate provider interface
.Call completion method using the appropriate provider interface
- Source:
_createConversation()
Create a new conversation
.Create a new conversation
- Source:
(async) _createCorpusInterface()
Create a basic corpus interface for ZPT components
.Create a basic corpus interface for ZPT components
- Source:
_determineStrategy()
Determine optimal search strategy based on query analysis
.Determine optimal search strategy based on query analysis
- Source:
(protected) _emitMetric()
Emit a metric event
.Emit a metric event
- Source:
_estimateServiceRelevance()
Helper methods
.Helper methods
- Source:
_estimateTokens()
Estimate tokens for corpuscles (simple heuristic)
.Estimate tokens for corpuscles (simple heuristic)
- Source:
(async) _executeNavigationFallback()
Fallback navigation implementation when NavigationEndpoint is not available
.Fallback navigation implementation when NavigationEndpoint is not available
- Source:
(async) _executeParallelSearches()
Execute searches across all services in parallel
.Execute searches across all services in parallel
- Source:
(async) _executeSequentialSearches()
Execute searches across services sequentially
.Execute searches across services sequentially
- Source:
(async) _executeServiceSearch()
Execute search on a specific service
.Execute search on a specific service
- Source:
_formatEntity()
Format entity for API response
.Format entity for API response
- Source:
_formatRelationship()
Format relationship for API response
.Format relationship for API response
- Source:
_formatSemanticUnit()
Format semantic unit for API response
.Format semantic unit for API response
- Source:
_getConversation()
Get or create a conversation
.Get or create a conversation
- Source:
(async) _initializeZPTComponents()
Initialize ZPT-specific components
.Initialize ZPT-specific components
- Source:
_normalizeResults()
Normalize results from different services to a common format
.Normalize results from different services to a common format
- Source:
_parseJsonValue(jsonStr) → {any}
Parse JSON value safely, returning empty object/array on failure
.Parse JSON value safely, returning empty object/array on failure
Parameters:
Name | Type | Description |
---|---|---|
jsonStr |
string | JSON string to parse |
- Source:
Returns:
Parsed value or default
- Type
- any
_parseQueryResults(result, zoomLevel) → {Array.<Object>}
Parse SPARQL query results into ZPT corpuscle format
.Parse SPARQL query results into ZPT corpuscle format
Parameters:
Name | Type | Description |
---|---|---|
result |
Object | SPARQL query result |
zoomLevel |
string | The zoom level for result interpretation |
- Source:
Returns:
Parsed corpuscles
- Type
- Array.<Object>
_rankAndMergeResults()
Rank and merge results from multiple services
.Rank and merge results from multiple services
- Source:
_sanitizeParams()
Sanitize parameters for logging (remove sensitive data)
.Sanitize parameters for logging (remove sensitive data)
- Source:
(async) _searchEntities()
Search entities by name/type
.Search entities by name/type
- Source:
(async) _searchSemantic()
Semantic search using embeddings
.Semantic search using embeddings
- Source:
_selectServices()
Select services based on query analysis
.Select services based on query analysis
- Source:
(async) _serializeTriples()
Serialize triples to specified format
.Serialize triples to specified format
- Source:
_simpleMergeResults()
Simple merge without ranking (fallback)
.Simple merge without ranking (fallback)
- Source:
_triplesToJSON()
Convert triples to JSON format
.Convert triples to JSON format
- Source:
_updateAverage()
Update running average
.Update running average
- Source:
(protected) _validateParams()
Validate operation parameters
.Validate operation parameters
- Source:
(async) adaptiveChunking()
Adaptive chunking strategy
.Adaptive chunking strategy
- Source:
addAltLabel(label, langopt)
Add SKOS alternative label
.Add SKOS alternative label
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
label |
string | Alternative label |
||
lang |
string |
<optional> |
'en' | Language tag |
- Source:
addAlternativeName(altName, langopt)
Add an alternative label/name for this entity
.Add an alternative label/name for this entity
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
altName |
string | Alternative name |
||
lang |
string |
<optional> |
'en' | Language tag |
- Source:
addAttribute(content, subTypeopt)
Add an attribute to this entity
.Add an attribute to this entity
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
content |
string | Attribute content |
|
subType |
string |
<optional> |
Attribute sub-type |
- Source:
addChunkOverlap()
Add overlap between consecutive chunks
.Add overlap between consecutive chunks
- Source:
addChunkRelationships()
Add relationships between chunks
.Add relationships between chunks
- Source:
addContent(subject, content)
Add content property to a resource
.Add content property to a resource
Parameters:
Name | Type | Description |
---|---|---|
subject |
NamedNode | Resource |
content |
string | Text content |
- Source:
addEntityConnection(entity, relevanceScoreopt)
Add a connection to an entity that this unit mentions
.Add a connection to an entity that this unit mentions
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
entity |
Entity | NamedNode | string | Entity reference |
|
relevanceScore |
number |
<optional> |
Relevance score (0-1) |
- Source:
addEntityMention(entityURI, relevanceopt)
Add an entity mention to this semantic unit as an RDF triple
.Add an entity mention to this semantic unit as an RDF triple
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
entityURI |
string | The URI of the mentioned entity |
||
relevance |
number |
<optional> |
1.0 | Optional relevance/confidence score |
- Source:
addEvidence(evidence)
Add supporting evidence for this attribute
.Add supporting evidence for this attribute
Parameters:
Name | Type | Description |
---|---|---|
evidence |
SemanticUnit | NamedNode | string | Evidence source (e.g., semantic unit) |
- Source:
addEvidence(evidence)
Add evidence or support for this relationship
.Add evidence or support for this relationship
Parameters:
Name | Type | Description |
---|---|---|
evidence |
RDFElement | NamedNode | string | Evidence source (e.g., semantic unit) |
- Source:
addHypothesisToRDF(hypothesisUnit, entities, relationships, targetDataset) → {number}
Add hypothesis and related data to RDF dataset with ragno:maybe property
.Add hypothesis and related data to RDF dataset with ragno:maybe property
Parameters:
Name | Type | Description |
---|---|---|
hypothesisUnit |
SemanticUnit | Hypothesis semantic unit |
entities |
Array | Extracted entities |
relationships |
Array | Created relationships |
targetDataset |
Dataset | Target RDF dataset |
- Source:
Returns:
Number of triples added
- Type
- number
addInstructions()
Instruction and context enhancement
.Instruction and context enhancement
- Source:
addKeyword(keyword)
Add a keyword/tag to this attribute
.Add a keyword/tag to this attribute
Parameters:
Name | Type | Description |
---|---|---|
keyword |
string | Keyword or tag |
- Source:
addLabel(subject, label, langopt)
Add SKOS preferred label
.Add SKOS preferred label
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
subject |
NamedNode | Resource |
||
label |
string | Label text |
||
lang |
string |
<optional> |
'en' | Language tag |
- Source:
addNamespace(prefix, namespaceURI)
Add a custom namespace
.Add a custom namespace
Parameters:
Name | Type | Description |
---|---|---|
prefix |
string | Namespace prefix |
namespaceURI |
string | Namespace URI |
- Source:
addNode(uri, embedding, metadata) → {number}
Add a node with its embedding to the index
.Add a node with its embedding to the index
Parameters:
Name | Type | Description |
---|---|---|
uri |
string | Node URI |
embedding |
Array.<number> | Vector embedding |
metadata |
Object | Node metadata |
- Source:
Returns:
Node ID in index
- Type
- number
addNodeToIndex(uri, embedding, metadataopt) → {number}
Add single node to vector index
.Add single node to vector index
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
uri |
string | Node URI |
|
embedding |
Array | Vector embedding |
|
metadata |
Object |
<optional> |
Node metadata |
- Source:
Returns:
Node ID
- Type
- number
addNodesBatch(nodes) → {Array.<number>}
Add multiple nodes in batch
.Add multiple nodes in batch
Parameters:
Name | Type | Description |
---|---|---|
nodes |
Array | Array of {uri, embedding, metadata} objects |
- Source:
Returns:
Array of node IDs
- Type
- Array.<number>
addNodesToIndex(nodes) → {Array}
Add nodes to vector index
.Add nodes to vector index
Parameters:
Name | Type | Description |
---|---|---|
nodes |
Array | Array of {uri, embedding, metadata} objects |
- Source:
Returns:
Array of node IDs added
- Type
- Array
addProvenance(sourceURI)
Add provenance information
.Add provenance information
Parameters:
Name | Type | Description |
---|---|---|
sourceURI |
string | Source document/entity URI |
- Source:
addRelationshipTo(targetEntity, description, weightopt, relationshipTypeopt) → {Object}
Add a relationship to another entity
.Add a relationship to another entity
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
targetEntity |
Entity | NamedNode | string | Target entity |
||
description |
string | Relationship description |
||
weight |
number |
<optional> |
1.0 | Relationship weight |
relationshipType |
string |
<optional> |
Type of relationship |
- Source:
Returns:
Relationship information
- Type
- Object
addSource(source)
Add a source document to this entity as an RDF triple
.Add a source document to this entity as an RDF triple
Parameters:
Name | Type | Description |
---|---|---|
source |
string | The source document URI or string |
- Source:
addToContext()
Add interaction to context buffer with similarity score
.Add interaction to context buffer with similarity score
- Source:
addTriple(subject, predicate, object, graphopt)
Add a triple to the dataset
.Add a triple to the dataset
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
subject |
NamedNode | Subject node |
|
predicate |
NamedNode | Predicate node |
|
object |
NamedNode | Literal | Object node or literal |
|
graph |
NamedNode |
<optional> |
Optional graph context |
- Source:
addTriple(predicate, object, graphopt)
Add a triple to the dataset with this element as subject
.Add a triple to the dataset with this element as subject
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
predicate |
NamedNode | Predicate |
|
object |
NamedNode | Literal | Object |
|
graph |
NamedNode |
<optional> |
Optional graph context |
- Source:
addType(subject, type)
Add type declaration for a resource
.Add type declaration for a resource
Parameters:
Name | Type | Description |
---|---|---|
subject |
NamedNode | Resource to type |
type |
NamedNode | RDF type (e.g., ragno:Entity) |
- Source:
addType(type)
Add RDF type to this element
.Add RDF type to this element
Parameters:
Name | Type | Description |
---|---|---|
type |
NamedNode | RDF type |
- Source:
addUnitConnection(unit, relationTypeopt, weightopt)
Add a connection to another semantic unit
.Add a connection to another semantic unit
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
unit |
SemanticUnit | NamedNode | string | Unit reference |
|
relationType |
string |
<optional> |
Type of relationship |
weight |
number |
<optional> |
Connection weight |
- Source:
addZoom(selection, options) → {Object}
Add zoom behavior to a D3 selection
.Add zoom behavior to a D3 selection
Parameters:
Name | Type | Description |
---|---|---|
selection |
Object | D3 selection |
options |
Object | Zoom options |
- Source:
Returns:
Zoom behavior
- Type
- Object
advancedEstimation(text, tokenizerName) → {Object}
Advanced token estimation with tokenizer-specific logic
.Advanced token estimation with tokenizer-specific logic
Parameters:
Name | Type | Description |
---|---|---|
text |
string | Text to estimate |
tokenizerName |
string | Tokenizer name |
- Source:
Returns:
Estimated token count
- Type
- Object
aggregateCommunities(graphData, llmHandler, optionsopt) → {Promise.<{communities: Array.<CommunityElement>, attributes: Array.<Attribute>, dataset: Dataset, statistics: Object}>}
Detect communities and generate comprehensive summaries using Leiden clustering
.Detect communities and generate comprehensive summaries using Leiden clustering
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
graphData |
Object | Graph data with RDF dataset |
|
llmHandler |
Object | LLM handler instance |
|
options |
Object |
<optional> |
Community detection options |
- Source:
Returns:
- Type
- Promise.<{communities: Array.<CommunityElement>, attributes: Array.<Attribute>, dataset: Dataset, statistics: Object}>
aggregationPhase(graph, nodeToCommId) → {Object}
Aggregation phase to create meta-graph
.Aggregation phase to create meta-graph
Parameters:
Name | Type | Description |
---|---|---|
graph |
Object | Graph representation |
nodeToCommId |
Map | Current node to community mapping |
Returns:
Aggregated graph
- Type
- Object
analyzeConfidenceDistribution(entities) → {Object}
Analyze confidence distribution
.Analyze confidence distribution
Parameters:
Name | Type | Description |
---|---|---|
entities |
Array | Array of entities with confidence scores |
- Source:
Returns:
Confidence analysis
- Type
- Object
analyzeContentType()
Analysis and insight extraction
.Analysis and insight extraction
- Source:
(async) analyzeQuery()
Analyze query operation
.Analyze query operation
- Source:
analyzeTextStructure()
Analyze text structure for hierarchical chunking
.Analyze text structure for hierarchical chunking
- Source:
applyContentAdjustments()
Apply content-type specific adjustments
.Apply content-type specific adjustments
- Source:
applyDiversityFilter()
Apply diversity filtering to reduce redundancy
.Apply diversity filtering to reduce redundancy
applyEntityFilter()
Apply entity-based domain filtering
.Apply entity-based domain filtering
- Source:
applyEntityFilters(entities, filters) → {Array}
Apply filters to entity data
.Apply filters to entity data
Parameters:
Name | Type | Description |
---|---|---|
entities |
Array | Array of entities |
filters |
Object | Filter criteria |
- Source:
Returns:
Filtered entities
- Type
- Array
applyFilters(panParams, queryContext) → {Object}
Apply all pan filters to a selection query
.Apply all pan filters to a selection query
Parameters:
Name | Type | Description |
---|---|---|
panParams |
Object | Normalized pan parameters |
queryContext |
Object | Query context and constraints |
- Source:
Returns:
Enhanced query with domain filters
- Type
- Object
applyGeographicFilter()
Apply geographic domain filtering
.Apply geographic domain filtering
- Source:
applyPrivacyFilters()
Apply privacy filters to metadata
.Apply privacy filters to metadata
- Source:
applyTemporalFilter()
Apply temporal domain filtering
.Apply temporal domain filtering
- Source:
applyTokenizerAdjustments()
Apply tokenizer-specific adjustments
.Apply tokenizer-specific adjustments
- Source:
applyTopicFilter()
Apply topic-based domain filtering
.Apply topic-based domain filtering
- Source:
(async) attemptRecovery()
Attempt error recovery
.Attempt error recovery
- Source:
augmentWithAttributes(graphData, llmHandler, optionsopt) → {Promise.<{attributes: Array.<Attribute>, dataset: Dataset, statistics: Object}>}
Augment entities with comprehensive attributes using graph analysis and LLM
.Augment entities with comprehensive attributes using graph analysis and LLM
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
graphData |
Object | Decomposition results with RDF dataset |
|
llmHandler |
Object | LLM handler instance |
|
options |
Object |
<optional> |
Augmentation options |
- Source:
Returns:
- Type
- Promise.<{attributes: Array.<Attribute>, dataset: Dataset, statistics: Object}>
balanceChunkSizes()
Balance chunk sizes for more uniform distribution
.Balance chunk sizes for more uniform distribution
- Source:
(async) batchCountTokens(texts, tokenizer) → {Promise.<Array.<Object>>}
Count tokens for multiple texts in batch
.Count tokens for multiple texts in batch
Parameters:
Name | Type | Default | Description |
---|---|---|---|
texts |
Array.<string> | Array of texts to count |
|
tokenizer |
string | null | Tokenizer name |
- Source:
Returns:
Array of token counts
- Type
- Promise.<Array.<Object>>
buildAggregationQuery()
Build aggregation query for community-level zoom
.Build aggregation query for community-level zoom
- Source:
buildBatchConceptInsert()
Build SPARQL INSERT for batch concept creation
.Build SPARQL INSERT for batch concept creation
- Source:
buildBatchFrequencyUpdate()
Build SPARQL UPDATE for batch frequency updates
.Build SPARQL UPDATE for batch frequency updates
- Source:
buildBatchRelationshipUpdate()
Build SPARQL UPDATE for batch relationship updates
.Build SPARQL UPDATE for batch relationship updates
- Source:
buildCacheKey()
Build cache key for query results
.Build cache key for query results
- Source:
buildCommunities(nodeToCommId) → {Map}
Build communities map from node assignments
.Build communities map from node assignments
Parameters:
Name | Type | Description |
---|---|---|
nodeToCommId |
Map | Node to community mapping |
Returns:
Community ID to nodes mapping
- Type
- Map
buildCompletenessFunction()
Build completeness scoring function
.Build completeness scoring function
buildConnectivityFunction()
Build connectivity scoring function
.Build connectivity scoring function
buildConstraints()
Build hard constraints
.Build hard constraints
buildContext()
Build complete context including history and current prompt
.Build complete context including history and current prompt
- Source:
buildCriteria(normalizedParams) → {Object}
Build complete selection criteria from normalized parameters
.Build complete selection criteria from normalized parameters
Parameters:
Name | Type | Description |
---|---|---|
normalizedParams |
Object | Normalized ZPT parameters |
Returns:
Selection criteria configuration
- Type
- Object
buildDiversityFunction()
Build diversity scoring function
.Build diversity scoring function
buildEntityDetailsQuery(entityUri) → {string}
Build SPARQL query for entity details
.Build SPARQL query for entity details
Parameters:
Name | Type | Description |
---|---|---|
entityUri |
string | Entity URI |
- Source:
Returns:
SPARQL query
- Type
- string
buildEntityExtractionPrompt(query) → {string}
Build entity extraction prompt for LLM
.Build entity extraction prompt for LLM
Parameters:
Name | Type | Description |
---|---|---|
query |
string | User query |
- Source:
Returns:
Prompt for entity extraction
- Type
- string
buildEntityFilter()
Build entity filter clause
.Build entity filter clause
- Source:
buildEntityRule()
Build entity-based selection rule
.Build entity-based selection rule
buildExactMatchQuery(entities, types) → {string}
Build SPARQL query for exact matching
.Build SPARQL query for exact matching
Parameters:
Name | Type | Description |
---|---|---|
entities |
Array | Entity names to search for |
types |
Array | RDF types to include |
- Source:
Returns:
SPARQL query
- Type
- string
buildFilters()
Build filter clauses from pan parameters
.Build filter clauses from pan parameters
- Source:
buildFormattingContext()
Build comprehensive formatting context
.Build comprehensive formatting context
- Source:
buildGeographicFilter()
Build geographic filter clause
.Build geographic filter clause
- Source:
buildGeographicRule()
Build geographic selection rule
.Build geographic selection rule
(async) buildGraphFromRDF(dataset, optionsopt) → {Object}
Build a graph from an RDF dataset (delegates to GraphAnalytics)
.Build a graph from an RDF dataset (delegates to GraphAnalytics)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
dataset |
Dataset | RDF-Ext dataset |
|
options |
Object |
<optional> |
Graph construction options |
Returns:
Graph representation
- Type
- Object
buildGraphFromRDF(dataset, optionsopt) → {Object}
Build adjacency representation from RDF dataset
.Build adjacency representation from RDF dataset
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
dataset |
Dataset | RDF-Ext dataset |
|
options |
Object |
<optional> |
Graph construction options |
Returns:
Graph representation with nodes and edges
- Type
- Object
buildGraphTraversalQuery(entityUris) → {string}
Build SPARQL query for graph traversal
.Build SPARQL query for graph traversal
Parameters:
Name | Type | Description |
---|---|---|
entityUris |
Array | Starting entity URIs |
- Source:
Returns:
SPARQL query for building graph
- Type
- string
buildLimit()
Build LIMIT clause based on transform parameters
.Build LIMIT clause based on transform parameters
- Source:
buildOptimizationRules()
Build optimization rules for performance
.Build optimization rules for performance
buildOrderBy()
Build ORDER BY clause based on tilt representation
.Build ORDER BY clause based on tilt representation
- Source:
buildPrimaryRules()
Build primary selection rules (must-have criteria)
.Build primary selection rules (must-have criteria)
buildQuery(normalizedParams) → {Object}
Build complete SPARQL query from normalized parameters
.Build complete SPARQL query from normalized parameters
Parameters:
Name | Type | Description |
---|---|---|
normalizedParams |
Object | Normalized ZPT parameters |
- Source:
Returns:
Query configuration
- Type
- Object
buildRecencyFunction()
Build recency scoring function
.Build recency scoring function
buildRelevanceFunction()
Build relevance scoring function
.Build relevance scoring function
buildScoringRules()
Build scoring and ranking rules
.Build scoring and ranking rules
buildSecondaryRules()
Build secondary selection rules (preference-based)
.Build secondary selection rules (preference-based)
buildSelectClause(zoomLevel, tiltRepresentation) → {string}
Build zoom-specific SPARQL SELECT clause
.Build zoom-specific SPARQL SELECT clause
Parameters:
Name | Type | Description |
---|---|---|
zoomLevel |
string | The zoom level |
tiltRepresentation |
string | The tilt representation |
- Source:
Returns:
SPARQL SELECT clause
- Type
- string
buildSelectionResult()
Build final selection result object
.Build final selection result object
buildSimilarityQuery()
Build similarity search query for embedding-based tilt
.Build similarity search query for embedding-based tilt
- Source:
buildTemporalFilter()
Build temporal filter clause
.Build temporal filter clause
- Source:
buildTemporalRule()
Build temporal selection rule
.Build temporal selection rule
buildTopicFilter()
Build topic filter clause
.Build topic filter clause
- Source:
buildTopicRule()
Build topic-based selection rule
.Build topic-based selection rule
buildTransformationContext()
Build comprehensive transformation context
.Build comprehensive transformation context
buildTransitionMatrix(graph) → {Map}
Build transition matrix from graph adjacency
.Build transition matrix from graph adjacency
Parameters:
Name | Type | Description |
---|---|---|
graph |
Object | Graph representation |
Returns:
Transition probabilities
- Type
- Map
buildTypeFilter(zoomLevel, includePrimary, includeSecondary) → {string}
Build type filter clause for SPARQL queries
.Build type filter clause for SPARQL queries
Parameters:
Name | Type | Default | Description |
---|---|---|---|
zoomLevel |
string | The zoom level |
|
includePrimary |
boolean | true | Include primary types (default: true) |
includeSecondary |
boolean | false | Include secondary types (default: false) |
- Source:
Returns:
SPARQL type filter clause
- Type
- string
calculateAttributeConfidence(context, content, options) → {number}
Calculate confidence score for generated attribute
.Calculate confidence score for generated attribute
Parameters:
Name | Type | Description |
---|---|---|
context |
Object | Entity context |
content |
string | Generated content |
options |
Object | Calculation options |
- Source:
Returns:
Confidence score 0-1
- Type
- number
calculateCacheHitRate() → {number}
Calculate cache hit rate
.Calculate cache hit rate
- Source:
Returns:
Cache hit rate percentage
- Type
- number
calculateCentroid()
Utility methods
.Utility methods
- Source:
calculateChunkSize()
Calculate chunk size based on strategy
.Calculate chunk size based on strategy
calculateClusterCentroid(memberIndices) → {Array}
Calculate cluster centroid
.Calculate cluster centroid
Parameters:
Name | Type | Description |
---|---|---|
memberIndices |
Array | Array of member node indices |
- Source:
Returns:
Centroid vector
- Type
- Array
calculateCommunityCohesion(community, graph) → {number}
Calculate cohesion score for a community
.Calculate cohesion score for a community
Parameters:
Name | Type | Description |
---|---|---|
community |
Object | Community object |
graph |
Object | Graph object |
- Source:
Returns:
Cohesion score 0-1
- Type
- number
calculateComplexity()
Calculate parameter complexity score
.Calculate parameter complexity score
calculateConfidence()
Quality calculation methods
.Quality calculation methods
- Source:
calculateConfidence()
Calculate confidence in estimation
.Calculate confidence in estimation
- Source:
calculateContentSimilarity()
Calculate content similarity between corpuscles
.Calculate content similarity between corpuscles
calculateCosineSimilarity()
Calculate cosine similarity between embeddings
.Calculate cosine similarity between embeddings
calculateDistance(vector1, vector2) → {number}
Calculate distance between two vectors
.Calculate distance between two vectors
Parameters:
Name | Type | Description |
---|---|---|
vector1 |
Array | First vector |
vector2 |
Array | Second vector |
Returns:
Distance value
- Type
- number
calculateDistance(coords1, coords2) → {number}
Calculate distance between two nodes on the map
.Calculate distance between two nodes on the map
Parameters:
Name | Type | Description |
---|---|---|
coords1 |
Array | [x, y] coordinates of first node |
coords2 |
Array | [x, y] coordinates of second node |
Returns:
Distance between nodes
- Type
- number
calculateHexagonalDistance(coords1, coords2) → {number}
Calculate distance in hexagonal topology
.Calculate distance in hexagonal topology
Parameters:
Name | Type | Description |
---|---|---|
coords1 |
Array | [x, y] coordinates of first node |
coords2 |
Array | [x, y] coordinates of second node |
Returns:
Hexagonal distance
- Type
- number
calculateLearningRate(iteration) → {number}
Calculate learning rate for current iteration
.Calculate learning rate for current iteration
Parameters:
Name | Type | Description |
---|---|---|
iteration |
number | Current iteration |
Returns:
Learning rate
- Type
- number
calculateMapDistance(coords1, coords2) → {number}
Calculate distance between two points on the map
.Calculate distance between two points on the map
Parameters:
Name | Type | Description |
---|---|---|
coords1 |
Array | [x, y] coordinates of first point |
coords2 |
Array | [x, y] coordinates of second point |
Returns:
Distance on the map
- Type
- number
calculateModularity(graph, nodeToCommId) → {number}
Calculate modularity of current community structure
.Calculate modularity of current community structure
Parameters:
Name | Type | Description |
---|---|---|
graph |
Object | Graph representation |
nodeToCommId |
Map | Community assignment |
Returns:
Modularity value
- Type
- number
calculateModularityGain(graph, node, fromComm, toComm, nodeToCommId) → {number}
Calculate modularity gain for moving a node between communities
.Calculate modularity gain for moving a node between communities
Parameters:
Name | Type | Description |
---|---|---|
graph |
Object | Graph representation |
node |
string | Node to move |
fromComm |
number | Source community |
toComm |
number | Target community |
nodeToCommId |
Map | Current community assignment |
Returns:
Modularity gain
- Type
- number
calculateNeighborhoodRadius(iteration) → {number}
Calculate neighborhood radius for current iteration
.Calculate neighborhood radius for current iteration
Parameters:
Name | Type | Description |
---|---|---|
iteration |
number | Current iteration |
Returns:
Neighborhood radius
- Type
- number
calculateNodeSimilarity(index1, index2) → {number}
Calculate similarity between two nodes
.Calculate similarity between two nodes
Parameters:
Name | Type | Description |
---|---|---|
index1 |
number | First node index |
index2 |
number | Second node index |
- Source:
Returns:
Similarity score
- Type
- number
(async) calculateQualityMetrics(vsomCore, trainingData, iteration)
Calculate training quality metrics
.Calculate training quality metrics
Parameters:
Name | Type | Description |
---|---|---|
vsomCore |
Object | VSOM core algorithm instance |
trainingData |
Array | Training data |
iteration |
number | Current iteration |
calculateQuantizationError(inputData) → {number}
Calculate quantization error for the current map
.Calculate quantization error for the current map
Parameters:
Name | Type | Description |
---|---|---|
inputData |
Array | Array of input vectors |
Returns:
Average quantization error
- Type
- number
calculateQueryConfidence(queryData) → {number}
Calculate confidence score for query processing
.Calculate confidence score for query processing
Parameters:
Name | Type | Description |
---|---|---|
queryData |
Object | Processed query data |
- Source:
Returns:
Confidence score 0-1
- Type
- number
calculateRectangularDistance(coords1, coords2) → {number}
Calculate distance in rectangular topology
.Calculate distance in rectangular topology
Parameters:
Name | Type | Description |
---|---|---|
coords1 |
Array | [x, y] coordinates of first node |
coords2 |
Array | [x, y] coordinates of second node |
Returns:
Euclidean distance
- Type
- number
calculateSummaryConfidence(context, summary) → {number}
Calculate confidence for generated summary
.Calculate confidence for generated summary
Parameters:
Name | Type | Description |
---|---|---|
context |
Object | Community context |
summary |
string | Generated summary |
- Source:
Returns:
Confidence score 0-1
- Type
- number
calculateTopographicError(inputData) → {number}
Calculate topographic error for the current map
.Calculate topographic error for the current map
Parameters:
Name | Type | Description |
---|---|---|
inputData |
Array | Array of input vectors |
Returns:
Topographic error (0-1)
- Type
- number
checkAPIHealth()
Check API health
.Check API health
- Source:
checkContextLimits(tokenCount, model, reservedOutputTokens) → {Object}
Check if content fits within model context limits
.Check if content fits within model context limits
Parameters:
Name | Type | Default | Description |
---|---|---|---|
tokenCount |
number | Token count to check |
|
model |
string | Model name |
|
reservedOutputTokens |
number | 1000 | Tokens to reserve for output |
- Source:
Returns:
Context limit check result
- Type
- Object
checkConvergence() → {boolean}
Check if training has converged
.Check if training has converged
Returns:
True if converged
- Type
- boolean
(async) checkDependencyHealth()
Check if a dependency is healthy
.Check if a dependency is healthy
- Source:
checkRateLimit(req) → {boolean}
Check rate limiting for request
.Check rate limiting for request
Parameters:
Name | Type | Description |
---|---|---|
req |
Object | Express request object |
- Source:
Returns:
True if request is allowed
- Type
- boolean
checkRateLimit()
Rate limiting
.Rate limiting
- Source:
(async) chunk(content, options) → {Promise.<Object>}
Main chunking method - splits content based on strategy and constraints
.Main chunking method - splits content based on strategy and constraints
Parameters:
Name | Type | Description |
---|---|---|
content |
string | Array | Content to chunk (string or array of corpuscles) |
options |
Object | Chunking options |
- Source:
Returns:
Chunking result
- Type
- Promise.<Object>
chunkCorpuscles()
Chunk corpuscles hierarchically
.Chunk corpuscles hierarchically
- Source:
(async) chunkHierarchicalText()
Chunk hierarchical text based on structure
.Chunk hierarchical text based on structure
- Source:
classifyError()
Classify error type based on error properties
.Classify error type based on error properties
- Source:
(async) cleanupPartialInitialization()
Cleanup partial initialization on failure
.Cleanup partial initialization on failure
- Source:
clear()
Clear the dataset
.Clear the dataset
- Source:
clear()
Clear the entire index
.Clear the entire index
- Source:
clearCache()
Clear response cache
.Clear response cache
- Source:
clearCache()
Reset and cleanup
.Reset and cleanup
clearCache()
Clear token cache
.Clear token cache
- Source:
clearCaches()
Clear topology caches
.Clear topology caches
clearVectorIndex()
Clear vector index
.Clear vector index
- Source:
clone(modificationsopt) → {Attribute}
Clone this attribute with optional modifications
.Clone this attribute with optional modifications
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
modifications |
Object |
<optional> |
Properties to modify in the clone |
- Source:
Returns:
Cloned attribute
- Type
- Attribute
clone(modificationsopt) → {Entity}
Clone this entity with optional modifications
.Clone this entity with optional modifications
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
modifications |
Object |
<optional> |
Properties to modify in the clone |
- Source:
Returns:
Cloned entity
- Type
- Entity
clone(modificationsopt) → {Relationship}
Clone this relationship with optional modifications
.Clone this relationship with optional modifications
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
modifications |
Object |
<optional> |
Properties to modify in the clone |
- Source:
Returns:
Cloned relationship
- Type
- Relationship
clone(modificationsopt) → {SemanticUnit}
Clone this unit with optional modifications
.Clone this unit with optional modifications
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
modifications |
Object |
<optional> |
Properties to modify in the clone |
- Source:
Returns:
Cloned unit
- Type
- SemanticUnit
clone() → {RDFGraphManager}
Clone the current dataset
.Clone the current dataset
- Source:
Returns:
New instance with cloned data
- Type
- RDFGraphManager
clone(optionsopt) → {RDFElement}
Clone this element with a new URI
.Clone this element with a new URI
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
Object |
<optional> |
Options for the cloned element |
- Source:
Returns:
Cloned element
- Type
- RDFElement
(async) clusterHypotheticalEntities(hypotheticalEntities) → {Promise.<Array>}
Cluster hypothetical entities separately
.Cluster hypothetical entities separately
Parameters:
Name | Type | Description |
---|---|---|
hypotheticalEntities |
Array | Array of hypothetical entities |
- Source:
Returns:
Hypothetical clusters
- Type
- Promise.<Array>
combineResults(resultsArray, optionsopt) → {Object}
Combine results from multiple PPR runs
.Combine results from multiple PPR runs
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
resultsArray |
Array | Array of PPR results |
|
options |
Object |
<optional> |
Combination options |
Returns:
Combined results
- Type
- Object
combineSearchResults(searchResults, options) → {Object}
Combine and rank results from all search strategies
.Combine and rank results from all search strategies
Parameters:
Name | Type | Description |
---|---|---|
searchResults |
Object | Results from all search phases |
options |
Object | Ranking options |
- Source:
Returns:
Combined and ranked results
- Type
- Object
compileTrainingResults(trainingTime) → {Object}
Compile final training results
.Compile final training results
Parameters:
Name | Type | Description |
---|---|---|
trainingTime |
number | Total training time |
Returns:
Complete training results
- Type
- Object
compose(validators)
Create a composite validator from multiple validators
.Create a composite validator from multiple validators
Parameters:
Name | Type | Description |
---|---|---|
validators |
Array | Array of validator names or definitions |
- Source:
compress(uri) → {string}
Create a prefixed name from full URI
.Create a prefixed name from full URI
Parameters:
Name | Type | Description |
---|---|---|
uri |
string | Full URI |
- Source:
Returns:
Prefixed name or original URI if no prefix found
- Type
- string
compressMetadata()
Compress metadata based on compression level
.Compress metadata based on compression level
- Source:
computeBetweennessCentrality(graph, optionsopt) → {Object}
Compute betweenness centrality using Brandes' algorithm
.Compute betweenness centrality using Brandes' algorithm
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
graph |
Object | Graph representation from buildGraphFromRDF |
|
options |
Object |
<optional> |
Algorithm options |
Returns:
Betweenness centrality results
- Type
- Object
computeCommunityStatistics(communities, graph) → {Object}
Compute statistics for detected communities
.Compute statistics for detected communities
Parameters:
Name | Type | Description |
---|---|---|
communities |
Map | Community mapping |
graph |
Object | Original graph |
Returns:
Community statistics
- Type
- Object
computeGraphStatistics(graph) → {Object}
Compute basic graph statistics
.Compute basic graph statistics
Parameters:
Name | Type | Description |
---|---|---|
graph |
Object | Graph representation from buildGraphFromRDF |
Returns:
Graph statistics
- Type
- Object
computeKCore(graph) → {Object}
Compute K-core decomposition K-core of a graph is the maximal subgraph where each vertex has at least k neighbors
.Compute K-core decomposition K-core of a graph is the maximal subgraph where each vertex has at least k neighbors
Parameters:
Name | Type | Description |
---|---|---|
graph |
Object | Graph representation from buildGraphFromRDF |
Returns:
K-core decomposition results
- Type
- Object
computeLeidenClustering(graph, optionsopt) → {Object}
Compute Leiden clustering (alias for detectCommunities for pipeline compatibility)
.Compute Leiden clustering (alias for detectCommunities for pipeline compatibility)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
graph |
Object | Graph representation from GraphAnalytics |
|
options |
Object |
<optional> |
Algorithm options |
Returns:
Community detection results
- Type
- Object
computeLeidenClustering(graph, optionsopt) → {Object}
Compute Leiden clustering (alias for detectCommunities for pipeline compatibility)
.Compute Leiden clustering (alias for detectCommunities for pipeline compatibility)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
graph |
Object | Graph representation from GraphAnalytics |
|
options |
Object |
<optional> |
Algorithm options |
Returns:
Community detection results
- Type
- Object
(async) computeSimilarityLinks(embeddings, vectorIndex, options, dataset, rdfManager) → {Promise.<Object>}
Compute similarity links between nodes
.Compute similarity links between nodes
Parameters:
Name | Type | Description |
---|---|---|
embeddings |
Map | Map of embeddings |
vectorIndex |
Object | Vector index for similarity search |
options |
Object | Similarity options |
dataset |
Dataset | RDF dataset |
rdfManager |
RDFGraphManager | RDF manager |
- Source:
Returns:
Similarity statistics
- Type
- Promise.<Object>
conditional(condition, validator)
Create a conditional validator
.Create a conditional validator
Parameters:
Name | Type | Description |
---|---|---|
condition |
function | Condition function |
validator |
string | Object | Validator to apply if condition is true |
- Source:
connectElements(source, target, weightopt)
Connect two elements with ragno:connectsTo
.Connect two elements with ragno:connectsTo
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
source |
NamedNode | Source element |
|
target |
NamedNode | Target element |
|
weight |
number |
<optional> |
Optional connection weight |
- Source:
connectTo(target, weightopt)
Connect this element to another element
.Connect this element to another element
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
target |
RDFElement | NamedNode | Target element |
|
weight |
number |
<optional> |
Optional weight |
- Source:
connects(entity1, entity2) → {boolean}
Check if this relationship connects two specific entities
.Check if this relationship connects two specific entities
Parameters:
Name | Type | Description |
---|---|---|
entity1 |
RDFElement | NamedNode | string | First entity |
entity2 |
RDFElement | NamedNode | string | Second entity |
- Source:
Returns:
True if relationship connects these entities
- Type
- boolean
convertToCSV(data) → {string}
Convert data to CSV format
.Convert data to CSV format
Parameters:
Name | Type | Description |
---|---|---|
data |
Array | Data to convert |
- Source:
Returns:
CSV string
- Type
- string
coordinatesToIndex(x, y) → {number}
Convert 2D map coordinates to linear index
.Convert 2D map coordinates to linear index
Parameters:
Name | Type | Description |
---|---|---|
x |
number | X coordinate |
y |
number | Y coordinate |
Returns:
Linear index
- Type
- number
coordinatesToIndex(x, y) → {number}
Convert 2D coordinates to linear index
.Convert 2D coordinates to linear index
Parameters:
Name | Type | Description |
---|---|---|
x |
number | X coordinate |
y |
number | Y coordinate |
Returns:
Linear index
- Type
- number
cosineDistance(vector1, vector2) → {number}
Calculate cosine distance (1 - cosine similarity)
.Calculate cosine distance (1 - cosine similarity)
Parameters:
Name | Type | Description |
---|---|---|
vector1 |
Array | First vector |
vector2 |
Array | Second vector |
Returns:
Cosine distance
- Type
- number
countRules()
Count total number of rules
.Count total number of rules
(async) countTokens(text, tokenizer) → {Promise.<Object>}
Count tokens in text using specified tokenizer
.Count tokens in text using specified tokenizer
Parameters:
Name | Type | Default | Description |
---|---|---|---|
text |
string | Text to count tokens for |
|
tokenizer |
string | null | Tokenizer name (optional) |
- Source:
Returns:
Token count result
- Type
- Promise.<Object>
create(text, entity, optionsopt) → {Attribute}
Create an attribute with automatic URI generation
.Create an attribute with automatic URI generation
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
text |
string | Attribute text content |
|
entity |
Entity | NamedNode | string | Associated entity |
|
options |
Object |
<optional> |
Additional options |
- Source:
Returns:
Created attribute
- Type
- Attribute
create(name, optionsopt) → {Entity}
Create an entity with automatic URI generation
.Create an entity with automatic URI generation
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
name |
string | Entity name/label |
|
options |
Object |
<optional> |
Additional options |
- Source:
Returns:
Created entity
- Type
- Entity
create(sourceEntity, targetEntity, descriptionopt, optionsopt) → {Relationship}
Create a relationship between two entities with automatic naming
.Create a relationship between two entities with automatic naming
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
sourceEntity |
RDFElement | NamedNode | string | Source entity |
|
targetEntity |
RDFElement | NamedNode | string | Target entity |
|
description |
string |
<optional> |
Relationship description |
options |
Object |
<optional> |
Additional options |
- Source:
Returns:
Created relationship
- Type
- Relationship
create(text, optionsopt) → {SemanticUnit}
Create a semantic unit with automatic URI generation
.Create a semantic unit with automatic URI generation
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
text |
string | Unit text content |
|
options |
Object |
<optional> |
Additional options |
- Source:
Returns:
Created unit
- Type
- SemanticUnit
(async) createAdaptiveChunk()
Create adaptive chunk from boundary group
.Create adaptive chunk from boundary group
- Source:
createAttribute(entity, content, subTypeopt) → {NamedNode}
Create a ragno:Attribute with entity connection
.Create a ragno:Attribute with entity connection
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
entity |
NamedNode | Entity this attribute describes |
|
content |
string | Attribute content |
|
subType |
string |
<optional> |
Attribute subtype (e.g., "Overview") |
- Source:
Returns:
Created attribute node
- Type
- NamedNode
(async) createAttributeRelationships(attributes, dataset, rdfManager)
Create relationships between attributes for cross-referencing
.Create relationships between attributes for cross-referencing
Parameters:
Name | Type | Description |
---|---|---|
attributes |
Array.<Attribute> | Generated attributes |
dataset |
Dataset | RDF dataset |
rdfManager |
RDFGraphManager | RDF manager |
- Source:
createBidirectional(inverseDescriptionopt, inverseWeightopt) → {Relationship}
Create a bidirectional relationship (adds inverse)
.Create a bidirectional relationship (adds inverse)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
inverseDescription |
string |
<optional> |
Description for inverse relationship |
inverseWeight |
number |
<optional> |
Weight for inverse relationship |
- Source:
Returns:
Inverse relationship
- Type
- Relationship
createCacheKey()
Caching methods
.Caching methods
createCacheKey()
Cache management methods
.Cache management methods
- Source:
createColorScale(scheme, domain) → {function}
Create a color scale
.Create a color scale
Parameters:
Name | Type | Description |
---|---|---|
scheme |
string | D3 color scheme name |
domain |
Array | Domain values |
- Source:
Returns:
D3 color scale
- Type
- function
createCompactRepresentation()
Helper methods for encoding strategies
.Helper methods for encoding strategies
- Source:
createConnector(config) → {Object}
Create an embedding connector based on provider configuration
.Create an embedding connector based on provider configuration
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
config |
Object | Provider configuration Properties
|
Returns:
- Embedding connector instance
- Type
- Object
createDirectEntityFilter()
Entity filter implementations
.Entity filter implementations
- Source:
createEmptyResult(dataset, startTime) → {Object}
Create empty result for cases with no retrievable nodes
.Create empty result for cases with no retrievable nodes
Parameters:
Name | Type | Description |
---|---|---|
dataset |
Dataset | RDF dataset |
startTime |
number | Start time |
- Source:
Returns:
Empty result object
- Type
- Object
createEmptyResults() → {Object}
Create empty results structure
.Create empty results structure
Returns:
Empty results
- Type
- Object
createEntity(name, isEntryPointopt) → {NamedNode}
Create a ragno:Entity with proper RDF structure
.Create a ragno:Entity with proper RDF structure
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
name |
string | Entity name |
||
isEntryPoint |
boolean |
<optional> |
true | Whether entity is an entry point |
- Source:
Returns:
Created entity node
- Type
- NamedNode
createExactTemporalFilter()
Temporal filter implementations
.Temporal filter implementations
- Source:
createExactTopicFilter()
Topic filter implementations
.Topic filter implementations
- Source:
createHypothesisPrompt(input, index, options) → {string}
Create a prompt for hypothesis generation
.Create a prompt for hypothesis generation
Parameters:
Name | Type | Description |
---|---|---|
input |
string | Input query or entity URI |
index |
number | Hypothesis index for variation |
options |
Object | Options for prompt creation |
- Source:
Returns:
Generated prompt
- Type
- string
createHypothesisRelationships(originalInput, hypothesisUnit, entities) → {Array}
Create relationships between query, hypothesis, and extracted entities
.Create relationships between query, hypothesis, and extracted entities
Parameters:
Name | Type | Description |
---|---|---|
originalInput |
string | Original input query |
hypothesisUnit |
SemanticUnit | Hypothesis semantic unit |
entities |
Array | Extracted entities |
- Source:
Returns:
Created relationships
- Type
- Array
createHypothesisUnit(hypothesis, originalInput, index) → {SemanticUnit}
Create a SemanticUnit for a hypothesis
.Create a SemanticUnit for a hypothesis
Parameters:
Name | Type | Description |
---|---|---|
hypothesis |
Object | Generated hypothesis object |
originalInput |
string | Original input query |
index |
number | Hypothesis index |
- Source:
Returns:
Hypothesis semantic unit
- Type
- SemanticUnit
(async) createInterCommunityRelationships(communities, dataset, rdfManager, graph)
Create relationships between overlapping communities
.Create relationships between overlapping communities
Parameters:
Name | Type | Description |
---|---|---|
communities |
Array.<CommunityElement> | Community elements |
dataset |
Dataset | RDF dataset |
rdfManager |
RDFGraphManager | RDF manager |
graph |
Object | Graph object |
- Source:
(async) createInterUnitRelationships(units, dataset, rdfManager)
Create inter-unit relationships for coherence
.Create inter-unit relationships for coherence
Parameters:
Name | Type | Description |
---|---|---|
units |
Array.<SemanticUnit> | List of semantic units |
dataset |
Dataset | RDF dataset |
rdfManager |
RDFGraphManager | RDF graph manager |
- Source:
createLegend(svg, colorScale, options) → {Object}
Create a legend for a color scale
.Create a legend for a color scale
Parameters:
Name | Type | Description |
---|---|---|
svg |
Object | D3 SVG selection |
colorScale |
Object | D3 color scale |
options |
Object | Legend options |
- Source:
Returns:
Legend object with update method
- Type
- Object
createNamedNode(type) → {NamedNode}
Create a new named node with generated URI
.Create a new named node with generated URI
Parameters:
Name | Type | Description |
---|---|---|
type |
string | Resource type |
- Source:
Returns:
RDF named node
- Type
- NamedNode
createNeighborhoodFunction(functionType) → {function}
Create neighborhood function for training
.Create neighborhood function for training
Parameters:
Name | Type | Default | Description |
---|---|---|---|
functionType |
string | gaussian | 'gaussian', 'mexican_hat', 'bubble', 'linear' |
Returns:
Neighborhood function(distance, radius)
- Type
- function
createOverview(entity, text, optionsopt) → {Attribute}
Create an overview attribute for an entity (common pattern)
.Create an overview attribute for an entity (common pattern)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
entity |
Entity | NamedNode | string | Associated entity |
|
text |
string | Overview text |
|
options |
Object |
<optional> |
Additional options |
- Source:
Returns:
Created overview attribute
- Type
- Attribute
createParameterHash()
Create a hash of normalized parameters for caching
.Create a hash of normalized parameters for caching
createPointGeographicFilter()
Geographic filter implementations
.Geographic filter implementations
- Source:
createRelationship(sourceEntity, targetEntity, description, weightopt) → {NamedNode}
Create a ragno:Relationship as first-class RDF resource
.Create a ragno:Relationship as first-class RDF resource
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
sourceEntity |
NamedNode | Source entity |
||
targetEntity |
NamedNode | Target entity |
||
description |
string | Relationship description |
||
weight |
number |
<optional> |
1.0 | Relationship weight |
- Source:
Returns:
Created relationship node
- Type
- NamedNode
createResponsiveSVG(container, options) → {Object}
Create a responsive SVG element
.Create a responsive SVG element
Parameters:
Name | Type | Description |
---|---|---|
container |
HTMLElement | The container element |
options |
Object | Configuration options |
- Source:
Returns:
D3 selection of the SVG element
- Type
- Object
(async) createSOMInstance()
Create a new SOM instance with specified configuration
.Create a new SOM instance with specified configuration
- Source:
createSemanticChunk()
Create semantic chunk object
.Create semantic chunk object
- Source:
createTooltip(options) → {Object}
Create a tooltip
.Create a tooltip
Parameters:
Name | Type | Description |
---|---|---|
options |
Object | Tooltip options |
- Source:
Returns:
Tooltip functions
- Type
- Object
createUnit(content, sourceopt) → {NamedNode}
Create a ragno:Unit with proper RDF structure
.Create a ragno:Unit with proper RDF structure
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
content |
string | Unit content |
|
source |
string |
<optional> |
Source document reference |
- Source:
Returns:
Created unit node
- Type
- NamedNode
cubeToOffset(cube) → {Array}
Convert cube coordinates to offset coordinates
.Convert cube coordinates to offset coordinates
Parameters:
Name | Type | Description |
---|---|---|
cube |
Object | Cube coordinates {x, y, z} |
Returns:
Offset coordinates [col, row]
- Type
- Array
debounce(func, wait) → {function}
Debounce function
.Debounce function
Parameters:
Name | Type | Description |
---|---|---|
func |
function | Function to debounce |
wait |
number | Wait time in ms |
- Source:
Returns:
Debounced function
- Type
- function
(async) decode()
Decoding methods for retrieving metadata
.Decoding methods for retrieving metadata
- Source:
decomposeCorpus(textChunks, llmHandler, optionsopt) → {Promise.<{units: Array.<SemanticUnit>, entities: Array.<Entity>, relationships: Array.<Relationship>, dataset: Dataset}>}
Decompose text chunks into RDF-based semantic units, entities, and relationships
.Decompose text chunks into RDF-based semantic units, entities, and relationships
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
textChunks |
Array.<{content: string, source: string}> | Text chunks to decompose |
|
llmHandler |
Object | Instance of Semem's LLMHandler |
|
options |
Object |
<optional> |
Decomposition options |
- Source:
Returns:
- Type
- Promise.<{units: Array.<SemanticUnit>, entities: Array.<Entity>, relationships: Array.<Relationship>, dataset: Dataset}>
(async) decomposeText()
Decompose text into knowledge graph entities and relationships
.Decompose text into knowledge graph entities and relationships
- Source:
(async) deleteInstance()
Delete a VSOM instance
.Delete a VSOM instance
- Source:
detectCommunities(graph, optionsopt) → {Object}
Run Leiden algorithm for community detection
.Run Leiden algorithm for community detection
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
graph |
Object | Graph representation from GraphAnalytics |
|
options |
Object |
<optional> |
Algorithm options |
Returns:
Community detection results
- Type
- Object
detectTopicDomain()
Domain detection methods
.Domain detection methods
- Source:
determineCorpuscleType()
Determine corpuscle type from SPARQL binding
.Determine corpuscle type from SPARQL binding
determineResponseType()
Determine response type based on data structure
.Determine response type based on data structure
- Source:
displayError(message, containeropt)
Display an error message in the specified container
.Display an error message in the specified container
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
message |
string | The error message to display |
|
container |
HTMLElement |
<optional> |
Optional container to show the error in (defaults to document body) |
- Source:
dispose()
Clean up resources
.Clean up resources
- Source:
dispose()
Dispose of resources
.Dispose of resources
(async) encode(formattedContent, fullContext, options) → {Object}
Main encoding method - embeds metadata into formatted content
.Main encoding method - embeds metadata into formatted content
Parameters:
Name | Type | Description |
---|---|---|
formattedContent |
Object | Content from PromptFormatter |
fullContext |
Object | Complete processing context |
options |
Object | Encoding options |
- Source:
Returns:
Content with embedded metadata
- Type
- Object
(async) encodeStructured()
Encoding strategy implementations
.Encoding strategy implementations
- Source:
enhanceClustersWithCentrality(graphResults) → {Array}
Enhance clusters with centrality measures
.Enhance clusters with centrality measures
Parameters:
Name | Type | Description |
---|---|---|
graphResults |
Object | Graph analytics results |
- Source:
Returns:
Enhanced clusters
- Type
- Array
enhanceSearchResults(pprResults, graph, dataset) → {Object}
Enhance search results with additional metadata
.Enhance search results with additional metadata
Parameters:
Name | Type | Description |
---|---|---|
pprResults |
Object | PPR results |
graph |
Object | Graph representation |
dataset |
Dataset | Original RDF dataset |
- Source:
Returns:
Enhanced results
- Type
- Object
(async) enrichGraph()
Enrich graph with embeddings and attributes
.Enrich graph with embeddings and attributes
- Source:
enrichWithEmbeddings(graphData, embeddingHandler, optionsopt) → {Promise.<{vectorIndex: VectorIndex, embeddings: Map, similarityLinks: Array, dataset: Dataset, statistics: Object}>}
Enrich graph with vector embeddings and build searchable index
.Enrich graph with vector embeddings and build searchable index
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
graphData |
Object | Graph data with RDF dataset |
|
embeddingHandler |
Object | Semem's EmbeddingHandler instance |
|
options |
Object |
<optional> |
Enrichment options |
- Source:
Returns:
- Type
- Promise.<{vectorIndex: VectorIndex, embeddings: Map, similarityLinks: Array, dataset: Dataset, statistics: Object}>
(async) ensureInitialized() → {Promise.<void>}
Wait for the MemoryManager to be fully initialized
.Wait for the MemoryManager to be fully initialized
- Source:
Returns:
- Type
- Promise.<void>
ensureInitialized()
Ensure system is initialized
.Ensure system is initialized
- Source:
Throws:
-
If system is not initialized
- Type
- Error
escapeString()
Escape string for SPARQL
.Escape string for SPARQL
- Source:
estimateConfidence(hypothesis, originalInput) → {number}
Estimate confidence score for a generated hypothesis
.Estimate confidence score for a generated hypothesis
Parameters:
Name | Type | Description |
---|---|---|
hypothesis |
string | Generated hypothesis text |
originalInput |
string | Original input query |
- Source:
Returns:
Confidence score between 0 and 1
- Type
- number
estimateCost(inputTokens, outputTokens, model) → {Object}
Estimate cost for token usage
.Estimate cost for token usage
Parameters:
Name | Type | Description |
---|---|---|
inputTokens |
number | Number of input tokens |
outputTokens |
number | Number of output tokens |
model |
string | Model name |
- Source:
Returns:
Cost estimation
- Type
- Object
estimateMemoryUsage() → {number}
Estimate total memory usage
.Estimate total memory usage
- Source:
Returns:
Estimated memory usage in bytes
- Type
- number
estimateMemoryUsage() → {number}
Estimate memory usage of the algorithm
.Estimate memory usage of the algorithm
Returns:
Estimated memory usage in bytes
- Type
- number
estimateMemoryUsage() → {number}
Estimate memory usage of topology management
.Estimate memory usage of topology management
Returns:
Estimated memory usage in bytes
- Type
- number
estimateMemoryUsage() → {number}
Estimate memory usage
.Estimate memory usage
Returns:
Estimated memory usage in bytes
- Type
- number
estimateResults()
Estimate number of results based on complexity
.Estimate number of results based on complexity
- Source:
estimateSegmentSize()
Estimate segment size between boundaries
.Estimate segment size between boundaries
- Source:
estimateSelectivity()
Estimate selectivity of criteria
.Estimate selectivity of criteria
estimateTokenCount()
Utility methods
.Utility methods
- Source:
estimateTokenCount(text, tokenizerName) → {Object}
Simple token estimation fallback
.Simple token estimation fallback
Parameters:
Name | Type | Description |
---|---|---|
text |
string | Text to estimate |
tokenizerName |
string | Tokenizer name |
- Source:
Returns:
Simple token estimate
- Type
- Object
estimateTokensPerResult(zoomLevel) → {number}
Estimate tokens per result for a zoom level
.Estimate tokens per result for a zoom level
Parameters:
Name | Type | Description |
---|---|---|
zoomLevel |
string | The zoom level |
- Source:
Returns:
Estimated tokens per result
- Type
- number
estimateTopicSelectivity()
Selectivity estimation methods
.Selectivity estimation methods
- Source:
euclideanDistance(vector1, vector2) → {number}
Calculate Euclidean distance
.Calculate Euclidean distance
Parameters:
Name | Type | Description |
---|---|---|
vector1 |
Array | First vector |
vector2 |
Array | Second vector |
Returns:
Euclidean distance
- Type
- number
(async) execute(name, value, options)
Execute a validator
.Execute a validator
Parameters:
Name | Type | Description |
---|---|---|
name |
string | Validator name |
value |
* | Value to validate |
options |
Object | Validator options |
- Source:
(async) executeNavigationPipeline()
Execute complete navigation pipeline
.Execute complete navigation pipeline
- Source:
(async, abstract) executeOperation(operation, params)
Execute a memory operation
.Execute a memory operation
Parameters:
Name | Type | Description |
---|---|---|
operation |
string | Operation name |
params |
Object | Operation parameters |
- Source:
(async) executeOperation()
Execute a chat operation
.Execute a chat operation
- Source:
(async) executeOperation()
Execute a memory operation
.Execute a memory operation
- Source:
(async) executeOperation()
Execute a ragno operation
.Execute a ragno operation
- Source:
(async) executeOperation()
Execute a search operation
.Execute a search operation
- Source:
(async) executeOperation()
Execute unified search operation
.Execute unified search operation
- Source:
(async) executeOperation()
Execute a ZPT operation
.Execute a ZPT operation
- Source:
(async) executeQuery()
Execute SPARQL query against the corpus
.Execute SPARQL query against the corpus
(async) executeSPARQLQuery(endpoint, query, options) → {Promise.<Array>}
Execute SPARQL query (placeholder implementation)
.Execute SPARQL query (placeholder implementation)
Parameters:
Name | Type | Description |
---|---|---|
endpoint |
string | SPARQL endpoint URL |
query |
string | SPARQL query |
options |
Object | Query options |
- Source:
Returns:
Query results
- Type
- Promise.<Array>
(async) executeStageWithTimeout()
Pipeline execution utilities
.Pipeline execution utilities
executeWithTimeout()
Utility methods
.Utility methods
- Source:
expandCluster(seedIndex, threshold, visited) → {Object}
Expand cluster using neighboring nodes
.Expand cluster using neighboring nodes
Parameters:
Name | Type | Description |
---|---|---|
seedIndex |
number | Starting node index |
threshold |
number | Similarity threshold |
visited |
Set | Set of visited nodes |
- Source:
Returns:
Cluster object
- Type
- Object
(async) expandQueryTerms(entities) → {Array}
Expand query terms for enhanced matching
.Expand query terms for enhanced matching
Parameters:
Name | Type | Description |
---|---|---|
entities |
Array | Original entity terms |
- Source:
Returns:
Expanded terms
- Type
- Array
exportAllResultsToRDF(results, targetDataset)
Export all analysis results to RDF
.Export all analysis results to RDF
Parameters:
Name | Type | Description |
---|---|---|
results |
Object | Analysis results |
targetDataset |
Dataset | Target RDF dataset |
- Source:
exportCommunitiesToRDF(results, targetDataset)
Export communities to RDF format
.Export communities to RDF format
Parameters:
Name | Type | Description |
---|---|---|
results |
Object | Community detection results |
targetDataset |
Dataset | Target RDF dataset |
exportEnrichmentResults(enrichmentResults, indexPath, optionsopt) → {Promise.<Object>}
Export enrichment results for use in search systems
.Export enrichment results for use in search systems
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
enrichmentResults |
Object | Results from enrichWithEmbeddings |
|
indexPath |
string | Path to save vector index |
|
options |
Object |
<optional> |
Export options |
- Source:
Returns:
Export statistics
- Type
- Promise.<Object>
(async) exportGraph()
Export graph data in specified format
.Export graph data in specified format
- Source:
exportResultsToRDF(results, targetDataset, graphUriopt)
Export analysis results to RDF format
.Export analysis results to RDF format
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
results |
Object | Analysis results |
|
targetDataset |
Dataset | Target RDF dataset |
|
graphUri |
string |
<optional> |
Optional graph context URI |
exportResultsToRDF(results, targetDataset)
Export PPR results to RDF format
.Export PPR results to RDF format
Parameters:
Name | Type | Description |
---|---|---|
results |
Object | PPR results |
targetDataset |
Dataset | Target RDF dataset |
exportToDataset(targetDataset)
Export all triples of this element to a target dataset
.Export all triples of this element to a target dataset
Parameters:
Name | Type | Description |
---|---|---|
targetDataset |
Dataset | The RDF-Ext dataset to export to |
- Source:
exportToRDF(dataset, optionsopt) → {number}
Export results to RDF dataset
.Export results to RDF dataset
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
dataset |
Object | RDF dataset to augment |
|
options |
Object |
<optional> |
Export options |
- Source:
Returns:
Number of triples added
- Type
- number
exportToRDF(decompositionResults, endpoint, authopt) → {Promise.<Object>}
Export decomposition results to SPARQL endpoint
.Export decomposition results to SPARQL endpoint
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
decompositionResults |
Object | Results from decomposeCorpus |
|
endpoint |
string | SPARQL endpoint URL |
|
auth |
Object |
<optional> |
Authentication credentials |
- Source:
Returns:
Export statistics
- Type
- Promise.<Object>
exportVisualization(formatopt) → {Object|string}
Export visualization coordinates
.Export visualization coordinates
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
format |
string |
<optional> |
coordinates | Output format ('coordinates', 'json', 'csv') |
- Source:
Returns:
Visualization data
- Type
- Object | string
extractBasicInfo()
Extract basic request information
.Extract basic request information
- Source:
extractClientInfo()
Extract client information
.Extract client information
- Source:
extractClientIp()
Extract real client IP address
.Extract real client IP address
- Source:
extractCommunityKeywords(summary, memberEntities) → {Array.<string>}
Extract keywords from community summary and members
.Extract keywords from community summary and members
Parameters:
Name | Type | Description |
---|---|---|
summary |
string | Generated summary |
memberEntities |
Array | Community member entities |
- Source:
Returns:
Extracted keywords
- Type
- Array.<string>
(async) extractConcepts()
Extract concepts from text
.Extract concepts from text
- Source:
(async) extractConcepts(text) → {Promise.<Array.<string>>}
Parameters:
Name | Type | Description |
---|---|---|
text |
string |
- Source:
Returns:
- Type
- Promise.<Array.<string>>
extractContent()
Extract content from SPARQL binding
.Extract content from SPARQL binding
extractContentString()
Helper methods for pipeline stages
.Helper methods for pipeline stages
extractEntitiesFromDataset(dataset) → {Array}
Extract entities from RDF dataset (helper method)
.Extract entities from RDF dataset (helper method)
Parameters:
Name | Type | Description |
---|---|---|
dataset |
Dataset | RDF dataset |
- Source:
Returns:
Array of entities
- Type
- Array
(async) extractEntitiesFromHypothesis(hypothesis, llmHandler, options) → {Array}
Extract entities from a generated hypothesis
.Extract entities from a generated hypothesis
Parameters:
Name | Type | Description |
---|---|---|
hypothesis |
Object | Generated hypothesis object |
llmHandler |
Object | LLM handler instance |
options |
Object | Extraction options |
- Source:
Returns:
Extracted entities
- Type
- Array
(async) extractEntitiesFromUnit(unitText, llmHandler, options) → {Promise.<Array.<Object>>}
Extract entities from a semantic unit
.Extract entities from a semantic unit
Parameters:
Name | Type | Description |
---|---|---|
unitText |
string | Unit text content |
llmHandler |
Object | LLM handler |
options |
Object | Extraction options |
- Source:
Returns:
Array of entity data objects
- Type
- Promise.<Array.<Object>>
extractEntityData(entity) → {Object}
Extract entity data from various entity formats
.Extract entity data from various entity formats
Parameters:
Name | Type | Description |
---|---|---|
entity |
Object | Entity object |
- Source:
Returns:
Extracted entity data
- Type
- Object
extractKeywords(content) → {Array.<string>}
Extract keywords from attribute content
.Extract keywords from attribute content
Parameters:
Name | Type | Description |
---|---|---|
content |
string | Attribute content |
- Source:
Returns:
Extracted keywords
- Type
- Array.<string>
extractKeywords()
Analysis and processing methods
.Analysis and processing methods
- Source:
extractLimit()
Extract LIMIT value from query string
.Extract LIMIT value from query string
- Source:
extractMetadata()
Extract metadata from SPARQL binding
.Extract metadata from SPARQL binding
extractMetadata()
Extract comprehensive metadata from processing context
.Extract comprehensive metadata from processing context
- Source:
extractNamespace()
Extract namespace from topic string
.Extract namespace from topic string
extractNavigationMetadata()
Extract navigation-specific metadata
.Extract navigation-specific metadata
- Source:
extractPerformanceMetadata()
Extract performance metadata
.Extract performance metadata
- Source:
extractProvenanceMetadata()
Extract data provenance metadata
.Extract data provenance metadata
- Source:
extractQualityMetadata()
Extract quality indicators
.Extract quality indicators
- Source:
(async) extractRelationships(entities, units, llmHandler, options) → {Promise.<Array.<Object>>}
Extract relationships between entities
.Extract relationships between entities
Parameters:
Name | Type | Description |
---|---|---|
entities |
Array.<Entity> | List of entities |
units |
Array.<SemanticUnit> | List of semantic units |
llmHandler |
Object | LLM handler |
options |
Object | Extraction options |
- Source:
Returns:
Array of relationship data objects
- Type
- Promise.<Array.<Object>>
(async) extractSemanticUnits(text, llmHandler, options) → {Promise.<Array.<string>>}
Extract semantic units from text using LLM
.Extract semantic units from text using LLM
Parameters:
Name | Type | Description |
---|---|---|
text |
string | Input text |
llmHandler |
Object | LLM handler |
options |
Object | Extraction options |
- Source:
Returns:
Array of semantic unit texts
- Type
- Promise.<Array.<string>>
extractSubgraph(graph, nodes) → {Object}
Extract subgraph containing only specified nodes
.Extract subgraph containing only specified nodes
Parameters:
Name | Type | Description |
---|---|---|
graph |
Object | Original graph |
nodes |
Set | Nodes to include |
Returns:
Subgraph
- Type
- Object
extractTechnicalMetadata()
Extract technical implementation details
.Extract technical implementation details
- Source:
extractTextContent()
Helper methods for content extraction
.Helper methods for content extraction
- Source:
fetchWithTimeout(resource, options, timeout) → {Promise.<Response>}
Fetch with timeout utility
.Fetch with timeout utility
Parameters:
Name | Type | Description |
---|---|---|
resource |
string | URL to fetch |
options |
object | Fetch options |
timeout |
number | Timeout in milliseconds (default: 30000) |
- Source:
Returns:
- Type
- Promise.<Response>
filterCorpuscles()
Apply selection criteria to filter corpuscles
.Apply selection criteria to filter corpuscles
filterSmallCommunities(communities, minSize) → {Map}
Filter out communities smaller than minimum size
.Filter out communities smaller than minimum size
Parameters:
Name | Type | Description |
---|---|---|
communities |
Map | Community mapping |
minSize |
number | Minimum community size |
Returns:
Filtered communities
- Type
- Map
findBestMatchingUnits(inputBatch) → {Array}
Find Best Matching Units (BMUs) for a batch of input vectors
.Find Best Matching Units (BMUs) for a batch of input vectors
Parameters:
Name | Type | Description |
---|---|---|
inputBatch |
Array | Array of input vectors |
Returns:
Array of BMU indices for each input
- Type
- Array
findConnectedComponents(subgraph) → {Array}
Find connected components in a subgraph
.Find connected components in a subgraph
Parameters:
Name | Type | Description |
---|---|---|
subgraph |
Object | Subgraph to analyze |
Returns:
Array of connected components
- Type
- Array
findConnectedComponents(graph) → {Object}
Find connected components using DFS
.Find connected components using DFS
Parameters:
Name | Type | Description |
---|---|---|
graph |
Object | Graph representation from buildGraphFromRDF |
Returns:
Connected components information
- Type
- Object
findCrossTypeNodes(graph, topNodes) → {Array}
Find nodes that connect different types (bridge nodes)
.Find nodes that connect different types (bridge nodes)
Parameters:
Name | Type | Description |
---|---|---|
graph |
Object | Graph representation |
topNodes |
Array | Top-ranked nodes to analyze |
Returns:
Cross-type bridge nodes
- Type
- Array
findEntityCluster(entityIndex, clusters) → {number}
Find which cluster an entity belongs to
.Find which cluster an entity belongs to
Parameters:
Name | Type | Description |
---|---|---|
entityIndex |
number | Entity index |
clusters |
Array | Array of clusters |
- Source:
Returns:
Cluster index or -1 if not found
- Type
- number
findNextBoundary()
Find next boundary position
.Find next boundary position
- Source:
findSemanticBoundaries()
Find semantic boundaries in text
.Find semantic boundaries in text
- Source:
(async) findSimilarElements(queryEmbedding, limit, threshold, filters) → {Promise.<Array>}
Advanced similarity search with SPARQL-based cosine similarity
.Advanced similarity search with SPARQL-based cosine similarity
Parameters:
Name | Type | Default | Description |
---|---|---|---|
queryEmbedding |
Array.<number> | Query embedding vector |
|
limit |
number | 10 | Maximum results |
threshold |
number | 0.7 | Similarity threshold |
filters |
Object | Additional filters |
- Source:
Returns:
Similar elements with similarity scores
- Type
- Promise.<Array>
findSimilarNodes(uri, kopt, optionsopt) → {Array}
Find nodes similar to a given node in the index
.Find nodes similar to a given node in the index
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
uri |
string | URI of the reference node |
||
k |
number |
<optional> |
10 | Number of similar nodes to return |
options |
Object |
<optional> |
Search options |
- Source:
Returns:
Similar nodes (excluding the reference node)
- Type
- Array
findSimilarNodes(uri, kopt, optionsopt) → {Array}
Find similar nodes
.Find similar nodes
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
uri |
string | Reference node URI |
||
k |
number |
<optional> |
10 | Number of similar nodes |
options |
Object |
<optional> |
Search options |
- Source:
Returns:
Similar nodes
- Type
- Array
findSingleBMU(inputVector) → {number}
Find Best Matching Unit for a single input vector
.Find Best Matching Unit for a single input vector
Parameters:
Name | Type | Description |
---|---|---|
inputVector |
Array | Input vector |
Returns:
Index of the best matching unit
- Type
- number
(async) fixedSizeChunking()
Fixed size chunking strategy
.Fixed size chunking strategy
- Source:
(async) flushSyncQueue()
Process queued sync operations in batch
.Process queued sync operations in batch
- Source:
(async) format(data, context) → {Object}
Main formatting method - routes to appropriate formatter
.Main formatting method - routes to appropriate formatter
Parameters:
Name | Type | Description |
---|---|---|
data |
Object | Response data to format |
context |
Object | Request context and metadata |
- Source:
Returns:
Formatted response
- Type
- Object
(async) format(projectedContent, navigationContext, options) → {Object}
Main formatting method - transforms projected content for LLM consumption
.Main formatting method - transforms projected content for LLM consumption
Parameters:
Name | Type | Description |
---|---|---|
projectedContent |
Object | Content from TiltProjector |
navigationContext |
Object | ZPT navigation context |
options |
Object | Formatting options |
- Source:
Returns:
Formatted content ready for LLM
- Type
- Object
(async) formatAsAnalytical()
Format as analytical
.Format as analytical
- Source:
(async) formatAsConversational()
Format as conversational
.Format as conversational
- Source:
(async) formatAsJSON()
Format as JSON
.Format as JSON
- Source:
(async) formatAsMarkdown()
Format as Markdown
.Format as Markdown
- Source:
(async) formatAsStructured()
Format as structured prompt
.Format as structured prompt
- Source:
formatContentAsMarkdown()
Content formatting helpers
.Content formatting helpers
- Source:
formatContentNaturally()
Content naturally formatted for conversation
.Content naturally formatted for conversation
- Source:
formatErrorResponse()
Format error response
.Format error response
- Source:
(async) formatErrorResponse()
Format error responses
.Format error responses
- Source:
formatGroupSummary()
Create summary for a group of related interactions
.Create summary for a group of related interactions
- Source:
(async) formatHealthResponse()
Format health check responses
.Format health check responses
- Source:
formatMetadataAsMarkdown()
Metadata formatting
.Metadata formatting
- Source:
(async) formatMetricsResponse()
Format metrics responses
.Format metrics responses
- Source:
formatNavigationParameters()
Helper methods for data formatting
.Helper methods for data formatting
- Source:
(async) formatNavigationResponse()
Format navigation responses
.Format navigation responses
- Source:
(async) formatOptionsResponse()
Format options responses
.Format options responses
- Source:
(async) formatPreviewResponse()
Format preview responses
.Format preview responses
- Source:
formatSI(num) → {string}
Format number with SI prefix
.Format number with SI prefix
Parameters:
Name | Type | Description |
---|---|---|
num |
number | Number to format |
- Source:
Returns:
Formatted string
- Type
- string
(async) formatSchemaResponse()
Format schema responses
.Format schema responses
- Source:
formatSingleInteraction()
Format a single interaction for display
.Format a single interaction for display
- Source:
(async) formatSuccessResponse()
Format success responses
.Format success responses
- Source:
fromSimpleObject(obj, optionsopt) → {Attribute}
Create attribute from simple object (migration helper)
.Create attribute from simple object (migration helper)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
obj |
Object | Simple object representation |
|
options |
Object |
<optional> |
Additional options |
- Source:
Returns:
RDF-based attribute
- Type
- Attribute
fromSimpleObject(obj, optionsopt) → {Entity}
Create entity from simple object (migration helper for RagnoMemoryStore)
.Create entity from simple object (migration helper for RagnoMemoryStore)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
obj |
Object | Simple object representation |
|
options |
Object |
<optional> |
Additional options |
- Source:
Returns:
RDF-based entity
- Type
- Entity
fromSimpleObject(obj, optionsopt) → {Relationship}
Create relationship from simple object (migration helper)
.Create relationship from simple object (migration helper)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
obj |
Object | Simple object representation |
|
options |
Object |
<optional> |
Additional options |
- Source:
Returns:
RDF-based relationship
- Type
- Relationship
fromSimpleObject(obj, optionsopt) → {SemanticUnit}
Create unit from simple object (migration helper)
.Create unit from simple object (migration helper)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
obj |
Object | Simple object representation |
|
options |
Object |
<optional> |
Additional options |
- Source:
Returns:
RDF-based unit
- Type
- SemanticUnit
(async) gatherCommunityContext(community, graphData, options) → {Promise.<Object>}
Gather comprehensive context for a community
.Gather comprehensive context for a community
Parameters:
Name | Type | Description |
---|---|---|
community |
Object | Community object with members |
graphData |
Object | Graph data |
options |
Object | Context gathering options |
- Source:
Returns:
Community context object
- Type
- Promise.<Object>
(async) gatherEntityContext(entity, graphData, options) → {Promise.<Object>}
Gather comprehensive context for an entity
.Gather comprehensive context for an entity
Parameters:
Name | Type | Description |
---|---|---|
entity |
Entity | Entity to gather context for |
graphData |
Object | Graph data |
options |
Object | Context gathering options |
- Source:
Returns:
Entity context object
- Type
- Promise.<Object>
gaussianRandom() → {number}
Generate Gaussian random number (Box-Muller transform)
.Generate Gaussian random number (Box-Muller transform)
Returns:
Random number from standard normal distribution
- Type
- number
generateCacheKey(method, query, options) → {string}
Generate cache key for request
.Generate cache key for request
Parameters:
Name | Type | Description |
---|---|---|
method |
string | Search method |
query |
string | Search query |
options |
Object | Search options |
- Source:
Returns:
Cache key
- Type
- string
(async) generateChat(model, messages, options) → {string}
Generate chat completion using Claude
.Generate chat completion using Claude
Parameters:
Name | Type | Description |
---|---|---|
model |
string | Model name to use |
messages |
Array | Array of message objects with role and content |
options |
Object | Additional options |
- Source:
Returns:
- Response text
- Type
- string
(async) generateChat(model, messages, options) → {string}
Generate chat completion using Mistral
.Generate chat completion using Mistral
Parameters:
Name | Type | Description |
---|---|---|
model |
string | Model name to use (defaults to instance default) |
messages |
Array | Array of message objects with role and content |
options |
Object | Additional options |
- Source:
Returns:
- Response text
- Type
- string
(async) generateChat(model, messages, options) → {string}
Generate chat completion using Ollama
.Generate chat completion using Ollama
Parameters:
Name | Type | Description |
---|---|---|
model |
string | Model name to use |
messages |
Array | Array of message objects with role and content |
options |
Object | Additional options |
- Source:
Returns:
- Response text
- Type
- string
(async) generateChatResponse()
Generate a chat response with memory context
.Generate a chat response with memory context
- Source:
(async, generator) generateChatStream(model, messages, options) → {AsyncGenerator.<string>}
Generate a streaming chat completion
.Generate a streaming chat completion
Parameters:
Name | Type | Description |
---|---|---|
model |
string | Model name to use (defaults to instance default) |
messages |
Array | Array of message objects with role and content |
options |
Object | Additional options |
- Source:
Returns:
- An async generator that yields chunks of the response
- Type
- AsyncGenerator.<string>
generateClusters(threshold) → {Array}
Generate clusters from trained map
.Generate clusters from trained map
Parameters:
Name | Type | Description |
---|---|---|
threshold |
number | Clustering threshold |
- Source:
Returns:
Array of clusters
- Type
- Array
(async) generateCommunitySummary(community, context, llmHandler, options) → {Promise.<Object>}
Generate LLM summary for a community
.Generate LLM summary for a community
Parameters:
Name | Type | Description |
---|---|---|
community |
Object | Community object |
context |
Object | Community context |
llmHandler |
Object | LLM handler |
options |
Object | Generation options |
- Source:
Returns:
Summary data with keywords and confidence
- Type
- Promise.<Object>
(async) generateCompletion()
Generate a text completion with memory context
.Generate a text completion with memory context
- Source:
(async) generateCompletion(model, prompt, options) → {string}
Generate completion using Claude
.Generate completion using Claude
Parameters:
Name | Type | Description |
---|---|---|
model |
string | Model name to use |
prompt |
string | Text prompt |
options |
Object | Additional options |
- Source:
Returns:
- Response text
- Type
- string
(async) generateCompletion(model, prompt, options) → {string}
Generate completion (for backward compatibility)
.Generate completion (for backward compatibility)
Parameters:
Name | Type | Description |
---|---|---|
model |
string | Model name to use |
prompt |
string | The prompt to complete |
options |
Object | Additional options |
- Source:
Returns:
- Completion text
- Type
- string
(async) generateCompletion()
Generate chat completion (not supported by Nomic embedding API)
.Generate chat completion (not supported by Nomic embedding API)
- Source:
(async) generateCompletion(model, prompt, options) → {string}
Generate completion using Ollama
.Generate completion using Ollama
Parameters:
Name | Type | Description |
---|---|---|
model |
string | Model name to use |
prompt |
string | Text prompt |
options |
Object | Additional options |
- Source:
Returns:
- Response text
- Type
- string
(async) generateEmbedding()
Generate embedding for text
.Generate embedding for text
- Source:
(async) generateEmbedding(model, input) → {Array.<number>}
Generate embeddings using Claude
.Generate embeddings using Claude
Parameters:
Name | Type | Description |
---|---|---|
model |
string | Model name to use for embedding |
input |
string | Text to generate embedding for |
- Source:
Returns:
- Vector embedding
- Type
- Array.<number>
(async) generateEmbedding(model, input) → {Array.<number>}
Generate embeddings using Mistral
.Generate embeddings using Mistral
Parameters:
Name | Type | Default | Description |
---|---|---|---|
model |
string | mistral-embed | Model name to use for embedding (defaults to 'mistral-embed') |
input |
string | Text to generate embedding for |
- Source:
Returns:
- Vector embedding
- Type
- Array.<number>
(async) generateEmbedding(model, input) → {Array.<number>|Array.<Array.<number>>}
Generate embeddings using Nomic Atlas API
.Generate embeddings using Nomic Atlas API
Parameters:
Name | Type | Description |
---|---|---|
model |
string | Model name to use for embedding (optional, uses default) |
input |
string | Array.<string> | Text or array of texts to generate embeddings for |
- Source:
Returns:
- Vector embedding(s)
- Type
- Array.<number> | Array.<Array.<number>>
(async) generateEmbedding(model, input) → {Array.<number>}
Generate embeddings using Ollama
.Generate embeddings using Ollama
Parameters:
Name | Type | Description |
---|---|---|
model |
string | Model name to use for embedding |
input |
string | Text to generate embedding for |
- Source:
Returns:
- Vector embedding
- Type
- Array.<number>
(async) generateEmbedding(text, model, retriesopt) → {Promise.<Array.<number>>}
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
text |
string | |||
model |
string | |||
retries |
number |
<optional> |
3 |
- Source:
Returns:
- Type
- Promise.<Array.<number>>
(async) generateEntityAttribute(entity, context, attributeType, llmHandler, options) → {Promise.<Object>}
Generate a specific type of attribute for an entity
.Generate a specific type of attribute for an entity
Parameters:
Name | Type | Description |
---|---|---|
entity |
Entity | Entity to generate attribute for |
context |
Object | Entity context |
attributeType |
string | Type of attribute to generate |
llmHandler |
Object | LLM handler |
options |
Object | Generation options |
- Source:
Returns:
Generated attribute data
- Type
- Promise.<Object>
generateErrorSuggestions()
Generate helpful suggestions based on error type
.Generate helpful suggestions based on error type
- Source:
generateFuzzyPatterns()
Helper methods for pattern generation and expansion
.Helper methods for pattern generation and expansion
- Source:
(async) generateHypotheses()
Generate hypotheses using HyDE algorithm
.Generate hypotheses using HyDE algorithm
- Source:
(async) generateHypotheses(inputs, llmHandler, targetDataset, optionsopt) → {Object}
Generate hypothetical answers and augment RDF graph
.Generate hypothetical answers and augment RDF graph
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
inputs |
Array | string | Query strings or entity URIs to generate hypotheses for |
|
llmHandler |
Object | LLM handler instance for generation |
|
targetDataset |
Dataset | RDF dataset to augment |
|
options |
Object |
<optional> |
Generation options |
- Source:
Returns:
Results with generated hypotheses and RDF updates
- Type
- Object
generateNodeAssignments()
Generate node assignments for entities
.Generate node assignments for entities
- Source:
(async) generateNodeEmbedding(node, embeddingHandler, options) → {Promise.<Object>}
Generate embedding for a node
.Generate embedding for a node
Parameters:
Name | Type | Description |
---|---|---|
node |
Object | Node object |
embeddingHandler |
Object | Embedding handler |
options |
Object | Generation options |
- Source:
Returns:
Embedding data object
- Type
- Promise.<Object>
(async) generateResponse(prompt, context, optionsopt) → {Promise.<string>}
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
prompt |
string | The user's input prompt |
|||||||||||||||||
context |
string | Additional context for the prompt |
|||||||||||||||||
options |
Object |
<optional> |
Additional options Properties
|
- Source:
Returns:
- Type
- Promise.<string>
(async) generateSampleData()
Generate sample data for testing
.Generate sample data for testing
- Source:
(async) generateSampleEntities()
Generate sample entities for testing
.Generate sample entities for testing
- Source:
(async) generateSingleHypothesis(input, llmHandler, options, index) → {Object}
Generate a single hypothesis using the LLM
.Generate a single hypothesis using the LLM
Parameters:
Name | Type | Description |
---|---|---|
input |
string | Input query or entity URI |
llmHandler |
Object | LLM handler instance |
options |
Object | Generation options |
index |
number | Hypothesis index for variation |
- Source:
Returns:
Generated hypothesis
- Type
- Object
generateURI(name, baseURIopt) → {string}
Generate URI for entity based on name (useful for RagnoMemoryStore integration)
.Generate URI for entity based on name (useful for RagnoMemoryStore integration)
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
name |
string | Entity name |
||
baseURI |
string |
<optional> |
http://example.org/ragno/ | Base URI |
- Source:
Returns:
Generated URI
- Type
- string
generateURI(type) → {string}
Generate a unique URI for a given resource type
.Generate a unique URI for a given resource type
Parameters:
Name | Type | Description |
---|---|---|
type |
string | Resource type (entity, unit, relationship, etc.) |
- Source:
Returns:
Generated URI
- Type
- string
generateURI(type) → {string}
Generate a unique URI for this element
.Generate a unique URI for this element
Parameters:
Name | Type | Description |
---|---|---|
type |
string | Element type |
- Source:
Returns:
Generated URI
- Type
- string
(async) generateUnitSummary(unitText, llmHandler) → {Promise.<string>}
Generate summary for a semantic unit
.Generate summary for a semantic unit
Parameters:
Name | Type | Description |
---|---|---|
unitText |
string | Unit text content |
llmHandler |
Object | LLM handler |
- Source:
Returns:
Generated summary
- Type
- Promise.<string>
get()
Retrieve an API instance by name
.Retrieve an API instance by name
- Source:
get(name)
Get a registered validator
.Get a registered validator
Parameters:
Name | Type | Description |
---|---|---|
name |
string | Validator name |
- Source:
getAPIRouteHandlers() → {Object}
Get Express.js route handlers for HTTP API
.Get Express.js route handlers for HTTP API
- Source:
Returns:
Route handlers
- Type
- Object
getAggregationConfig(zoomLevel) → {Object}
Get aggregation requirements for a zoom level
.Get aggregation requirements for a zoom level
Parameters:
Name | Type | Description |
---|---|---|
zoomLevel |
string | The zoom level |
- Source:
Returns:
Aggregation configuration
- Type
- Object
getAggregationFields(zoomLevel) → {Array.<string>}
Get aggregation fields for a zoom level
.Get aggregation fields for a zoom level
Parameters:
Name | Type | Description |
---|---|---|
zoomLevel |
string | The zoom level |
- Source:
Returns:
Aggregation SPARQL fields
- Type
- Array.<string>
getAggregationGroupBy(zoomLevel) → {Array.<string>}
Get GROUP BY clause for aggregation
.Get GROUP BY clause for aggregation
Parameters:
Name | Type | Description |
---|---|---|
zoomLevel |
string | The zoom level |
- Source:
Returns:
Fields to group by
- Type
- Array.<string>
getAggregationMetrics(zoomLevel) → {Array.<Object>}
Get aggregation metrics for a zoom level
.Get aggregation metrics for a zoom level
Parameters:
Name | Type | Description |
---|---|---|
zoomLevel |
string | The zoom level |
- Source:
Returns:
Aggregation metrics configuration
- Type
- Array.<Object>
getAll()
Get all registered API instances
.Get all registered API instances
- Source:
getAllCustomMetadata() → {Object}
Get all custom metadata properties (excluding standard properties)
.Get all custom metadata properties (excluding standard properties)
- Source:
Returns:
Object with all custom metadata
- Type
- Object
getAllNamespaces() → {Object}
Get all namespace objects
.Get all namespace objects
- Source:
Returns:
All namespaces
- Type
- Object
getAllStatistics() → {Object}
Get comprehensive statistics from all algorithm modules
.Get comprehensive statistics from all algorithm modules
- Source:
Returns:
Combined statistics
- Type
- Object
getAllTypes(zoomLevel) → {Array.<string>}
Get all RDF types for a zoom level (primary + secondary)
.Get all RDF types for a zoom level (primary + secondary)
Parameters:
Name | Type | Description |
---|---|---|
zoomLevel |
string | The zoom level |
- Source:
Returns:
Array of RDF type URIs
- Type
- Array.<string>
getAlternativeNames() → {Array.<string>}
Get all alternative names for this entity
.Get all alternative names for this entity
- Source:
Returns:
Alternative names
- Type
- Array.<string>
getAttributes() → {Array.<NamedNode>}
Get all attributes for this entity
.Get all attributes for this entity
- Source:
Returns:
Attribute nodes
- Type
- Array.<NamedNode>
getAvailableFormats()
Get available formats
.Get available formats
- Source:
getAvailableInstructions()
Get available instruction sets
.Get available instruction sets
- Source:
getAvailableModels() → {Array.<string>}
List available models
.List available models
- Source:
Returns:
Available model names
- Type
- Array.<string>
(async) getAvailableServices()
Get available services and their status
.Get available services and their status
- Source:
getAvailableStrategies()
Get available chunking strategies
.Get available chunking strategies
- Source:
getAvailableStrategies()
Configuration and info methods
.Configuration and info methods
- Source:
getAvailableTokenizers() → {Array.<string>}
List available tokenizers
.List available tokenizers
- Source:
Returns:
Available tokenizer names
- Type
- Array.<string>
getBaseFields(zoomLevel) → {Array.<string>}
Get base fields for a zoom level
.Get base fields for a zoom level
Parameters:
Name | Type | Description |
---|---|---|
zoomLevel |
string | The zoom level |
- Source:
Returns:
Base SPARQL fields
- Type
- Array.<string>
getCacheStats() → {Object}
Get cache statistics
.Get cache statistics
- Source:
Returns:
Cache statistics
- Type
- Object
getCachedResult()
Cache management methods
.Cache management methods
getCategory() → {string|null}
Get the attribute category/type
.Get the attribute category/type
- Source:
Returns:
Attribute category
- Type
- string | null
getClusters(thresholdopt) → {Array}
Generate cluster assignments for entities
.Generate cluster assignments for entities
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
threshold |
number |
<optional> |
null | Clustering threshold |
- Source:
Returns:
Array of cluster assignments
- Type
- Array
(async) getCommunities()
Get communities from the graph
.Get communities from the graph
- Source:
getConfidence() → {number|null}
Get confidence score for this attribute
.Get confidence score for this attribute
- Source:
Returns:
Confidence score
- Type
- number | null
getConnectedElements() → {Array.<NamedNode>}
Get all connected elements
.Get all connected elements
- Source:
Returns:
Array of connected element URIs
- Type
- Array.<NamedNode>
getConnectedUnits() → {Array.<Object>}
Get all connected semantic units
.Get all connected semantic units
- Source:
Returns:
Connected units with relationship info
- Type
- Array.<Object>
getContent() → {string}
Get content of this element (or empty string if not set)
.Get content of this element (or empty string if not set)
- Source:
Returns:
Content text
- Type
- string
getContextRecommendation()
Get recommendation based on context utilization
.Get recommendation based on context utilization
- Source:
getCorpus() → {NamedNode|null}
Get corpus association for this attribute
.Get corpus association for this attribute
- Source:
Returns:
Corpus node
- Type
- NamedNode | null
getCorpus() → {NamedNode|null}
Get corpus association for this entity
.Get corpus association for this entity
- Source:
Returns:
Corpus node
- Type
- NamedNode | null
getCorpus() → {NamedNode|null}
Get corpus association for this unit
.Get corpus association for this unit
- Source:
Returns:
Corpus node
- Type
- NamedNode | null
getDefaultConfig(provider) → {Object}
Get default configuration for a provider
.Get default configuration for a provider
Parameters:
Name | Type | Description |
---|---|---|
provider |
string | Provider name |
Returns:
- Default configuration object
- Type
- Object
getDefaultWeights()
Get default priority weights
.Get default priority weights
getDefaults()
Get default values for optional parameters
.Get default values for optional parameters
getEmbedding() → {Array.<number>|null}
Get vector embedding for this unit
.Get vector embedding for this unit
- Source:
Returns:
Vector embedding
- Type
- Array.<number> | null
getEndpointInfo()
Configuration and management
.Configuration and management
- Source:
(async) getEntities()
Get entities with optional filtering
.Get entities with optional filtering
- Source:
getEntities() → {Array.<NamedNode>}
Get all entities in the dataset
.Get all entities in the dataset
- Source:
Returns:
Array of entity nodes
- Type
- Array.<NamedNode>
getEntity() → {NamedNode|null}
Get the entity this attribute describes
.Get the entity this attribute describes
- Source:
Returns:
Entity node
- Type
- NamedNode | null
getErrorStats()
Statistics and monitoring
.Statistics and monitoring
- Source:
getEvidence() → {Array.<NamedNode>}
Get all evidence sources for this attribute
.Get all evidence sources for this attribute
- Source:
Returns:
Evidence nodes
- Type
- Array.<NamedNode>
getEvidence() → {Array.<NamedNode>}
Get all evidence sources for this relationship
.Get all evidence sources for this relationship
- Source:
Returns:
Evidence nodes
- Type
- Array.<NamedNode>
(async) getFeatureMaps()
Get feature maps (U-Matrix, component planes)
.Get feature maps (U-Matrix, component planes)
- Source:
getFilterDocumentation()
Get filter configuration for documentation
.Get filter configuration for documentation
- Source:
getFirstSeen() → {Date|null}
Get first seen timestamp
.Get first seen timestamp
- Source:
Returns:
First seen date
- Type
- Date | null
getFormatInfo()
Get format information
.Get format information
- Source:
getFrequency() → {number|null}
Get frequency for this entity
.Get frequency for this entity
- Source:
Returns:
Frequency count
- Type
- number | null
(async) getGraphStats()
Get graph statistics
.Get graph statistics
- Source:
(async) getGridState()
Get current grid state
.Get current grid state
- Source:
(async) getHealth()
Get ZPT system health
.Get ZPT system health
- Source:
getHexagonalVisualCoords(x, y) → {Array}
Get visual coordinates for hexagonal topology
.Get visual coordinates for hexagonal topology
Parameters:
Name | Type | Description |
---|---|---|
x |
number | Map X coordinate |
y |
number | Map Y coordinate |
Returns:
[visualX, visualY] coordinates
- Type
- Array
getInfo() → {object}
Get connector information
.Get connector information
- Source:
Returns:
- Connector metadata
- Type
- object
getInstructionInfo()
Get instruction set information
.Get instruction set information
- Source:
getJSONLDContext() → {Object}
Create a JSON-LD context object
.Create a JSON-LD context object
- Source:
Returns:
JSON-LD context
- Type
- Object
getKeywords() → {Array.<string>}
Get all keywords/tags for this attribute
.Get all keywords/tags for this attribute
- Source:
Returns:
Keywords
- Type
- Array.<string>
getLanguage() → {string|null}
Get language for this attribute
.Get language for this attribute
- Source:
Returns:
Language code
- Type
- string | null
getLanguage() → {string|null}
Get language for this unit
.Get language for this unit
- Source:
Returns:
Language code
- Type
- string | null
getLastAccessed() → {Date|null}
Get last accessed timestamp
.Get last accessed timestamp
- Source:
Returns:
Last accessed date
- Type
- Date | null
getLength() → {number|null}
Get length of this unit in characters
.Get length of this unit in characters
- Source:
Returns:
Character length
- Type
- number | null
getMentionedEntities() → {Array.<NamedNode>}
Get all entities mentioned by this unit
.Get all entities mentioned by this unit
- Source:
Returns:
Entity nodes
- Type
- Array.<NamedNode>
getMetadata() → {Object}
Get attribute metadata including ragno-specific properties
.Get attribute metadata including ragno-specific properties
- Source:
Returns:
Attribute metadata
- Type
- Object
getMetadata() → {Object}
Get entity metadata including ragno-specific properties
.Get entity metadata including ragno-specific properties
- Source:
Returns:
Entity metadata
- Type
- Object
getMetadata() → {Object}
Get relationship metadata
.Get relationship metadata
- Source:
Returns:
Relationship metadata
- Type
- Object
getMetadata() → {Object}
Get unit metadata including ragno-specific properties
.Get unit metadata including ragno-specific properties
- Source:
Returns:
Unit metadata
- Type
- Object
getMetadata() → {Object}
Get element metadata (enhanced to include custom metadata)
.Get element metadata (enhanced to include custom metadata)
- Source:
Returns:
Element metadata including custom properties
- Type
- Object
getMetadataProperty(property) → {any}
Get a metadata property value
.Get a metadata property value
Parameters:
Name | Type | Description |
---|---|---|
property |
string | Property name |
- Source:
Returns:
Property value or undefined
- Type
- any
getMetrics()
Get collected metrics with timestamps
.Get collected metrics with timestamps
- Source:
(async) getMetrics() → {Object}
Get system metrics
.Get system metrics
- Source:
Returns:
System metrics
- Type
- Object
(async) getMetrics()
Get chat API metrics
.Get chat API metrics
- Source:
(async) getMetrics()
Get memory API metrics
.Get memory API metrics
- Source:
(async) getMetrics()
Get Ragno API metrics
.Get Ragno API metrics
- Source:
(async) getMetrics()
Get search API metrics
.Get search API metrics
- Source:
(async) getMetrics()
Get unified search metrics
.Get unified search metrics
- Source:
(async) getMetrics()
Get ZPT API metrics
.Get ZPT API metrics
- Source:
getMetrics()
Get selector statistics
.Get selector statistics
getMetrics()
Configuration and info methods
.Configuration and info methods
getModelInfo(modelName) → {Object}
Get model information
.Get model information
Parameters:
Name | Type | Description |
---|---|---|
modelName |
string | Model name |
- Source:
Returns:
Model information
- Type
- Object
getName() → {string}
Get the name for this entity (or empty string if not set)
.Get the name for this entity (or empty string if not set)
- Source:
Returns:
- Type
- string
getNamespace(prefix) → {function}
Get specific namespace by prefix
.Get specific namespace by prefix
Parameters:
Name | Type | Description |
---|---|---|
prefix |
string | Namespace prefix |
- Source:
Returns:
Namespace function
- Type
- function
getNeighbors(coords, radius) → {Array}
Get all neighbors of a node within a given radius
.Get all neighbors of a node within a given radius
Parameters:
Name | Type | Description |
---|---|---|
coords |
Array | [x, y] coordinates of the center node |
radius |
number | Neighborhood radius |
Returns:
Array of neighbor coordinates [[x, y], ...]
- Type
- Array
getNodeMappings() → {Array}
Get node mappings (entity to map position)
.Get node mappings (entity to map position)
- Source:
Returns:
Array of node mappings
- Type
- Array
getNodeMetadata(uri) → {Object|null}
Get metadata for a node
.Get metadata for a node
Parameters:
Name | Type | Description |
---|---|---|
uri |
string | Node URI |
- Source:
Returns:
Node metadata
- Type
- Object | null
getNodeMetadata(uri) → {Object|null}
Get node metadata
.Get node metadata
Parameters:
Name | Type | Description |
---|---|---|
uri |
string | Node URI |
- Source:
Returns:
Node metadata
- Type
- Object | null
getNodeType(graph, nodeUri) → {string}
Get the primary ragno type for a node
.Get the primary ragno type for a node
Parameters:
Name | Type | Description |
---|---|---|
graph |
Object | Graph representation |
nodeUri |
string | Node URI |
Returns:
Node type
- Type
- string
getNodeWeights(nodeIndex) → {Array}
Get weight vector for a specific map node
.Get weight vector for a specific map node
Parameters:
Name | Type | Description |
---|---|---|
nodeIndex |
number | Index of the map node |
Returns:
Weight vector
- Type
- Array
getNodesByType(type, limitopt) → {Array}
Get nodes by type
.Get nodes by type
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
type |
string | Ragno type |
|
limit |
number |
<optional> |
Maximum number of nodes to return |
- Source:
Returns:
Nodes of the specified type
- Type
- Array
getNodesByType(type, limitopt) → {Array}
Get nodes by type
.Get nodes by type
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
type |
string | Ragno type |
|
limit |
number |
<optional> |
Maximum number of nodes |
- Source:
Returns:
Nodes of specified type
- Type
- Array
getOntologyInfo() → {Object}
Get ontology metadata
.Get ontology metadata
- Source:
Returns:
Ontology information
- Type
- Object
getOptimalResultLimit(zoomLevel, tokenBudget) → {number}
Get optimal result limit for a zoom level
.Get optimal result limit for a zoom level
Parameters:
Name | Type | Default | Description |
---|---|---|---|
zoomLevel |
string | The zoom level |
|
tokenBudget |
number | 4000 | Available token budget |
- Source:
Returns:
Recommended result limit
- Type
- number
(async) getOptions()
Get available navigation options
.Get available navigation options
- Source:
getOtherEntity(entity) → {NamedNode|null}
Get the other entity in this relationship
.Get the other entity in this relationship
Parameters:
Name | Type | Description |
---|---|---|
entity |
RDFElement | NamedNode | string | Known entity |
- Source:
Returns:
Other entity
- Type
- NamedNode | null
getPPRScore() → {number|null}
Get PPR score for this element
.Get PPR score for this element
- Source:
Returns:
PPR score
- Type
- number | null
getParameterSummary()
Get parameter summary for logging
.Get parameter summary for logging
getParserInfo()
Get parser configuration and stats
.Get parser configuration and stats
- Source:
getPerformanceStats() → {Object}
Get performance statistics
.Get performance statistics
- Source:
Returns:
Performance statistics
- Type
- Object
getPosition() → {number|null}
Get position in source document
.Get position in source document
- Source:
Returns:
Character position
- Type
- number | null
getPrefLabel() → {string}
Get the SKOS prefLabel for this entity (or empty string if not set)
.Get the SKOS prefLabel for this entity (or empty string if not set)
- Source:
Returns:
- Type
- string
getPrefLabel() → {string|null}
Get SKOS preferred label
.Get SKOS preferred label
- Source:
Returns:
Label text
- Type
- string | null
getPreferredLabel() → {string}
Get the preferred label (SKOS prefLabel) for this entity
.Get the preferred label (SKOS prefLabel) for this entity
- Source:
Returns:
The preferred label, or empty string if not set
- Type
- string
getPrefixes() → {Map}
Get prefix mapping for serialization
.Get prefix mapping for serialization
- Source:
Returns:
Prefix to namespace URI mapping
- Type
- Map
getPrefixesAsObject() → {Object}
Get prefixes as object for JSON-LD context
.Get prefixes as object for JSON-LD context
- Source:
Returns:
Prefix mapping object
- Type
- Object
getPrimaryTypes(zoomLevel) → {Array.<string>}
Get primary RDF types for a zoom level
.Get primary RDF types for a zoom level
Parameters:
Name | Type | Description |
---|---|---|
zoomLevel |
string | The zoom level |
- Source:
Returns:
Array of primary RDF type URIs
- Type
- Array.<string>
getProjectionDocumentation()
Get projection documentation
.Get projection documentation
- Source:
getProvenance() → {Array.<NamedNode>}
Get provenance information for this attribute
.Get provenance information for this attribute
- Source:
Returns:
Provenance nodes
- Type
- Array.<NamedNode>
getQueryStats()
Get query statistics for optimization
.Get query statistics for optimization
- Source:
getRagnoLocalName(uri) → {string}
Get the local name from a ragno URI
.Get the local name from a ragno URI
Parameters:
Name | Type | Description |
---|---|---|
uri |
string | Full ragno URI |
- Source:
Returns:
Local name
- Type
- string
getRecommendations(zoomLevel, panFilters, tiltRepresentation) → {Array.<string>}
Get optimization recommendations
.Get optimization recommendations
Parameters:
Name | Type | Description |
---|---|---|
zoomLevel |
string | The zoom level |
panFilters |
Object | Pan filter parameters |
tiltRepresentation |
string | Tilt representation |
- Source:
Returns:
Optimization recommendations
- Type
- Array.<string>
getRecommendedTilt(zoomLevel) → {string}
Get recommended tilt representation for a zoom level
.Get recommended tilt representation for a zoom level
Parameters:
Name | Type | Description |
---|---|---|
zoomLevel |
string | The zoom level |
- Source:
Returns:
Recommended tilt representation
- Type
- string
getRelationshipType() → {string|null}
Get the relationship type
.Get the relationship type
- Source:
Returns:
Relationship type
- Type
- string | null
getRelationships(optionsopt) → {Array}
Get all relationships involving this entity
.Get all relationships involving this entity
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
Object |
<optional> |
Query options |
- Source:
Returns:
Relationship information
- Type
- Array
getRelationships() → {Array.<NamedNode>}
Get all relationships in the dataset
.Get all relationships in the dataset
- Source:
Returns:
Array of relationship nodes
- Type
- Array.<NamedNode>
getRouteHandlers() → {Object}
Get Express.js route handlers
.Get Express.js route handlers
- Source:
Returns:
Route handlers for Express app
- Type
- Object
getRuleSelectivity()
Get estimated selectivity of a rule
.Get estimated selectivity of a rule
getSPARQLPrefixes() → {string}
Generate SPARQL prefixes string
.Generate SPARQL prefixes string
- Source:
Returns:
SPARQL prefix declarations
- Type
- string
(async) getSchema()
Get parameter schema and examples
.Get parameter schema and examples
- Source:
getSchema()
Get parameter schema for documentation
.Get parameter schema for documentation
(async) getSearchStrategies()
Get search strategies information
.Get search strategies information
- Source:
getSelectionStrategy(zoomLevel) → {Object}
Get selection strategy for a zoom level
.Get selection strategy for a zoom level
Parameters:
Name | Type | Description |
---|---|---|
zoomLevel |
string | The zoom level |
- Source:
Returns:
Selection strategy configuration
- Type
- Object
getSimilarityScore() → {number|null}
Get similarity score for this element
.Get similarity score for this element
- Source:
Returns:
Similarity score
- Type
- number | null
getSourceDocument() → {NamedNode|null}
Get source document for this unit
.Get source document for this unit
- Source:
Returns:
Source document node
- Type
- NamedNode | null
getSourceEntity() → {NamedNode|null}
Get the source entity for this relationship
.Get the source entity for this relationship
- Source:
Returns:
Source entity node
- Type
- NamedNode | null
getStatistics() → {Object}
Get current statistics
.Get current statistics
Returns:
Current clustering statistics
- Type
- Object
getStatistics() → {Object}
Get current statistics
.Get current statistics
Returns:
Current analysis statistics
- Type
- Object
getStatistics() → {Object}
Get algorithm statistics
.Get algorithm statistics
- Source:
Returns:
Algorithm statistics
- Type
- Object
getStatistics() → {Object}
Get current statistics
.Get current statistics
Returns:
Current PPR statistics
- Type
- Object
getStatistics() → {Object}
Get algorithm statistics
.Get algorithm statistics
- Source:
Returns:
VSOM statistics
- Type
- Object
getStatistics() → {Object}
Get current algorithm statistics
.Get current algorithm statistics
Returns:
Performance and usage statistics
- Type
- Object
getStatistics() → {Object}
Get training statistics
.Get training statistics
Returns:
Training statistics
- Type
- Object
getStatistics() → {Object}
Get search statistics
.Get search statistics
- Source:
Returns:
Current statistics
- Type
- Object
getStatistics() → {Object}
Get API statistics
.Get API statistics
- Source:
Returns:
API statistics
- Type
- Object
getStatistics() → {Object}
Get index statistics
.Get index statistics
- Source:
Returns:
Index statistics
- Type
- Object
getStatistics() → {Object}
Get comprehensive system statistics
.Get comprehensive system statistics
- Source:
Returns:
System statistics
- Type
- Object
getStats() → {Object}
Get dataset statistics
.Get dataset statistics
- Source:
Returns:
Statistics about the graph
- Type
- Object
getStats()
Get chunking statistics
.Get chunking statistics
- Source:
getStatus() → {Object}
Get system status
.Get system status
- Source:
Returns:
System status
- Type
- Object
getStrategyInfo()
Get strategy information
.Get strategy information
- Source:
getSubType() → {string|null}
Get sub-type of this element
.Get sub-type of this element
- Source:
Returns:
Sub-type identifier
- Type
- string | null
getSummary() → {string|null}
Get summary for this attribute
.Get summary for this attribute
- Source:
Returns:
Summary text
- Type
- string | null
getSummary() → {string|null}
Get summary for this unit
.Get summary for this unit
- Source:
Returns:
Summary text
- Type
- string | null
getSummary()
Generate human-readable criteria summary
.Generate human-readable criteria summary
getSupportedProviders() → {Array.<string>}
Get list of supported embedding providers
.Get list of supported embedding providers
Returns:
- Array of supported provider names
- Type
- Array.<string>
getTargetEntity() → {NamedNode|null}
Get the target entity for this relationship
.Get the target entity for this relationship
- Source:
Returns:
Target entity node
- Type
- NamedNode | null
getTargetTypes()
Get target element types for zoom level
.Get target element types for zoom level
getTemporal() → {Date|null}
Get temporal information for this attribute
.Get temporal information for this attribute
- Source:
Returns:
Temporal information
- Type
- Date | null
getText() → {string|null}
Get the main text content of this attribute
.Get the main text content of this attribute
- Source:
Returns:
Text content
- Type
- string | null
getText() → {string|null}
Get the main text content of this unit
.Get the main text content of this unit
- Source:
Returns:
Text content
- Type
- string | null
getTiltFields(tiltRepresentation) → {Array.<string>}
Get tilt-specific fields
.Get tilt-specific fields
Parameters:
Name | Type | Description |
---|---|---|
tiltRepresentation |
string | The tilt representation |
- Source:
Returns:
Tilt-specific SPARQL fields
- Type
- Array.<string>
getTiltOutputFormat()
Get tilt output format
.Get tilt output format
getTiltProcessingType()
Get tilt processing type
.Get tilt processing type
getTokenizerInfo(tokenizerName) → {Object}
Get tokenizer information
.Get tokenizer information
Parameters:
Name | Type | Description |
---|---|---|
tokenizerName |
string | Tokenizer name |
- Source:
Returns:
Tokenizer information
- Type
- Object
getTopKNodes(scores, kopt) → {Array}
Get nodes with highest scores from analysis results
.Get nodes with highest scores from analysis results
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
scores |
Map | Node URI -> score mapping |
||
k |
number |
<optional> |
10 | Number of top nodes to return |
Returns:
Top k nodes with scores
- Type
- Array
getTopKNodes(analysisResults, kopt) → {Object}
Get top-k important nodes across all metrics
.Get top-k important nodes across all metrics
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
analysisResults |
Object | Results from runFullAnalysis |
||
k |
number |
<optional> |
10 | Number of top nodes to return |
- Source:
Returns:
Top-k nodes with scores from different algorithms
- Type
- Object
getTopology() → {Object}
Get topology information
.Get topology information
- Source:
Returns:
Topology information
- Type
- Object
getTopologyInfo() → {Object}
Get topology information
.Get topology information
Returns:
Topology information
- Type
- Object
(async) getTrainingStatus()
Get training status
.Get training status
- Source:
getTrainingStatus() → {Object}
Get current training status
.Get current training status
Returns:
Training status information
- Type
- Object
getTriples() → {Array}
Get all triples where this element is the subject
.Get all triples where this element is the subject
- Source:
Returns:
Array of quads
- Type
- Array
getTriplesWithPredicate(predicate) → {Array}
Get all triples with specific predicate
.Get all triples with specific predicate
Parameters:
Name | Type | Description |
---|---|---|
predicate |
NamedNode | Predicate to match |
- Source:
Returns:
Array of matching quads
- Type
- Array
getTurtlePrefixes() → {string}
Generate Turtle prefixes string
.Generate Turtle prefixes string
- Source:
Returns:
Turtle prefix declarations
- Type
- string
getTypes() → {Array.<NamedNode>}
Get all types of this element
.Get all types of this element
- Source:
Returns:
Array of RDF types
- Type
- Array.<NamedNode>
getURI() → {string}
Get the URI of this element
.Get the URI of this element
- Source:
Returns:
The URI string
- Type
- string
getUnits() → {Array.<NamedNode>}
Get all units in the dataset
.Get all units in the dataset
- Source:
Returns:
Array of unit nodes
- Type
- Array.<NamedNode>
getVisualizationCoordinates(outputFormat) → {Array}
Get visualization coordinates for the map nodes Converts map coordinates to visual coordinates suitable for plotting
.Get visualization coordinates for the map nodes Converts map coordinates to visual coordinates suitable for plotting
Parameters:
Name | Type | Default | Description |
---|---|---|---|
outputFormat |
string | cartesian | 'cartesian', 'normalized', 'screen' |
Returns:
Array of coordinate pairs for visualization
- Type
- Array
getWeight() → {number|null}
Get the weight for this relationship
.Get the weight for this relationship
- Source:
Returns:
Relationship weight
- Type
- number | null
getZoomDescriptions()
Configuration and documentation helpers
.Configuration and documentation helpers
- Source:
getZoomGranularity()
Get zoom granularity level
.Get zoom granularity level
getZoomLevelDocumentation() → {Object}
Get zoom level metadata for API documentation
.Get zoom level metadata for API documentation
- Source:
Returns:
Complete zoom level documentation
- Type
- Object
getZoomMapping(zoomLevel) → {Object}
Get mapping configuration for a zoom level
.Get mapping configuration for a zoom level
Parameters:
Name | Type | Description |
---|---|---|
zoomLevel |
string | The zoom level (corpus, community, unit, entity, text) |
- Source:
Returns:
Zoom level configuration
- Type
- Object
groupNodesByType(graph, scores) → {Map}
Group nodes by their ragno ontology type
.Group nodes by their ragno ontology type
Parameters:
Name | Type | Description |
---|---|---|
graph |
Object | Graph representation |
scores |
Map | Node scores |
Returns:
Type to node scores mapping
- Type
- Map
(async) handleDualSearch(req, res)
Main dual search endpoint handler
.Main dual search endpoint handler
Parameters:
Name | Type | Description |
---|---|---|
req |
Object | Express request object |
res |
Object | Express response object |
- Source:
(async) handleEntityDetails(req, res)
Entity details endpoint handler
.Entity details endpoint handler
Parameters:
Name | Type | Description |
---|---|---|
req |
Object | Express request object |
res |
Object | Express response object |
- Source:
(async) handleError(error, req, res, context)
Main error handling method
.Main error handling method
Parameters:
Name | Type | Description |
---|---|---|
error |
Error | The error to handle |
req |
Object | HTTP request object |
res |
Object | HTTP response object |
context |
Object | Additional context |
- Source:
(async) handleExactSearch(req, res)
Exact search endpoint handler
.Exact search endpoint handler
Parameters:
Name | Type | Description |
---|---|---|
req |
Object | Express request object |
res |
Object | Express response object |
- Source:
(async) handleGraphStats(req, res)
Graph statistics endpoint handler
.Graph statistics endpoint handler
Parameters:
Name | Type | Description |
---|---|---|
req |
Object | Express request object |
res |
Object | Express response object |
- Source:
(async) handleHealth()
Handle health check requests
.Handle health check requests
- Source:
(async) handleMetrics()
Handle metrics requests
.Handle metrics requests
- Source:
(async) handleNavigate()
Handle main navigation requests
.Handle main navigation requests
- Source:
(async) handleOptions()
Handle options requests
.Handle options requests
- Source:
(async) handlePreview()
Handle preview requests (limited processing)
.Handle preview requests (limited processing)
- Source:
(async) handleRequest(req, res)
Main request handler - routes requests to appropriate endpoints
.Main request handler - routes requests to appropriate endpoints
Parameters:
Name | Type | Description |
---|---|---|
req |
Object | HTTP request object |
res |
Object | HTTP response object |
- Source:
(async) handleSchema()
Handle schema requests
.Handle schema requests
- Source:
(async) handleSearchStats(req, res)
Search statistics endpoint handler
.Search statistics endpoint handler
Parameters:
Name | Type | Description |
---|---|---|
req |
Object | Express request object |
res |
Object | Express response object |
- Source:
(async) handleSearchStatus(req, res)
Search status endpoint handler
.Search status endpoint handler
Parameters:
Name | Type | Description |
---|---|---|
req |
Object | Express request object |
res |
Object | Express response object |
- Source:
(async) handleSimilaritySearch(req, res)
Vector similarity search endpoint handler
.Vector similarity search endpoint handler
Parameters:
Name | Type | Description |
---|---|---|
req |
Object | Express request object |
res |
Object | Express response object |
- Source:
(async) handleTraversalSearch(req, res)
PPR traversal search endpoint handler
.PPR traversal search endpoint handler
Parameters:
Name | Type | Description |
---|---|---|
req |
Object | Express request object |
res |
Object | Express response object |
- Source:
hasFilters()
Check if pan has any active filters
.Check if pan has any active filters
hasNode(uri) → {boolean}
Check if a node exists in the index
.Check if a node exists in the index
Parameters:
Name | Type | Description |
---|---|---|
uri |
string | Node URI |
- Source:
Returns:
True if node exists
- Type
- boolean
hasNode(uri) → {boolean}
Check if node exists in index
.Check if node exists in index
Parameters:
Name | Type | Description |
---|---|---|
uri |
string | Node URI |
- Source:
Returns:
True if node exists
- Type
- boolean
hasRelationshipWith(otherEntity) → {boolean}
Check if this entity has a relationship with another entity
.Check if this entity has a relationship with another entity
Parameters:
Name | Type | Description |
---|---|---|
otherEntity |
Entity | NamedNode | string | Other entity to check |
- Source:
Returns:
True if relationship exists
- Type
- boolean
hasStructure()
Utility methods
.Utility methods
- Source:
hasType(type) → {boolean}
Check if this element has a specific type
.Check if this element has a specific type
Parameters:
Name | Type | Description |
---|---|---|
type |
NamedNode | RDF type to check |
- Source:
Returns:
True if element has this type
- Type
- boolean
hashObject(obj) → {string}
Hash object for cache key generation
.Hash object for cache key generation
Parameters:
Name | Type | Description |
---|---|---|
obj |
Object | Object to hash |
- Source:
Returns:
Hash string
- Type
- string
hashObject()
Simple hash function for cache keys
.Simple hash function for cache keys
- Source:
(async) hierarchicalChunking()
Hierarchical chunking strategy
.Hierarchical chunking strategy
- Source:
(async) identifyImportantEntities(graphData, method, topK, minScore) → {Promise.<Array>}
Identify important entities using graph analysis algorithms
.Identify important entities using graph analysis algorithms
Parameters:
Name | Type | Description |
---|---|---|
graphData |
Object | Graph data with entities and relationships |
method |
string | Importance calculation method |
topK |
number | Number of top entities to select |
minScore |
number | Minimum importance score threshold |
- Source:
Returns:
Array of important entity data objects
- Type
- Promise.<Array>
(async) identifyRetrievableNodes(graphData, retrievableTypes) → {Promise.<Array>}
Identify retrievable nodes from graph data
.Identify retrievable nodes from graph data
Parameters:
Name | Type | Description |
---|---|---|
graphData |
Object | Graph data |
retrievableTypes |
Array.<string> | Types to include |
- Source:
Returns:
Array of retrievable node objects
- Type
- Promise.<Array>
incrementFrequency(incrementopt)
Increment frequency counter
.Increment frequency counter
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
increment |
number |
<optional> |
1 | Amount to increment |
- Source:
(async) indexContent()
Index content for search
.Index content for search
- Source:
indexToCoordinates(index) → {Array}
Convert linear index to 2D map coordinates
.Convert linear index to 2D map coordinates
Parameters:
Name | Type | Description |
---|---|---|
index |
number | Linear index |
Returns:
[x, y] coordinates
- Type
- Array
indexToCoordinates(index) → {Array}
Convert linear index to 2D coordinates
.Convert linear index to 2D coordinates
Parameters:
Name | Type | Description |
---|---|---|
index |
number | Linear index |
Returns:
[x, y] coordinates
- Type
- Array
init()
Initialize the VSOM feature
.Initialize the VSOM feature
initChatForms()
Initialize chat functionality
.Initialize chat functionality
- Source:
initMCPClient()
Initialize MCP Client
.Initialize MCP Client
initRangeInputs()
Initialize range inputs with value display
.Initialize range inputs with value display
- Source:
initSettingsForm()
Initialize settings form
.Initialize settings form
initTabs()
Initialize tab navigation
.Initialize tab navigation
- Source:
(async, abstract) initialize()
Initialize the API instance
.Initialize the API instance
- Source:
(async) initialize() → {Promise.<void>}
Initialize the Claude client
.Initialize the Claude client
- Source:
Returns:
- Type
- Promise.<void>
(async) initialize()
Initialize the Claude client
.Initialize the Claude client
- Source:
(async) initialize() → {Promise.<void>}
Initialize the Mistral client
.Initialize the Mistral client
- Source:
Returns:
- Type
- Promise.<void>
(async) initialize()
Initialize the Nomic client
.Initialize the Nomic client
- Source:
(async) initialize()
Initialize the Ollama client
.Initialize the Ollama client
- Source:
(async) initialize(optionsopt)
Initialize the complete search system
.Initialize the complete search system
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
Object |
<optional> |
Initialization options |
- Source:
(async) initialize(dependencies)
Initialize dependencies
.Initialize dependencies
Parameters:
Name | Type | Description |
---|---|---|
dependencies |
Object | Required components |
- Source:
initializeApp()
Initialize the entire application
.Initialize the entire application
- Source:
(async) initializeAtuin()
Initialize Atuin components and real event bus
.Initialize Atuin components and real event bus
- Source:
initializeBoundaryDetectors()
Initialize boundary detection patterns
.Initialize boundary detection patterns
- Source:
initializeChunkingStrategies()
Initialize different chunking strategies
.Initialize different chunking strategies
- Source:
initializeCompressionLevels()
Initialize compression levels
.Initialize compression levels
- Source:
initializeDefaultRules()
Initialize default selection rules
.Initialize default selection rules
initializeDefaults()
Initialize default values for parameters
.Initialize default values for parameters
initializeDomainPatterns()
Initialize domain-specific patterns and vocabularies
.Initialize domain-specific patterns and vocabularies
- Source:
initializeEncodingStrategies()
Initialize metadata encoding strategies
.Initialize metadata encoding strategies
- Source:
initializeEndpoints()
Initialize endpoint configurations
.Initialize endpoint configurations
- Source:
initializeErrorCodes()
Initialize specific error codes
.Initialize specific error codes
- Source:
initializeErrorTypes()
Initialize error type definitions
.Initialize error type definitions
- Source:
initializeFilterStrategies()
Initialize filtering strategies for different pan dimensions
.Initialize filtering strategies for different pan dimensions
- Source:
initializeFormats()
Initialize available output formats
.Initialize available output formats
- Source:
initializeFormatters()
Initialize response formatters for different content types
.Initialize response formatters for different content types
- Source:
initializeInstructions()
Initialize instruction sets for different use cases
.Initialize instruction sets for different use cases
- Source:
(async) initializeLLMProvider()
Initialize the appropriate LLM provider based on config
.Initialize the appropriate LLM provider based on config
- Source:
initializeLinearWeights()
Initialize weights with linear interpolation across map
.Initialize weights with linear interpolation across map
- Source:
initializeMetadataSchemas()
Initialize metadata schemas for different contexts
.Initialize metadata schemas for different contexts
- Source:
initializeModelMappings()
Initialize model-specific token counting configurations
.Initialize model-specific token counting configurations
- Source:
initializeNamespaces()
Initialize namespace prefixes for SPARQL queries
.Initialize namespace prefixes for SPARQL queries
- Source:
initializeOutputFormats()
Initialize output format specifications
.Initialize output format specifications
- Source:
initializePCAWeights()
Initialize weights using PCA (placeholder - would need input data)
.Initialize weights using PCA (placeholder - would need input data)
initializePipeline()
Initialize transformation pipeline stages
.Initialize transformation pipeline stages
initializeProjectionStrategies()
Initialize projection strategies for each tilt representation
.Initialize projection strategies for each tilt representation
- Source:
initializeQueryTemplates()
Initialize SPARQL query templates for different zoom levels
.Initialize SPARQL query templates for different zoom levels
- Source:
initializeRandomWeights()
Initialize weights with random values (Gaussian distribution)
.Initialize weights with random values (Gaussian distribution)
- Source:
initializeRecoveryStrategies()
Initialize error recovery strategies
.Initialize error recovery strategies
- Source:
initializeSchemas()
Initialize parameter schemas based on ZPT specification
.Initialize parameter schemas based on ZPT specification
initializeSelectionStrategies()
Initialize selection strategies for each zoom level
.Initialize selection strategies for each zoom level
- Source:
initializeTemplates()
Initialize response templates
.Initialize response templates
- Source:
initializeTemplates()
Initialize formatting templates
.Initialize formatting templates
- Source:
initializeTokenizers()
Initialize available tokenizers and their configurations
.Initialize available tokenizers and their configurations
- Source:
initializeValidators()
Initialize request validators
.Initialize request validators
- Source:
initializeWeights(mapSize, inputDimension, initMethod)
Initialize the SOM weight matrix with random values
.Initialize the SOM weight matrix with random values
Parameters:
Name | Type | Default | Description |
---|---|---|---|
mapSize |
Array | [width, height] dimensions |
|
inputDimension |
number | Dimension of input vectors |
|
initMethod |
string | random | Initialization method ('random', 'linear', 'pca') |
- Source:
initializeZoomMappings()
Initialize zoom level to RDF type mappings
.Initialize zoom level to RDF type mappings
- Source:
integrateWithGraphAnalytics(graphResults) → {Object}
Integrate with GraphAnalytics results
.Integrate with GraphAnalytics results
Parameters:
Name | Type | Description |
---|---|---|
graphResults |
Object | Results from GraphAnalytics |
- Source:
Returns:
Integration results
- Type
- Object
(async) integrateWithHyde(hydeResults) → {Object}
Integrate with Hyde algorithm results
.Integrate with Hyde algorithm results
Parameters:
Name | Type | Description |
---|---|---|
hydeResults |
Object | Results from Hyde algorithm |
- Source:
Returns:
Integration results
- Type
- Object
involves(entity) → {boolean}
Check if this relationship involves a specific entity
.Check if this relationship involves a specific entity
Parameters:
Name | Type | Description |
---|---|---|
entity |
RDFElement | NamedNode | string | Entity to check |
- Source:
Returns:
True if entity is source or target
- Type
- boolean
isAvailable() → {boolean}
Check if the connector is available
.Check if the connector is available
- Source:
Returns:
- Whether the connector can be used
- Type
- boolean
isCode()
Detect if text is likely code
.Detect if text is likely code
- Source:
isEntryPoint() → {boolean}
Check if this element is an entry point
.Check if this element is an entry point
- Source:
Returns:
Entry point status
- Type
- boolean
isProviderSupported(provider) → {boolean}
Check if a provider is supported
.Check if a provider is supported
Parameters:
Name | Type | Description |
---|---|---|
provider |
string | Provider name to check |
Returns:
- Whether the provider is supported
- Type
- boolean
isRagnoClass(uri) → {boolean}
Check if a URI is a ragno class
.Check if a URI is a ragno class
Parameters:
Name | Type | Description |
---|---|---|
uri |
string | URI to check |
- Source:
Returns:
True if ragno class
- Type
- boolean
isRagnoProperty(uri) → {boolean}
Check if a URI is a ragno property
.Check if a URI is a ragno property
Parameters:
Name | Type | Description |
---|---|---|
uri |
string | URI to check |
- Source:
Returns:
True if ragno property
- Type
- boolean
isRagnoURI(uri) → {boolean}
Check if a URI belongs to the ragno namespace
.Check if a URI belongs to the ragno namespace
Parameters:
Name | Type | Description |
---|---|---|
uri |
string | URI to check |
- Source:
Returns:
True if ragno namespace
- Type
- boolean
isRelevantAt(date) → {boolean}
Check if this attribute is relevant to a specific time period
.Check if this attribute is relevant to a specific time period
Parameters:
Name | Type | Description |
---|---|---|
date |
Date | Date to check |
- Source:
Returns:
True if attribute is relevant at the given date
- Type
- boolean
isStopWord(word) → {boolean}
Check if word is a stop word
.Check if word is a stop word
Parameters:
Name | Type | Description |
---|---|---|
word |
string | Word to check |
- Source:
Returns:
True if stop word
- Type
- boolean
isStopWord(word) → {boolean}
Check if word is a stop word
.Check if word is a stop word
Parameters:
Name | Type | Description |
---|---|---|
word |
string | Word to check |
- Source:
Returns:
True if stop word
- Type
- boolean
isValidCoordinate(x, y) → {boolean}
Check if coordinates are valid for the current map
.Check if coordinates are valid for the current map
Parameters:
Name | Type | Description |
---|---|---|
x |
number | X coordinate |
y |
number | Y coordinate |
Returns:
True if coordinates are valid
- Type
- boolean
(async) listInstances()
List all VSOM instances
.List all VSOM instances
- Source:
loadChatProviders()
Load chat providers (legacy function for compatibility)
.Load chat providers (legacy function for compatibility)
- Source:
(async) loadConfigFromServer()
Load config from server and populate UI
.Load config from server and populate UI
(async) loadData()
Load data into a VSOM instance
.Load data into a VSOM instance
- Source:
(async) loadFromEntities(entities, embeddingHandler, optionsopt) → {Promise.<Object>}
Load entities from an array with embedding generation
.Load entities from an array with embedding generation
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
entities |
Array | Array of Entity objects or entity data |
|
embeddingHandler |
Object | Embedding handler for vector generation |
|
options |
Object |
<optional> |
Loading options |
- Source:
Returns:
Loading results
- Type
- Promise.<Object>
(async) loadFromRagno()
Load concept graph from SPARQL on initialization
.Load concept graph from SPARQL on initialization
- Source:
(async) loadFromSPARQL(endpoint, query, embeddingHandler, optionsopt) → {Promise.<Object>}
Load entities from SPARQL endpoint
.Load entities from SPARQL endpoint
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
endpoint |
string | SPARQL endpoint URL |
|
query |
string | SPARQL query to retrieve entities |
|
embeddingHandler |
Object | Embedding handler for vector generation |
|
options |
Object |
<optional> |
Loading options |
- Source:
Returns:
Loading results
- Type
- Promise.<Object>
(async) loadFromVectorIndex(vectorIndex, filtersopt) → {Promise.<Object>}
Load entities from existing VectorIndex
.Load entities from existing VectorIndex
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
vectorIndex |
Object | VectorIndex instance |
|
filters |
Object |
<optional> |
Filters to apply |
- Source:
Returns:
Loading results
- Type
- Promise.<Object>
(async) loadIndex(indexPath, metadataPath)
Load index from file
.Load index from file
Parameters:
Name | Type | Description |
---|---|---|
indexPath |
string | Path to HNSW index file |
metadataPath |
string | Path to metadata file |
- Source:
loadSettings()
Load saved settings from localStorage
.Load saved settings from localStorage
(async) loadVectorIndex()
Load vector index from disk
.Load vector index from disk
- Source:
localMovingPhase(graph, nodeToCommId, options) → {Object}
Local moving phase of Leiden algorithm
.Local moving phase of Leiden algorithm
Parameters:
Name | Type | Description |
---|---|---|
graph |
Object | Graph representation |
nodeToCommId |
Map | Current node to community mapping |
options |
Object | Algorithm options |
Returns:
Updated node to community mapping
- Type
- Object
logTrainingProgress(iteration, learningRate, neighborhoodRadius, results)
Log training progress
.Log training progress
Parameters:
Name | Type | Description |
---|---|---|
iteration |
number | Current iteration |
learningRate |
number | Learning rate |
neighborhoodRadius |
number | Neighborhood radius |
results |
Object | Iteration results |
manhattanDistance(vector1, vector2) → {number}
Calculate Manhattan distance
.Calculate Manhattan distance
Parameters:
Name | Type | Description |
---|---|---|
vector1 |
Array | First vector |
vector2 |
Array | Second vector |
Returns:
Manhattan distance
- Type
- number
matchEndpoint()
Request routing and validation
.Request routing and validation
- Source:
matchesFilters(properties, filters) → {boolean}
Check if properties match specified filters
.Check if properties match specified filters
Parameters:
Name | Type | Description |
---|---|---|
properties |
Object | Entity properties |
filters |
Object | Filter criteria |
- Source:
Returns:
Whether properties match filters
- Type
- boolean
mergeSmallChunks()
Merge small consecutive chunks
.Merge small consecutive chunks
- Source:
(async) navigate()
Main navigation operation
.Main navigation operation
- Source:
normalize(params) → {Object}
Normalize complete parameter object
.Normalize complete parameter object
Parameters:
Name | Type | Description |
---|---|---|
params |
Object | Raw navigation parameters |
Returns:
Normalized parameters
- Type
- Object
normalizeContent()
Normalize content input to a standard format
.Normalize content input to a standard format
- Source:
normalizeCoordinates(x, y) → {Array}
Normalize coordinates according to boundary conditions
.Normalize coordinates according to boundary conditions
Parameters:
Name | Type | Description |
---|---|---|
x |
number | X coordinate |
y |
number | Y coordinate |
Returns:
Normalized coordinates [x, y]
- Type
- Array
normalizeEntityFilter()
Normalize entity filter
.Normalize entity filter
normalizeError()
Normalize error into standard format
.Normalize error into standard format
- Source:
normalizeGeographicFilter()
Normalize geographic filter
.Normalize geographic filter
normalizePan()
Normalize pan parameter with filters
.Normalize pan parameter with filters
normalizePath()
Utility methods
.Utility methods
- Source:
normalizeTemporalFilter()
Normalize temporal filter
.Normalize temporal filter
normalizeTilt()
Normalize tilt parameter
.Normalize tilt parameter
normalizeTopicFilter()
Normalize topic filter
.Normalize topic filter
normalizeTransform()
Normalize transform parameter with defaults
.Normalize transform parameter with defaults
normalizeZoom()
Normalize zoom parameter
.Normalize zoom parameter
offsetToCube(col, row) → {Object}
Convert offset coordinates to cube coordinates (for hexagonal topology)
.Convert offset coordinates to cube coordinates (for hexagonal topology)
Parameters:
Name | Type | Description |
---|---|---|
col |
number | Column (x coordinate) |
row |
number | Row (y coordinate) |
Returns:
Cube coordinates {x, y, z}
- Type
- Object
optimizeCriteria()
Optimize criteria for performance
.Optimize criteria for performance
optimizeIndex(optionsopt)
Optimize index performance
.Optimize index performance
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
Object |
<optional> |
Optimization options |
- Source:
optimizeTokenUsage(content, tokenBudget, strategy) → {Object}
Optimize token usage for a given budget
.Optimize token usage for a given budget
Parameters:
Name | Type | Default | Description |
---|---|---|---|
content |
Array.<Object> | Content items with token counts |
|
tokenBudget |
number | Available token budget |
|
strategy |
string | priority | Optimization strategy |
- Source:
Returns:
Optimization result
- Type
- Object
optimizeVectorIndex(optionsopt)
Optimize vector index
.Optimize vector index
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
Object |
<optional> |
Optimization options |
- Source:
(async) parse(req) → {Promise.<Object>}
Main parsing method - extracts and normalizes request data
.Main parsing method - extracts and normalizes request data
Parameters:
Name | Type | Description |
---|---|---|
req |
Object | HTTP request object |
- Source:
Returns:
Parsed request data
- Type
- Promise.<Object>
(async) parseBody()
Parse request body based on content type
.Parse request body based on content type
- Source:
(async) parseComponents()
Parse all request components
.Parse all request components
- Source:
parseCookies()
Parse cookies from header
.Parse cookies from header
- Source:
parseEntityExtractionResponse(response) → {Array}
Parse LLM response for extracted entities
.Parse LLM response for extracted entities
Parameters:
Name | Type | Description |
---|---|---|
response |
string | LLM response |
- Source:
Returns:
Extracted entity names
- Type
- Array
parseFormBody()
Parse form-encoded body
.Parse form-encoded body
- Source:
parseHeaders()
Parse request headers
.Parse request headers
- Source:
parseJsonBody()
Parse JSON body
.Parse JSON body
- Source:
parseJsonResponse(responseText) → {Object}
Attempt to parse JSON with syntax resolution
This is a convenience method that combines resolveSyntax with JSON.parse and provides detailed error information.
Attempt to parse JSON with syntax resolution
This is a convenience method that combines resolveSyntax with JSON.parse and provides detailed error information.
Parameters:
Name | Type | Description |
---|---|---|
responseText |
string | Raw LLM response text |
- Source:
Returns:
- {success: boolean, data?: any, error?: string, cleaned?: string}
- Type
- Object
parseMultipartBody()
Parse multipart form data (simplified implementation)
.Parse multipart form data (simplified implementation)
- Source:
parseMultipartPart()
Parse individual multipart part
.Parse individual multipart part
- Source:
parseQueryParams()
Parse query parameters from URL
.Parse query parameters from URL
- Source:
parseQueryResults()
Parse SPARQL query results into corpuscle objects
.Parse SPARQL query results into corpuscle objects
(async) performClustering()
Perform clustering on the SOM
.Perform clustering on the SOM
- Source:
(async) performExactMatch(queryData, options) → {Array}
Perform exact matching via SPARQL
.Perform exact matching via SPARQL
Parameters:
Name | Type | Description |
---|---|---|
queryData |
Object | Processed query data |
options |
Object | Search options |
- Source:
Returns:
Exact match results
- Type
- Array
(async) performHealthCheck()
Perform a health check with timeout
.Perform a health check with timeout
- Source:
(async) performPPRTraversal(queryEntities, options) → {Object}
Perform PPR traversal for graph-based discovery
.Perform PPR traversal for graph-based discovery
Parameters:
Name | Type | Description |
---|---|---|
queryEntities |
Array | Starting entity URIs |
options |
Object | Traversal options |
- Source:
Returns:
PPR traversal results
- Type
- Object
(async) performVectorSimilarity(queryData, options) → {Array}
Perform vector similarity search
.Perform vector similarity search
Parameters:
Name | Type | Description |
---|---|---|
queryData |
Object | Processed query data |
options |
Object | Search options |
- Source:
Returns:
Vector similarity results
- Type
- Array
populateSettingsFromConfig()
Populate settings form from server config
.Populate settings form from server config
postProcessChunks()
Post-process chunks for optimization
.Post-process chunks for optimization
- Source:
(async) postProcessCorpuscles()
Post-process selected corpuscles
.Post-process selected corpuscles
(async) preciseTokenCount(text, tokenizerName) → {Promise.<Object>}
Precise token counting using actual tokenizer
.Precise token counting using actual tokenizer
Parameters:
Name | Type | Description |
---|---|---|
text |
string | Text to tokenize |
tokenizerName |
string | Tokenizer to use |
- Source:
Returns:
Precise token count
- Type
- Promise.<Object>
(async) preview()
Navigation preview (limited processing)
.Navigation preview (limited processing)
- Source:
(async) processConcepts()
Process concept operations in batch
.Process concept operations in batch
- Source:
(async) processEntityData()
Process entity data format
.Process entity data format
- Source:
(async) processQuery(input, llmHandler, targetDataset, options) → {Object}
Process a single query or input to generate hypotheses
.Process a single query or input to generate hypotheses
Parameters:
Name | Type | Description |
---|---|---|
input |
string | Query string or entity URI |
llmHandler |
Object | LLM handler instance |
targetDataset |
Dataset | RDF dataset to augment |
options |
Object | Processing options |
- Source:
Returns:
Processing results
- Type
- Object
(async) processQuery(query, options) → {Object}
Process natural language query to extract entities and generate embeddings
.Process natural language query to extract entities and generate embeddings
Parameters:
Name | Type | Description |
---|---|---|
query |
string | Original query string |
options |
Object | Processing options |
- Source:
Returns:
Processed query data
- Type
- Object
(async) processRelationships()
Process relationship operations in batch
.Process relationship operations in batch
- Source:
processResults(graph, scores, entryPoints, options) → {Object}
Process PPR results and generate rankings
.Process PPR results and generate rankings
Parameters:
Name | Type | Description |
---|---|---|
graph |
Object | Graph representation |
scores |
Map | PPR probability scores |
entryPoints |
Array | Original entry points |
options |
Object | Algorithm options |
Returns:
Processed results
- Type
- Object
processSPARQLResults(sparqlResults) → {Array}
Process SPARQL results into entity format
.Process SPARQL results into entity format
Parameters:
Name | Type | Description |
---|---|---|
sparqlResults |
Array | SPARQL query results |
- Source:
Returns:
Processed entities
- Type
- Array
(async) processSparqlData()
Process SPARQL data format
.Process SPARQL data format
- Source:
(async) project(corpuscles, tiltParams, context) → {Promise.<Object>}
Main projection method - transforms corpuscles based on tilt representation
.Main projection method - transforms corpuscles based on tilt representation
Parameters:
Name | Type | Description |
---|---|---|
corpuscles |
Array | Selected corpuscles to transform |
tiltParams |
Object | Normalized tilt parameters |
context |
Object | Projection context and dependencies |
- Source:
Returns:
Projected representation
- Type
- Promise.<Object>
(async) projectToEmbedding()
Project corpuscles to embedding representation
.Project corpuscles to embedding representation
- Source:
(async) projectToGraph()
Project corpuscles to graph representation
.Project corpuscles to graph representation
- Source:
(async) projectToKeywords()
Project corpuscles to keyword representation
.Project corpuscles to keyword representation
- Source:
(async) projectToTemporal()
Project corpuscles to temporal representation
.Project corpuscles to temporal representation
- Source:
pruneContext()
Remove old or low-relevance items from context
.Remove old or low-relevance items from context
- Source:
query(subjectopt, predicateopt, objectopt) → {Array}
Query the dataset using SPARQL-like patterns
.Query the dataset using SPARQL-like patterns
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
subject |
NamedNode |
<optional> |
null | Subject pattern (null for any) |
predicate |
NamedNode |
<optional> |
null | Predicate pattern (null for any) |
object |
NamedNode | Literal |
<optional> |
null | Object pattern (null for any) |
- Source:
Returns:
Array of matching quads
- Type
- Array
(async) queryByZoomLevel(queryConfig) → {Promise.<Array>}
Execute ZPT query by zoom level with filters
.Execute ZPT query by zoom level with filters
Parameters:
Name | Type | Description |
---|---|---|
queryConfig |
Object | Configuration with zoomLevel, filters, limit |
- Source:
Returns:
Query results
- Type
- Promise.<Array>
(async) queryHypotheses()
Query hypothetical content from the knowledge graph
.Query hypothetical content from the knowledge graph
- Source:
queryHypotheticalContent(dataset, filtersopt) → {Array}
Query hypothetical content from RDF dataset
.Query hypothetical content from RDF dataset
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
dataset |
Dataset | RDF dataset to query |
|
filters |
Object |
<optional> |
Query filters |
- Source:
Returns:
Hypothetical content matching filters
- Type
- Array
queryHypotheticalContent(dataset, filtersopt) → {Array}
Query hypothetical content from dataset
.Query hypothetical content from dataset
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
dataset |
Dataset | RDF dataset to query |
|
filters |
Object |
<optional> |
Query filters |
- Source:
Returns:
Hypothetical content matching filters
- Type
- Array
queueSync()
Queue a sync operation for batch processing
.Queue a sync operation for batch processing
- Source:
(async) rankBySimilarity()
Rank corpuscles by embedding similarity
.Rank corpuscles by embedding similarity
(async) readRawBody()
Read raw body data from request stream
.Read raw body data from request stream
- Source:
recordIteration(iteration, learningRate, neighborhoodRadius, results)
Record iteration results
.Record iteration results
Parameters:
Name | Type | Description |
---|---|---|
iteration |
number | Current iteration |
learningRate |
number | Learning rate used |
neighborhoodRadius |
number | Neighborhood radius used |
results |
Object | Iteration results |
(async) recoverFromValidationError()
Recovery strategy implementations
.Recovery strategy implementations
- Source:
recursive(validator, options)
Create a recursive validator for nested structures
.Create a recursive validator for nested structures
Parameters:
Name | Type | Description |
---|---|---|
validator |
string | Object | Base validator |
options |
Object | Recursion options |
- Source:
refinementPhase(graph, nodeToCommId, options) → {Object}
Refinement phase to ensure well-connected communities
.Refinement phase to ensure well-connected communities
Parameters:
Name | Type | Description |
---|---|---|
graph |
Object | Graph representation |
nodeToCommId |
Map | Current node to community mapping |
options |
Object | Algorithm options |
Returns:
Refined node to community mapping
- Type
- Object
(async) register()
Register and initialize a new API implementation
.Register and initialize a new API implementation
- Source:
register(name, validator)
Register a new validator
.Register a new validator
Parameters:
Name | Type | Description |
---|---|---|
name |
string | Validator name |
validator |
Object | Validator definition |
- Source:
registerBatch(validators)
Register multiple validators
.Register multiple validators
Parameters:
Name | Type | Description |
---|---|---|
validators |
Object | Map of validator names to definitions |
- Source:
removeNamespace(prefix)
Remove a namespace
.Remove a namespace
Parameters:
Name | Type | Description |
---|---|---|
prefix |
string | Namespace prefix to remove |
- Source:
removeNode(uri) → {boolean}
Remove a node from the index
.Remove a node from the index
Parameters:
Name | Type | Description |
---|---|---|
uri |
string | URI of the node to remove |
- Source:
Returns:
True if node was removed
- Type
- boolean
removeNodeFromIndex(uri) → {boolean}
Remove node from vector index
.Remove node from vector index
Parameters:
Name | Type | Description |
---|---|---|
uri |
string | Node URI |
- Source:
Returns:
True if removed
- Type
- boolean
removeTriple(predicate, objectopt)
Remove a triple from the dataset
.Remove a triple from the dataset
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
predicate |
NamedNode | Predicate |
||
object |
NamedNode | Literal |
<optional> |
null | Object (optional for removing all) |
- Source:
reset()
Reset VSOM state
.Reset VSOM state
- Source:
reset()
Reset training state
.Reset training state
reset()
Clear cache and reset metrics
.Clear cache and reset metrics
resetStatistics()
Reset algorithm statistics
.Reset algorithm statistics
- Source:
resetStatistics()
Reset all statistics
.Reset all statistics
- Source:
resetStatistics()
Reset algorithm statistics
.Reset algorithm statistics
resetStats()
Reset statistics
.Reset statistics
- Source:
resolve(prefixedName) → {string}
Resolve a prefixed name to full URI
.Resolve a prefixed name to full URI
Parameters:
Name | Type | Description |
---|---|---|
prefixedName |
string | Name like "ragno:Entity" |
- Source:
Returns:
Full URI
- Type
- string
resolveSyntax(responseText) → {string|false}
Resolve and clean JSON syntax from LLM responses
This method handles common patterns where LLMs wrap JSON in markdown code fences or add explanatory text around the JSON content.
Resolve and clean JSON syntax from LLM responses
This method handles common patterns where LLMs wrap JSON in markdown code fences or add explanatory text around the JSON content.
Parameters:
Name | Type | Description |
---|---|---|
responseText |
string | Raw LLM response text |
- Source:
Returns:
- Cleaned JSON string if pattern matches, false otherwise
- Type
- string | false
(async, abstract) retrieveInteractions(query)
Retrieve interactions
.Retrieve interactions
Parameters:
Name | Type | Description |
---|---|---|
query |
Object | Query parameters |
- Source:
(async) retrieveInteractions()
Retrieve interactions from memory
.Retrieve interactions from memory
- Source:
(async) retrieveInteractions()
Retrieve interactions (inherited from BaseAPI)
.Retrieve interactions (inherited from BaseAPI)
- Source:
(async) retrieveInteractions()
Retrieve interactions (inherited from BaseAPI)
.Retrieve interactions (inherited from BaseAPI)
- Source:
(async) retrieveInteractions()
Retrieve interactions (inherited from BaseAPI)
.Retrieve interactions (inherited from BaseAPI)
- Source:
runDeepPPR(graph, entryPoints, optionsopt) → {Object}
Run deep PPR for comprehensive traversal
.Run deep PPR for comprehensive traversal
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
graph |
Object | Graph representation |
|
entryPoints |
Array | Entry point node URIs |
|
options |
Object |
<optional> |
Algorithm options |
Returns:
Deep PPR results
- Type
- Object
(async) runEntityClustering(entities, embeddingHandler, optionsopt) → {Promise.<Object>}
Run entity clustering using VSOM
.Run entity clustering using VSOM
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
entities |
Array | Array of entities to cluster |
|
embeddingHandler |
Object | Embedding handler for vector generation |
|
options |
Object |
<optional> |
VSOM options |
- Source:
Returns:
Clustering results
- Type
- Promise.<Object>
(async) runFullAnalysis(dataset, optionsopt) → {Object}
Run complete graph analysis pipeline
.Run complete graph analysis pipeline
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
dataset |
Dataset | RDF-Ext dataset |
|
options |
Object |
<optional> |
Analysis options |
- Source:
Returns:
Complete analysis results
- Type
- Object
(async) runFullPipeline()
Run full ragno pipeline
.Run full ragno pipeline
- Source:
(async) runHydeGeneration(inputs, llmHandler, targetDataset, optionsopt) → {Object}
Run HyDE hypothesis generation
.Run HyDE hypothesis generation
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
inputs |
Array | string | Query strings or entity URIs |
|
llmHandler |
Object | LLM handler instance |
|
targetDataset |
Dataset | RDF dataset to augment |
|
options |
Object |
<optional> |
Hyde options |
- Source:
Returns:
Hyde generation results
- Type
- Object
runPPR(graph, entryPoints, optionsopt) → {Object}
Run Personalized PageRank from entry points
.Run Personalized PageRank from entry points
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
graph |
Object | Graph representation from GraphAnalytics |
|
entryPoints |
Array | Array of entry point node URIs |
|
options |
Object |
<optional> |
Algorithm options |
Returns:
PPR results with scores and rankings
- Type
- Object
(async) runSemanticSearch(dataset, queryEntities, optionsopt) → {Object}
Run semantic search using PPR
.Run semantic search using PPR
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
dataset |
Dataset | RDF-Ext dataset |
|
queryEntities |
Array | Entity URIs to start search from |
|
options |
Object |
<optional> |
Search options |
- Source:
Returns:
Search results with ranked nodes
- Type
- Object
runShallowPPR(graph, entryPoints, optionsopt) → {Object}
Run shallow PPR for quick traversal (2-3 iterations)
.Run shallow PPR for quick traversal (2-3 iterations)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
graph |
Object | Graph representation |
|
entryPoints |
Array | Entry point node URIs |
|
options |
Object |
<optional> |
Algorithm options |
Returns:
Shallow PPR results
- Type
- Object
(async) runTargetedAnalysis(dataset, algorithms, optionsopt) → {Object}
Run targeted analysis for specific algorithms
.Run targeted analysis for specific algorithms
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
dataset |
Dataset | RDF-Ext dataset |
|
algorithms |
Array | Array of algorithm names |
|
options |
Object |
<optional> |
Analysis options |
- Source:
Returns:
Targeted analysis results
- Type
- Object
(async) runVSOMAnalysis(dataset, embeddingHandler, optionsopt) → {Promise.<Object>}
Run VSOM analysis on dataset
.Run VSOM analysis on dataset
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
dataset |
Dataset | RDF dataset containing entities |
|
embeddingHandler |
Object | Embedding handler for vector generation |
|
options |
Object |
<optional> |
Analysis options |
- Source:
Returns:
VSOM analysis results
- Type
- Promise.<Object>
sanitizeData()
Utility methods
.Utility methods
- Source:
sanitizeErrorMessage()
Utility methods
.Utility methods
- Source:
(async) saveIndex(indexPath, metadataPath)
Save index to file
.Save index to file
Parameters:
Name | Type | Description |
---|---|---|
indexPath |
string | Path to save HNSW index |
metadataPath |
string | Path to save metadata |
- Source:
(async) saveVectorIndex()
Save vector index to disk
.Save vector index to disk
- Source:
scoreByGraph()
Score corpuscles by graph connectivity
.Score corpuscles by graph connectivity
scoreByKeywords()
Score corpuscles by keyword relevance
.Score corpuscles by keyword relevance
(async) search(query, optionsopt) → {Object}
Main dual search interface
.Main dual search interface
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
query |
string | Natural language search query |
|
options |
Object |
<optional> |
Search options |
- Source:
Returns:
Combined search results
- Type
- Object
search(queryEmbedding, kopt, optionsopt) → {Array}
Search for similar nodes
.Search for similar nodes
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
queryEmbedding |
Array.<number> | Query vector |
||
k |
number |
<optional> |
10 | Number of results to return |
options |
Object |
<optional> |
Search options |
- Source:
Returns:
Search results with scores and metadata
- Type
- Array
(async) search(query, optionsopt) → {Object}
Main search interface
.Main search interface
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
query |
string | Search query |
|
options |
Object |
<optional> |
Search options |
- Source:
Returns:
Search results
- Type
- Object
(async) search(queryEmbedding, limit, threshold) → {Array.<Object>}
Search for similar items using basic string matching
.Search for similar items using basic string matching
Parameters:
Name | Type | Default | Description |
---|---|---|---|
queryEmbedding |
Array.<number> | Query embedding vector |
|
limit |
number | 10 | Maximum number of results |
threshold |
number | 0.3 | Similarity threshold (not used in this basic implementation) |
- Source:
Returns:
Search results
- Type
- Array.<Object>
searchByTypes(queryEmbedding, types, kopt) → {Object}
Search within specific ragno types
.Search within specific ragno types
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
queryEmbedding |
Array.<number> | Query vector |
||
types |
Array.<string> | Ragno types to search within |
||
k |
number |
<optional> |
10 | Number of results per type |
- Source:
Returns:
Results grouped by type
- Type
- Object
(async) searchContent()
Search content using semantic similarity
.Search content using semantic similarity
- Source:
(async) searchExact(query, optionsopt) → {Array}
Exact match search only
.Exact match search only
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
query |
string | Search query |
|
options |
Object |
<optional> |
Search options |
- Source:
Returns:
Exact match results
- Type
- Array
(async) searchGraph()
Search the knowledge graph
.Search the knowledge graph
- Source:
(async) searchSimilarity(query, optionsopt) → {Array}
Vector similarity search only
.Vector similarity search only
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
query |
string | Search query |
|
options |
Object |
<optional> |
Search options |
- Source:
Returns:
Vector similarity results
- Type
- Array
(async) searchTraversal(entityUris, optionsopt) → {Object}
PPR traversal search
.PPR traversal search
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
entityUris |
Array | Starting entity URIs |
|
options |
Object |
<optional> |
Traversal options |
- Source:
Returns:
PPR traversal results
- Type
- Object
seededRandom(seed) → {function}
Seeded random number generator for reproducible results
.Seeded random number generator for reproducible results
Parameters:
Name | Type | Description |
---|---|---|
seed |
number | Random seed |
Returns:
Random number generator function
- Type
- function
(async) select(params) → {Promise.<Object>}
Main selection method - selects corpuscles based on ZPT parameters
.Main selection method - selects corpuscles based on ZPT parameters
Parameters:
Name | Type | Description |
---|---|---|
params |
Object | Raw ZPT navigation parameters |
Returns:
Selection results with corpuscles and metadata
- Type
- Promise.<Object>
(async) selectByEmbedding()
Select corpuscles using embedding similarity
.Select corpuscles using embedding similarity
(async) selectByGraph()
Select corpuscles using graph structure
.Select corpuscles using graph structure
(async) selectByKeywords()
Select corpuscles using keyword matching
.Select corpuscles using keyword matching
(async) selectByTemporal()
Select corpuscles using temporal ordering
.Select corpuscles using temporal ordering
selectOptimalStrategy()
Select optimal chunking strategy based on content analysis
.Select optimal chunking strategy based on content analysis
- Source:
(async) semanticChunking()
Semantic boundary chunking strategy
.Semantic boundary chunking strategy
- Source:
sendError(res, status, message, detailopt)
Send error response
.Send error response
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
res |
Object | Express response object |
||
status |
number | HTTP status code |
||
message |
string | Error message |
||
detail |
string |
<optional> |
null | Error detail |
- Source:
sendSuccess(res, data)
Send successful response
.Send successful response
Parameters:
Name | Type | Description |
---|---|---|
res |
Object | Express response object |
data |
Object | Response data |
- Source:
setAllMetadata(metadata)
Set multiple metadata properties at once
.Set multiple metadata properties at once
Parameters:
Name | Type | Description |
---|---|---|
metadata |
Object | Object with property/value pairs |
- Source:
setCategory(category)
Set the attribute category/type (more specific than subType)
.Set the attribute category/type (more specific than subType)
Parameters:
Name | Type | Description |
---|---|---|
category |
string | Attribute category |
- Source:
setConfidence(confidence)
Set confidence score for this attribute
.Set confidence score for this attribute
Parameters:
Name | Type | Description |
---|---|---|
confidence |
number | Confidence score (0-1) |
- Source:
setContent(content)
Set content for this element
.Set content for this element
Parameters:
Name | Type | Description |
---|---|---|
content |
string | Text content |
- Source:
setCorpus(corpus)
Set corpus association for this attribute
.Set corpus association for this attribute
Parameters:
Name | Type | Description |
---|---|---|
corpus |
string | NamedNode | Corpus URI or node |
- Source:
setCorpus(corpus)
Set corpus association for this entity
.Set corpus association for this entity
Parameters:
Name | Type | Description |
---|---|---|
corpus |
string | NamedNode | Corpus URI or node |
- Source:
setCorpus(corpus)
Set corpus association for this unit
.Set corpus association for this unit
Parameters:
Name | Type | Description |
---|---|---|
corpus |
string | NamedNode | Corpus URI or node |
- Source:
setEmbedding(embedding)
Set vector embedding for this unit
.Set vector embedding for this unit
Parameters:
Name | Type | Description |
---|---|---|
embedding |
Array.<number> | Vector embedding |
- Source:
setEmbeddingHandler(embeddingHandler)
Set embedding handler for vector generation
.Set embedding handler for vector generation
Parameters:
Name | Type | Description |
---|---|---|
embeddingHandler |
Object | Embedding handler instance |
- Source:
setEmbeddingHandler(embeddingHandler)
Set embedding handler
.Set embedding handler
Parameters:
Name | Type | Description |
---|---|---|
embeddingHandler |
Object | Embedding handler instance |
- Source:
setEmbeddingHandler(embeddingHandler)
Set embedding handler
.Set embedding handler
Parameters:
Name | Type | Description |
---|---|---|
embeddingHandler |
Object | Embedding handler instance |
- Source:
setEntity(entity)
Set the entity this attribute describes
.Set the entity this attribute describes
Parameters:
Name | Type | Description |
---|---|---|
entity |
Entity | NamedNode | string | Entity reference |
- Source:
setEntryPoint(isEntryPoint)
Set whether this element is an entry point
.Set whether this element is an entry point
Parameters:
Name | Type | Description |
---|---|---|
isEntryPoint |
boolean | Entry point status |
- Source:
setFirstSeen(timestamp)
Set first seen timestamp
.Set first seen timestamp
Parameters:
Name | Type | Description |
---|---|---|
timestamp |
Date | string | First seen date |
- Source:
setFrequency(frequency)
Set frequency for this entity (usage tracking)
.Set frequency for this entity (usage tracking)
Parameters:
Name | Type | Description |
---|---|---|
frequency |
number | Frequency count |
- Source:
setLLMHandler(llmHandler)
Set LLM handler for entity extraction
.Set LLM handler for entity extraction
Parameters:
Name | Type | Description |
---|---|---|
llmHandler |
Object | LLM handler instance |
- Source:
setLLMHandler(llmHandler)
Set LLM handler
.Set LLM handler
Parameters:
Name | Type | Description |
---|---|---|
llmHandler |
Object | LLM handler instance |
- Source:
setLLMHandler(llmHandler)
Set LLM handler
.Set LLM handler
Parameters:
Name | Type | Description |
---|---|---|
llmHandler |
Object | LLM handler instance |
- Source:
setLanguage(language)
Set language for this attribute
.Set language for this attribute
Parameters:
Name | Type | Description |
---|---|---|
language |
string | Language code (e.g., 'en', 'es') |
- Source:
setLanguage(language)
Set language for this unit
.Set language for this unit
Parameters:
Name | Type | Description |
---|---|---|
language |
string | Language code (e.g., 'en', 'es') |
- Source:
setLastAccessed(timestamp)
Set last accessed timestamp
.Set last accessed timestamp
Parameters:
Name | Type | Description |
---|---|---|
timestamp |
Date | string | Last accessed date |
- Source:
setLength(length)
Set length of this unit in characters
.Set length of this unit in characters
Parameters:
Name | Type | Description |
---|---|---|
length |
number | Character length |
- Source:
setMetadataProperty(property, value)
Set a metadata property as an RDF triple
.Set a metadata property as an RDF triple
Parameters:
Name | Type | Description |
---|---|---|
property |
string | Property name |
value |
any | Property value |
- Source:
setName(name, langopt)
Set the name/label for this entity
.Set the name/label for this entity
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
name |
string | Entity name |
||
lang |
string |
<optional> |
'en' | Language tag |
- Source:
setNodeWeights(nodeIndex, weights)
Set weight vector for a specific map node
.Set weight vector for a specific map node
Parameters:
Name | Type | Description |
---|---|---|
nodeIndex |
number | Index of the map node |
weights |
Array | New weight vector |
setPPRScore(score)
Set PPR score for this element
.Set PPR score for this element
Parameters:
Name | Type | Description |
---|---|---|
score |
number | PPR score |
- Source:
setPosition(position)
Set position in source document
.Set position in source document
Parameters:
Name | Type | Description |
---|---|---|
position |
number | Character position |
- Source:
setPrefLabel(label, langopt)
Set SKOS preferred label
.Set SKOS preferred label
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
label |
string | Label text |
||
lang |
string |
<optional> |
'en' | Language tag |
- Source:
setProvenance(provenance)
Set provenance information for this attribute
.Set provenance information for this attribute
Parameters:
Name | Type | Description |
---|---|---|
provenance |
string | NamedNode | Provenance source URI or node |
- Source:
setRelationshipType(relType)
Set the relationship type (semantic classification)
.Set the relationship type (semantic classification)
Parameters:
Name | Type | Description |
---|---|---|
relType |
string | Relationship type (e.g., "causal", "temporal", "part-of") |
- Source:
setSPARQLEndpoint(sparqlEndpoint)
Set SPARQL endpoint for exact matching
.Set SPARQL endpoint for exact matching
Parameters:
Name | Type | Description |
---|---|---|
sparqlEndpoint |
string | SPARQL endpoint URL |
- Source:
setSPARQLEndpoint(sparqlEndpoint)
Set SPARQL endpoint
.Set SPARQL endpoint
Parameters:
Name | Type | Description |
---|---|---|
sparqlEndpoint |
string | SPARQL endpoint URL |
- Source:
setSPARQLEndpoint(sparqlEndpoint)
Set SPARQL endpoint
.Set SPARQL endpoint
Parameters:
Name | Type | Description |
---|---|---|
sparqlEndpoint |
string | SPARQL endpoint URL |
- Source:
setSimilarityScore(score)
Set similarity score for this element
.Set similarity score for this element
Parameters:
Name | Type | Description |
---|---|---|
score |
number | Similarity score |
- Source:
setSourceDocument(source)
Set source document for this unit
.Set source document for this unit
Parameters:
Name | Type | Description |
---|---|---|
source |
string | NamedNode | Source document URI or node |
- Source:
setSourceEntity(sourceEntity)
Set the source entity for this relationship
.Set the source entity for this relationship
Parameters:
Name | Type | Description |
---|---|---|
sourceEntity |
RDFElement | NamedNode | string | Source entity |
- Source:
setSubType(subType)
Set sub-type for this element
.Set sub-type for this element
Parameters:
Name | Type | Description |
---|---|---|
subType |
string | Sub-type identifier |
- Source:
setSummary(summary, langopt)
Set summary for this attribute (stored as SKOS definition)
.Set summary for this attribute (stored as SKOS definition)
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
summary |
string | Summary text |
||
lang |
string |
<optional> |
'en' | Language tag |
- Source:
setSummary(summary, langopt)
Set summary for this unit (stored as SKOS definition)
.Set summary for this unit (stored as SKOS definition)
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
summary |
string | Summary text |
||
lang |
string |
<optional> |
'en' | Language tag |
- Source:
setTargetEntity(targetEntity)
Set the target entity for this relationship
.Set the target entity for this relationship
Parameters:
Name | Type | Description |
---|---|---|
targetEntity |
RDFElement | NamedNode | string | Target entity |
- Source:
setTemperature(temperature)
Parameters:
Name | Type | Description |
---|---|---|
temperature |
number |
- Source:
Throws:
-
If temperature is invalid
- Type
- Error
setTemporal(timestamp)
Set temporal information for this attribute (when it was true/relevant)
.Set temporal information for this attribute (when it was true/relevant)
Parameters:
Name | Type | Description |
---|---|---|
timestamp |
Date | string | Temporal information |
- Source:
setText(text)
Set the main text content for this attribute
.Set the main text content for this attribute
Parameters:
Name | Type | Description |
---|---|---|
text |
string | Text content |
- Source:
setText(text)
Set the main text content for this unit
.Set the main text content for this unit
Parameters:
Name | Type | Description |
---|---|---|
text |
string | Text content |
- Source:
setVectorIndex(vectorIndex)
Set vector index for similarity search
.Set vector index for similarity search
Parameters:
Name | Type | Description |
---|---|---|
vectorIndex |
VectorIndex | Vector index instance |
- Source:
setVectorIndex(vectorIndex)
Set vector index
.Set vector index
Parameters:
Name | Type | Description |
---|---|---|
vectorIndex |
VectorIndex | Vector index instance |
- Source:
setWeight(weight)
Set the weight for this relationship
.Set the weight for this relationship
Parameters:
Name | Type | Description |
---|---|---|
weight |
number | Relationship weight |
- Source:
setupDebug()
Debug message display
.Debug message display
- Source:
setupErrorHandling()
Setup global error handling
.Setup global error handling
- Source:
setupFailsafeTimeout()
Setup failsafe timeout for loading indicator
.Setup failsafe timeout for loading indicator
- Source:
showLoading()
Show/hide loading indicator
.Show/hide loading indicator
- Source:
shuffleArray(array) → {Array}
Shuffle array in place
.Shuffle array in place
Parameters:
Name | Type | Description |
---|---|---|
array |
Array | Array to shuffle |
Returns:
Shuffled array
- Type
- Array
shuffleArray(array) → {Array}
Shuffle array in place using Fisher-Yates algorithm
.Shuffle array in place using Fisher-Yates algorithm
Parameters:
Name | Type | Description |
---|---|---|
array |
Array | Array to shuffle |
Returns:
Shuffled array
- Type
- Array
(async, abstract) shutdown()
Shutdown the API instance
.Shutdown the API instance
- Source:
(async) shutdown()
Shutdown search system and cleanup resources
.Shutdown search system and cleanup resources
- Source:
(async) shutdownAll()
Shutdown all registered APIs
.Shutdown all registered APIs
- Source:
simpleHash()
Simple hash function for parameter caching
.Simple hash function for parameter caching
(async) splitLargeSection()
Split large section into sub-chunks
.Split large section into sub-chunks
- Source:
(async) stopTraining()
Stop ongoing training
.Stop ongoing training
- Source:
stopTraining()
Stop training if currently running
.Stop training if currently running
(async) store(data)
Store an entity or memory item with embedding
.Store an entity or memory item with embedding
Parameters:
Name | Type | Description |
---|---|---|
data |
Object | Data to store (must have id, embedding, etc.) |
- Source:
(async) storeCommunity(community) → {Promise.<void>}
Store a ragno:Community with members and aggregation data
.Store a ragno:Community with members and aggregation data
Parameters:
Name | Type | Description |
---|---|---|
community |
Object | Community data with members and statistics |
- Source:
Returns:
- Type
- Promise.<void>
storeEmbeddingInRDF(nodeUri, embeddingData, dataset, rdfManager)
Store embedding information in RDF dataset
.Store embedding information in RDF dataset
Parameters:
Name | Type | Description |
---|---|---|
nodeUri |
string | Node URI |
embeddingData |
Object | Embedding data |
dataset |
Dataset | RDF dataset |
rdfManager |
RDFGraphManager | RDF manager |
- Source:
(async) storeEntity(entity) → {Promise.<void>}
Store a ragno:Entity with full metadata and relationships
.Store a ragno:Entity with full metadata and relationships
Parameters:
Name | Type | Description |
---|---|---|
entity |
Object | Entity data with id, label, type, embedding, etc. |
- Source:
Returns:
- Type
- Promise.<void>
(async, abstract) storeInteraction(interaction)
Store an interaction
.Store an interaction
Parameters:
Name | Type | Description |
---|---|---|
interaction |
Object | Interaction data |
- Source:
(async) storeInteraction()
Store an interaction in memory
.Store an interaction in memory
- Source:
(async) storeInteraction()
Store interaction (inherited from BaseAPI)
.Store interaction (inherited from BaseAPI)
- Source:
(async) storeInteraction()
Store interaction (inherited from BaseAPI)
.Store interaction (inherited from BaseAPI)
- Source:
(async) storeInteraction()
Store interaction (inherited from BaseAPI)
.Store interaction (inherited from BaseAPI)
- Source:
(async) storeRelationship(relationship) → {Promise.<void>}
Store a ragno:Relationship with source, target and properties
.Store a ragno:Relationship with source, target and properties
Parameters:
Name | Type | Description |
---|---|---|
relationship |
Object | Relationship data with source, target, type |
- Source:
Returns:
- Type
- Promise.<void>
(async) storeSemanticUnit(unit) → {Promise.<void>}
Store a ragno:SemanticUnit with content and relationships
.Store a ragno:SemanticUnit with content and relationships
Parameters:
Name | Type | Description |
---|---|---|
unit |
Object | Semantic unit data with content, entities, embedding |
- Source:
Returns:
- Type
- Promise.<void>
(async) streamChatResponse()
Stream a chat response with memory context
.Stream a chat response with memory context
- Source:
summarizeContext()
Create a concise summary of interactions grouped by concept
.Create a concise summary of interactions grouped by concept
- Source:
summarizeFilters()
Utility methods
.Utility methods
- Source:
summarizeFilters()
Helper methods for specific formatting tasks
.Helper methods for specific formatting tasks
- Source:
supportsTilt(zoomLevel, tiltRepresentation) → {boolean}
Determine if zoom level supports a specific tilt representation
.Determine if zoom level supports a specific tilt representation
Parameters:
Name | Type | Description |
---|---|---|
zoomLevel |
string | The zoom level |
tiltRepresentation |
string | The tilt representation |
- Source:
Returns:
Whether the combination is supported
- Type
- boolean
toNTriples() → {string}
Export dataset to N-Triples format
.Export dataset to N-Triples format
- Source:
Returns:
N-Triples serialization
- Type
- string
toNTriples() → {string}
Export this element as N-Triples
.Export this element as N-Triples
- Source:
Returns:
N-Triples representation
- Type
- string
toSimpleObject() → {Object}
Convert to simple object representation (for backward compatibility)
.Convert to simple object representation (for backward compatibility)
- Source:
Returns:
Simple object representation
- Type
- Object
toSimpleObject() → {Object}
Convert to simple object representation (for RagnoMemoryStore compatibility)
.Convert to simple object representation (for RagnoMemoryStore compatibility)
- Source:
Returns:
Simple object representation
- Type
- Object
toSimpleObject() → {Object}
Convert to simple object representation (for backwards compatibility)
.Convert to simple object representation (for backwards compatibility)
- Source:
Returns:
Simple object representation
- Type
- Object
toSimpleObject() → {Object}
Convert to simple object representation (for backward compatibility)
.Convert to simple object representation (for backward compatibility)
- Source:
Returns:
Simple object representation
- Type
- Object
toTurtle() → {string}
Export this element as Turtle (simplified)
.Export this element as Turtle (simplified)
- Source:
Returns:
Turtle representation
- Type
- string
(async) tokenAwareChunking()
Token-aware chunking strategy
.Token-aware chunking strategy
- Source:
toroidalDistance(delta, size) → {number}
Calculate toroidal distance (shortest path around torus)
.Calculate toroidal distance (shortest path around torus)
Parameters:
Name | Type | Description |
---|---|---|
delta |
number | Raw coordinate difference |
size |
number | Size of the dimension |
Returns:
Shortest toroidal distance
- Type
- number
touch()
Update last accessed timestamp to now
.Update last accessed timestamp to now
- Source:
trackActiveRequest()
Request tracking
.Request tracking
- Source:
(async) train(optionsopt) → {Promise.<Object>}
Train the VSOM on loaded data
.Train the VSOM on loaded data
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
Object |
<optional> |
Training options |
- Source:
Returns:
Training results
- Type
- Promise.<Object>
(async) train(vsomCore, topology, trainingData, callbacks) → {Object}
Execute complete training process
.Execute complete training process
Parameters:
Name | Type | Description |
---|---|---|
vsomCore |
Object | VSOM core algorithm instance |
topology |
Object | VSOM topology instance |
trainingData |
Array | Array of training vectors |
callbacks |
Object | Optional training callbacks |
Returns:
Training results
- Type
- Object
(async) trainSOM()
Train a SOM instance
.Train a SOM instance
- Source:
(async) trainingStep(vsomCore, topology, trainingData, learningRate, neighborhoodRadius, neighborhoodFunction) → {Object}
Perform single training step
.Perform single training step
Parameters:
Name | Type | Description |
---|---|---|
vsomCore |
Object | VSOM core algorithm instance |
topology |
Object | VSOM topology instance |
trainingData |
Array | Training data |
learningRate |
number | Current learning rate |
neighborhoodRadius |
number | Current neighborhood radius |
neighborhoodFunction |
function | Neighborhood function |
Returns:
Iteration results
- Type
- Object
(async) transform(projectedContent, selectionResult, transformOptions) → {Promise.<Object>}
Main transformation method - orchestrates the complete pipeline
.Main transformation method - orchestrates the complete pipeline
Parameters:
Name | Type | Description |
---|---|---|
projectedContent |
Object | Content from TiltProjector |
selectionResult |
Object | Result from CorpuscleSelector |
transformOptions |
Object | Transformation parameters |
Returns:
Complete transformation result
- Type
- Promise.<Object>
(async) traverseGraph(startNodeId, depth, options) → {Promise.<Object>}
Graph traversal query with configurable depth
.Graph traversal query with configurable depth
Parameters:
Name | Type | Default | Description |
---|---|---|---|
startNodeId |
string | Starting node URI |
|
depth |
number | 2 | Maximum traversal depth |
options |
Object | Traversal options (direction, relationTypes) |
- Source:
Returns:
Graph structure with nodes and edges
- Type
- Promise.<Object>
(async) unifiedSearch()
Main unified search that queries all available services and merges results
.Main unified search that queries all available services and merges results
- Source:
(async) unregister()
Remove and cleanup an API instance
.Remove and cleanup an API instance
- Source:
updateConfig()
Configuration methods
.Configuration methods
- Source:
updateConfig()
Update parser configuration
.Update parser configuration
- Source:
updateConfig()
Configuration methods
.Configuration methods
- Source:
updateGraph()
Override updateGraph to queue Ragno sync operations
.Override updateGraph to queue Ragno sync operations
- Source:
updateMetrics()
Metrics tracking
.Metrics tracking
- Source:
updateMetrics()
Update performance metrics
.Update performance metrics
updateMetrics()
Metrics and monitoring
.Metrics and monitoring
updateModified()
Update the modified timestamp
.Update the modified timestamp
- Source:
updateRequestStats(responseTime, type)
Update request statistics
.Update request statistics
Parameters:
Name | Type | Default | Description |
---|---|---|---|
responseTime |
number | Response time in ms |
|
type |
string | general | Request type |
- Source:
updateSearchStatistics(searchTime, exactResults, vectorResults, pprResults)
Update search statistics
.Update search statistics
Parameters:
Name | Type | Description |
---|---|---|
searchTime |
number | Time taken for search |
exactResults |
Array | Exact match results |
vectorResults |
Array | Vector similarity results |
pprResults |
Object | PPR traversal results |
- Source:
updateWeights(inputBatch, bmuIndices, learningRate, neighborhoodRadius, neighborhoodFunction)
Update weights for a batch of training samples
.Update weights for a batch of training samples
Parameters:
Name | Type | Description |
---|---|---|
inputBatch |
Array | Batch of input vectors |
bmuIndices |
Array | BMU indices for each input |
learningRate |
number | Current learning rate |
neighborhoodRadius |
number | Current neighborhood radius |
neighborhoodFunction |
function | Neighborhood weight function |
validate() → {Object}
Validate this attribute according to ragno ontology
.Validate this attribute according to ragno ontology
- Source:
Returns:
Validation result
- Type
- Object
validate() → {Object}
Validate this entity according to ragno ontology
.Validate this entity according to ragno ontology
- Source:
Returns:
Validation result
- Type
- Object
validate() → {Object}
Validate this relationship according to ragno ontology
.Validate this relationship according to ragno ontology
- Source:
Returns:
Validation result
- Type
- Object
validate() → {Object}
Validate this unit according to ragno ontology
.Validate this unit according to ragno ontology
- Source:
Returns:
Validation result
- Type
- Object
validate() → {Object}
Validate this element against ragno ontology constraints
.Validate this element against ragno ontology constraints
- Source:
Returns:
Validation result with errors array
- Type
- Object
validate(params) → {Object}
Validate complete ZPT parameter object
.Validate complete ZPT parameter object
Parameters:
Name | Type | Description |
---|---|---|
params |
Object | Navigation parameters |
Returns:
Validation result
- Type
- Object
validateCompatibility(zoomLevel, panFilters, tiltRepresentation) → {Object}
Validate zoom level compatibility with parameters
.Validate zoom level compatibility with parameters
Parameters:
Name | Type | Description |
---|---|---|
zoomLevel |
string | The zoom level |
panFilters |
Object | Pan filter parameters |
tiltRepresentation |
string | Tilt representation |
- Source:
Returns:
Validation result
- Type
- Object
validateConfig()
Validate parser configuration
.Validate parser configuration
- Source:
validateConfiguration() → {Object}
Validate topology configuration
.Validate topology configuration
Returns:
Validation result {valid: boolean, errors: Array}
- Type
- Object
validateContentType()
Request validators
.Request validators
- Source:
(async) validateCorpus() → {Promise.<Object>}
Get corpus health and statistics
.Get corpus health and statistics
- Source:
Returns:
Health check results with statistics
- Type
- Promise.<Object>
validateCriteria()
Validate selection criteria
.Validate selection criteria
(async) validateDependencies()
Validate dependencies before initialization
.Validate dependencies before initialization
- Source:
validateGeographic()
Validate geographic filter
.Validate geographic filter
(async) validateInput()
Pipeline stage implementations
.Pipeline stage implementations
validateJsonStructure(data, expectedType, options) → {boolean}
Validate that parsed JSON matches expected structure
.Validate that parsed JSON matches expected structure
Parameters:
Name | Type | Default | Description |
---|---|---|---|
data |
any | Parsed JSON data |
|
expectedType |
string | array | 'array' or 'object' |
options |
Object | Validation options |
- Source:
Returns:
- True if valid
- Type
- boolean
validateMetadata()
Validation methods
.Validation methods
- Source:
validateModel(model) → {boolean}
Parameters:
Name | Type | Description |
---|---|---|
model |
string |
- Source:
Returns:
- Type
- boolean
validateNormalized()
Validate that normalized parameters are complete
.Validate that normalized parameters are complete
validateOptions()
Validate formatting options
.Validate formatting options
- Source:
validatePan()
Validate pan parameter
.Validate pan parameter
validateQuery()
Validate that query can be executed
.Validate that query can be executed
- Source:
validateRagnoURI(uri, expectedType) → {boolean}
Validate that a URI follows ragno ontology patterns
.Validate that a URI follows ragno ontology patterns
Parameters:
Name | Type | Description |
---|---|---|
uri |
string | URI to validate |
expectedType |
string | Expected type (class, property, individual) |
- Source:
Returns:
True if valid
- Type
- boolean
(async) validateRequest()
Validate complete request structure
.Validate complete request structure
- Source:
validateSearchRequest(req) → {Object}
Validate search request
.Validate search request
Parameters:
Name | Type | Description |
---|---|---|
req |
Object | Express request object |
- Source:
Returns:
Validation result
- Type
- Object
validateTemporal()
Validate temporal filter
.Validate temporal filter
validateTilt()
Validate tilt parameter
.Validate tilt parameter
validateTransform()
Validate transform parameter
.Validate transform parameter
validateZoom()
Validate zoom parameter
.Validate zoom parameter
(async) verifyComponentsReady()
Verify all components are ready after initialization
.Verify all components are ready after initialization
- Source:
(async) withRateLimit()
Execute a function with rate limiting and exponential backoff
.Execute a function with rate limiting and exponential backoff
- Source:
Type Definitions
ChatMessage
Language model provider interface
.Language model provider interface
Type:
- Object
- Source: