Public
Edited
Jan 21, 2023
Insert cell
Insert cell
text = "Summarization based on text extraction is inherently limited, but generation-style abstractive methods have proven challenging to build. In this work, we propose a fully data-driven approach to abstractive sentence summarization. Our method utilizes a local attention-based model that generates each word of the summary conditioned on the input sentence."
Insert cell
concordance = {
let concordance = {};
let probs = {};
text.split("").map((i) => {
concordance?.[i] ? concordance[i]++ : (concordance[i] = 1);
});
probs = { ...concordance };
for (let i in probs) {
probs[i] = probs[i] / text.length;
}
return [concordance, Object.entries(probs).sort((a, b) => a[1] - b[1])];
}
Insert cell
[0, 0, 0, 0, 0].map((i) =>
String.fromCharCode(Math.trunc(i + Math.random() * 26 + 65))
)
Insert cell
"z".charCodeAt(0)
Insert cell
"hello".split("-").join(" ")
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more