You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
}
],
"flowInput": {
"text": ["In mathematics and computer science, a directed acyclic graph ",
"(DAG (About this sound listen)), is a finite directed graph with",
" no directed cycles. That is, it consists of finitely many vertices and",
"such that every edge is directed from earlier to later in the sequence.",
"DAGs can model many different kinds of information. ",
"A spreadsheet can be modeled as a DAG, with a vertex ",
"for each cell and an edge whenever the formula in one"]
},
"options": {
"batchTolerance": 100,
"progressVerbosityLevel": "debug"
},
"webhooks": {
"progress": "http://localhost:3003/webhook/progress",
"result": "http://localhost:3003/webhook/result"
}
}
The text was updated successfully, but these errors were encountered:
{
"name": "simple-eval",
"nodes": [
{
"nodeName": "split",
"algorithmName": "eval-alg",
"input": [
"#@flowInput.text"
],
"extraData":{
"code": [
"function split(input) {",
"return input[0].split(' ');",
"}"]}
},
{
"nodeName": "reduce",
"algorithmName": "eval-alg",
"input": [
"*@split"
],
"extraData":{
"code": [
"function reduce(input) {",
"return input[0].reduce((all, word) => { ",
"if (word in all) {",
"all[word]++;",
"}",
"else {",
"all[word] = 1;",
"}",
"return all;",
"}, {});",
"}"
]}
},
{
"nodeName": "count",
"algorithmName": "eval-alg",
"input": [
"@reduce"
],
"extraData":{
"code": [
"function count(input) {",
"let dict = {}",
"input[0].forEach(r => {",
"Object.entries(r).forEach(([k, v]) => {",
"if (!dict[k]) {",
"dict[k] = 0;",
"}",
"dict[k] += v",
"});",
"});",
"return dict",
"}"
]}
}
The text was updated successfully, but these errors were encountered: