Constructor
new RecommendationEngine(registry, profile)
- Source:
Example
import { RecommendationEngine } from './js/core/recommendation-engine.js';
const engine = await RecommendationEngine.create('../../');
const recs = engine.getRecommendations();
// → [{ resource, type, reason, priority }, ...]
Parameters:
| Name | Type | Description |
|---|---|---|
registry |
ContentRegistry | |
profile |
UserProfile |
Members
_profile :UserProfile
- Source:
Type:
_registry :ContentRegistry
- Source:
Type:
Methods
getGroupedRecommendations() → {Array.<{title: string, type: string, items: Array.<Object>}>}
- Description:
Gibt Empfehlungen als gruppierte Sektionen zurück (für UI-Rendering).
- Source:
Returns:
- Type
- Array.<{title: string, type: string, items: Array.<Object>}>
getNextRecommendation() → {Object|null}
- Description:
Gibt den empfohlenen nächsten Inhalt zurück (Top-1).
- Source:
Returns:
- Type
- Object | null
getRecommendations(optionsopt) → {Array.<{resource: Object, type: string, reason: string, priority: number}>}
- Description:
Gibt priorisierte Empfehlungen zurück.
Strategie:
- Schwache Assessment-Kategorien → passende Ressourcen
- Nächste logische Schritte (Prerequisites erfüllt)
- Interessen des Nutzers
- Starter-Empfehlungen für neue Nutzer
- Source:
Parameters:
| Name | Type | Attributes | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
<optional> |
Properties
|
Returns:
- Type
- Array.<{resource: Object, type: string, reason: string, priority: number}>
(async, static) create(basePathopt) → {Promise.<RecommendationEngine>}
- Description:
Erstellt eine Engine-Instanz (async Factory).
- Source:
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
basePath |
string |
<optional> |
''
|
Basis-Pfad für ContentRegistry-Fetch |
Returns:
- Type
- Promise.<RecommendationEngine>