[use]
plugin = basics
plugin = analytics
plugin = spawn
#
# Step 2.1 (spécifique): Lancer un calcul sur tous les items reçus
# Step 2.1.1 (spécifique): Propose un reformatage de sortie pour usage simplifier dans lodex
[exchange]
value = get('value.topics').map((o, i) => _.zip(o.words, o.words_weights).map(x=>x.concat(i).concat(o.topic_weight))).flatten().map(y=> ({source: y[0], target: y[2], weight: y[1], origin: self.id})).filter(Boolean)
[ungroup]
# Step 2.1.2 (spécifique): On regoupe les origin par segments identiques
[replace]
path = id
value = self().omit(['uuid', 'origin'])
path = value
value = get('origin')
[aggregate]
path = value
[replace]
path = source
value = get('id.source')
path = target
value = get('id.target')
path = weight
value = get('id.weight')
path = origin
value = get('value')