RecommendationEngine

RecommendationEngine

Erstellt personalisierte Empfehlungen.

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:

    1. Schwache Assessment-Kategorien → passende Ressourcen
    2. Nächste logische Schritte (Prerequisites erfüllt)
    3. Interessen des Nutzers
    4. Starter-Empfehlungen für neue Nutzer
Source:
Parameters:
Name Type Attributes Description
options Object <optional>
Properties
Name Type Attributes Default Description
maxResults number <optional>
6

Maximale Anzahl

dismissed Array.<string> <optional>
[]

Ausgeblendete IDs

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>