@explorable-viz/fluid 0.8.1 → 0.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -3
- package/dist/fluid/shared/fluid.mjs +77 -117
- package/dist/fluid/shared/load-figure.js +270 -223
- package/dist/fluid/shared/webtest-lib.js +1 -4
- package/package.json +2 -3
- package/website/article/fluid/1805.02474v1-10.fld +0 -33
- package/website/article/fluid/scigen.fld +0 -50
- package/website/article/transparent-text/index.html +0 -44
- package/website/article/transparent-text/spec.json +0 -8
@@ -265326,7 +265326,6 @@ __export(Test_Util_exports, {
|
|
265326
265326
|
textContentValue: () => textContentValue,
|
265327
265327
|
timeout: () => timeout2,
|
265328
265328
|
waitFor: () => waitFor,
|
265329
|
-
waitForFigure: () => waitForFigure,
|
265330
265329
|
waitForHidden: () => waitForHidden
|
265331
265330
|
});
|
265332
265331
|
module.exports = __toCommonJS(Test_Util_exports);
|
@@ -278702,7 +278701,6 @@ var waitFor = (selector2) => (page2) => {
|
|
278702
278701
|
visible: true
|
278703
278702
|
})(page2)))(() => _bind(_liftEffect(log2("-> found")))(() => report(true)("exists"))))((e) => report(false)(showErrorImpl(e))));
|
278704
278703
|
};
|
278705
|
-
var waitForFigure = (page2) => (selector2) => waitFor("svg" + selector2)(page2);
|
278706
278704
|
var waitForHidden = (selector2) => (page2) => _bind(_liftEffect(log2("Waiting for " + selector2)))(() => _bind(_map((v) => {
|
278707
278705
|
})(runPromiseAffE3(_pageWaitForSelector)(selector2)({
|
278708
278706
|
timeout: 24e4,
|
@@ -278725,7 +278723,7 @@ var checkAttributeContains = (page2) => (sel) => (attr) => (expected) => _bind(g
|
|
278725
278723
|
const success = contains(expected)(found);
|
278726
278724
|
return testCondition2(sel)(success)(attr + " contains " + showStringImpl(expected) + (success ? "" : " (got " + found + ")"));
|
278727
278725
|
});
|
278728
|
-
var checkAttribute = (page2) => (sel) => (attr) => (expected) => _bind(getAttributeValue(page2)(sel)(attr))((found) => testCondition2(sel)(found === expected)(attr + " == " + showStringImpl(expected) + (found === expected ? "" :
|
278726
|
+
var checkAttribute = (page2) => (sel) => (attr) => (expected) => _bind(getAttributeValue(page2)(sel)(attr))((found) => testCondition2(sel)(found === expected)(attr + " == " + showStringImpl(expected) + (found === expected ? "" : ' (got "' + found + '")')));
|
278729
278727
|
var browserTests = (suffix) => (browserName) => (launchBrowser) => (tests) => _bind(_liftEffect(log2("browserTests: " + browserName)))(() => _bind(launchBrowser)((browser) => _bind(_bind(_liftEffect(_newPage(browser)))(toAff$p(coerce)))((page2) => {
|
278730
278728
|
const url = "http://127.0.0.1:8080/" + suffix;
|
278731
278729
|
return _bind(for_2(tests)((test2) => _bind($$goto(url)(page2))(() => test2(page2))))(() => _bind(_liftEffect(_close(browser)))(toAff$p(coerce)));
|
@@ -278758,7 +278756,6 @@ var testURL = (suffix) => (tests) => {
|
|
278758
278756
|
textContentValue,
|
278759
278757
|
timeout,
|
278760
278758
|
waitFor,
|
278761
|
-
waitForFigure,
|
278762
278759
|
waitForHidden
|
278763
278760
|
});
|
278764
278761
|
/* istanbul ignore if -- @preserve */
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@explorable-viz/fluid",
|
3
|
-
"version": "0.8.
|
4
|
-
"description": "
|
3
|
+
"version": "0.8.3",
|
4
|
+
"description": "A functional programming language which integrates a bidirectional dynamic analysis, connecting outputs to data sources in a fine-grained way. Fluid is implemented in PureScript and runs in the browser.",
|
5
5
|
"main": "index.js",
|
6
6
|
"repository": {
|
7
7
|
"type": "git",
|
@@ -46,7 +46,6 @@
|
|
46
46
|
"test": "./script/test.sh",
|
47
47
|
"test-all": "./script/test-all.sh",
|
48
48
|
"test-browser": "./script/test.sh --browsers=Chrome --singleRun=false",
|
49
|
-
"test-page": "./script/test-page.sh",
|
50
49
|
"test-website": "./script/test-website.sh",
|
51
50
|
"test-website-all": "./script/test-website-all.sh",
|
52
51
|
"tidy": "./script/tidy.sh"
|
@@ -1,33 +0,0 @@
|
|
1
|
-
Paragraph [
|
2
|
-
Text "As shown in Table 3, BiLSTM gives significantly ",
|
3
|
-
Text (trendWord (findWithKey' "model" "BiLSTM" tableData).acc (findWithKey' "model" "LSTM" tableData).acc betterWorse),
|
4
|
-
Text " accuracies compared to uni-directional LSTM2, with the training time per epoch ",
|
5
|
-
Text (trendWord (findWithKey' "model" "BiLSTM" tableData).time_s (findWithKey' "model" "LSTM" tableData).time_s growShrink),
|
6
|
-
Text " from ",
|
7
|
-
Text (numToStr (findWithKey' "model" "LSTM" tableData).time_s),
|
8
|
-
Text " seconds to ",
|
9
|
-
Text (numToStr (findWithKey' "model" "BiLSTM" tableData).time_s),
|
10
|
-
Text " seconds. Stacking 2 layers of BiLSTM gives further improvements to development results, with a ",
|
11
|
-
Text (trendWord (findWithKey' "model" "2 stacked BiLSTM" tableData).time_s (findWithKey' "model" "BiLSTM" tableData).time_s smallerHigher),
|
12
|
-
Text " time of ",
|
13
|
-
Text (numToStr (findWithKey' "model" "2 stacked BiLSTM" tableData).time_s),
|
14
|
-
Text " seconds. 3 layers of stacked BiLSTM does not further improve the results. In contrast, S-LSTM gives a development result of ",
|
15
|
-
Text (numToStr (findWithKey' "model" "S-LSTM" tableData).acc),
|
16
|
-
Text "%, which is significantly better compared to 2-layer stacked BiLSTM, with a ",
|
17
|
-
Text (trendWord (findWithKey' "model" "S-LSTM" tableData).param (findWithKey' "model" "2 stacked BiLSTM" tableData).param smallerHigher),
|
18
|
-
Text " number of model parameters and a ",
|
19
|
-
Text (trendWord (findWithKey' "model" "S-LSTM" tableData).time_s (findWithKey' "model" "2 stacked BiLSTM" tableData).time_s shorterLonger),
|
20
|
-
Text " time of ",
|
21
|
-
Text (numToStr (findWithKey' "model" "S-LSTM" tableData).time_s),
|
22
|
-
Text " seconds. We additionally make comparisons with stacked CNNs and hierarchical attention (Vaswani et al., 2017), shown in Table 3 (the CNN and Transformer rows), ",
|
23
|
-
Text ((findWithKey' "time_s" (minimum (map (fun y -> y.time_s) tableData)) tableData).model),
|
24
|
-
Text " is the most efficient among all models compared, with the ",
|
25
|
-
Text (let pos = findIndex "model" "CNN" (insertionSort cmpParam tableData) in rankLabel "smallest" pos),
|
26
|
-
Text " model size. On the other hand, a 3-layer stacked CNN gives an accuracy of ",
|
27
|
-
Text (numToStr (fromSome (findWithKey "model" "3 stacked CNN" tableData)).acc),
|
28
|
-
Text "%, which is also the ",
|
29
|
-
Text (let pos = findIndex "model" "CNN" (insertionSort cmpTime tableData) in rankLabel "lowest" pos),
|
30
|
-
Text " compared with BiLSTM, hierarchical attention and S-LSTM. The best performance of hierarchical attention is between single-layer and two-layer BiLSTMs in terms of both accuracy and efficiency. S-LSTM gives significantly better accuracies compared with both CNN and hierarchical attention. Table 3 additionally shows the results of BiLSTM and S-LSTM when external attention is used Attention leads to improved accuracies for both BiLSTM and S-LSTM in classification, with S-LSTM still ",
|
31
|
-
Text (trendWord (findWithKey' "model" "S-LSTM" tableData).acc (findWithKey' "model" "BiLSTM" tableData).acc underOverPerforming),
|
32
|
-
Text " BiLSTM significantly."
|
33
|
-
]
|
@@ -1,50 +0,0 @@
|
|
1
|
-
let ordinalMap = [
|
2
|
-
{ lastDigit: 1, suffix: "st" },
|
3
|
-
{ lastDigit: 2, suffix: "nd" },
|
4
|
-
{ lastDigit: 3, suffix: "rd" }
|
5
|
-
];
|
6
|
-
|
7
|
-
let ordinal n =
|
8
|
-
if n <= 0 then error "n <= 0 not supported"
|
9
|
-
else if (n < 4) then
|
10
|
-
(findWithKey' "lastDigit" n ordinalMap).suffix
|
11
|
-
else if (n >= 4) `and` (n <= 20) then "th"
|
12
|
-
else error "n > 20 not supported";
|
13
|
-
|
14
|
-
let rankLabel word n =
|
15
|
-
if n == 1 then word
|
16
|
-
else ordinal n ++ "-" ++ word;
|
17
|
-
|
18
|
-
let trendWord n1 n2 compareWord =
|
19
|
-
compareWord (compare n1 n2);
|
20
|
-
|
21
|
-
let growShrink EQ = "unchanging";
|
22
|
-
growShrink LT = "shrinking";
|
23
|
-
growShrink GT = "growing";
|
24
|
-
|
25
|
-
let smallerHigher EQ = "equal";
|
26
|
-
smallerHigher LT = "smaller";
|
27
|
-
smallerHigher GT = "larger";
|
28
|
-
|
29
|
-
let shorterLonger EQ = "equal";
|
30
|
-
shorterLonger LT = "shorter";
|
31
|
-
shorterLonger GT = "longer";
|
32
|
-
|
33
|
-
let betterWorse EQ = "equal";
|
34
|
-
betterWorse LT = "worse";
|
35
|
-
betterWorse GT = "better";
|
36
|
-
|
37
|
-
let underOverPerforming EQ = "equal performance to that of";
|
38
|
-
underOverPerforming LT = "underperforming";
|
39
|
-
underOverPerforming GT = "outperforming";
|
40
|
-
|
41
|
-
-- (a -> Number) -> List a -> a
|
42
|
-
let maximumBy f lst =
|
43
|
-
let helper [] current = current;
|
44
|
-
helper (x: xs) current =
|
45
|
-
if f x > f current then helper xs x else helper xs current
|
46
|
-
in match lst as {
|
47
|
-
[] -> error "Empty list!";
|
48
|
-
(x: xs) -> helper xs x
|
49
|
-
};
|
50
|
-
|
@@ -1,44 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html lang="en">
|
3
|
-
<head>
|
4
|
-
<link rel="icon" href="/favicon.ico" type="image/x-icon">
|
5
|
-
<meta charset="UTF-8">
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
7
|
-
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
8
|
-
<title>Fluid: scigen-multiple-replace</title>
|
9
|
-
<link href="../css/styles.css" rel="stylesheet" type="text/css">
|
10
|
-
<link href="../css/view-styles.css" rel="stylesheet" type="text/css">
|
11
|
-
<script src="https://kit.fontawesome.com/20cf8b42c0.js" crossorigin="anonymous"></script>
|
12
|
-
<script src="../shared/util.js"></script>
|
13
|
-
<style>
|
14
|
-
.data-pane {
|
15
|
-
max-width: 400px;
|
16
|
-
}
|
17
|
-
</style>
|
18
|
-
</head>
|
19
|
-
<body>
|
20
|
-
<div id="grid" class="grid-container data-pane-hidden">
|
21
|
-
<div></div>
|
22
|
-
<div></div>
|
23
|
-
<div class="flex-left-align">
|
24
|
-
<h3>1805.02474v1-10</h3>
|
25
|
-
<p>---</p>
|
26
|
-
</div>
|
27
|
-
|
28
|
-
<div class="flex-right-align data-pane">
|
29
|
-
<div id="fig-input"></div>
|
30
|
-
</div>
|
31
|
-
<div onclick="toggleDataPane('grid')">
|
32
|
-
<i class="data-pane-button toggle-button fa-solid fa-eye-slash"></i>
|
33
|
-
</div>
|
34
|
-
<div id="fig">
|
35
|
-
<div class="fig-loading">loading figure(s)</div>
|
36
|
-
</div>
|
37
|
-
</div>
|
38
|
-
|
39
|
-
<script type="module">
|
40
|
-
import { loadFigure } from "../shared/load-figure.js";
|
41
|
-
loadFigure("spec.json")("../fluid/1805.02474v1-10.fld")();
|
42
|
-
</script>
|
43
|
-
</body>
|
44
|
-
</html>
|