Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions getcomputo-pub.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ type RepoError =

let redirectStringRe = Regex(@"URL='(.*)'")

let getAbstract (page: string) =
let getBibTeX (page: string) =

let htmlFirst = HtmlDocument.Load(page)

Expand All @@ -100,16 +100,29 @@ let getAbstract (page: string) =
try
html.CssSelect(".bibtex").Head.InnerText()
|> DirtyParser.bibTeXFromString
|> _.Head.Properties["abstract"]
|> _.Head
|> Result.Ok
with e ->
printfn "Error getting abstract from %s: %s" page e.Message
printfn "Error getting BibTeX from %s: %s" page e.Message
Result.Error e.Message

let getAbstract (entry: BibTeXEntry) = entry.Properties["abstract"]

let getBibTeXFromDict (d: Dictionary<obj, obj>) =
d["repoObj"] :?> Repository
|> _.Homepage
|> getBibTeX
|> function
| Ok a -> DrBiber.DirtyParser.bibTeXToString [ a ]
| Error e ->
printfn "Error getting BibTeX from %s: %s" (d["repoObj"] :?> Repository).Name e
""

let getAbstractFromDict (d: Dictionary<obj, obj>) =
d["repoObj"] :?> Repository
|> _.Homepage
|> getAbstract
|> getBibTeX
|> Result.map (fun bibTeX -> getAbstract bibTeX)
|> function
| Ok a -> a
| Error e ->
Expand Down Expand Up @@ -159,6 +172,7 @@ let extractCitation (d: Dictionary<obj, obj>) =
description = d |> getSomeString "description"
abstract' = d |> getAbstractFromDict
repo = d |> getSomeString "repo"
bibtex = d |> getBibTeXFromDict
pdf = d |> getAnotherThing "citation" |> getSomeString "pdf-url"
url = d |> getAnotherThing "citation" |> getSomeString "url"
draft = d |> getSomeString "draft" |}
Expand Down
70 changes: 68 additions & 2 deletions site/mock-papers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,39 @@
t-SNE are significantly better than those produced by other
techniques on almost all of the data sets.
authors: Laurens van der Maaten and Geoffrey Hinton
bibtex: >+
@article{van_der_maaten2008,
author = {van der Maaten, Laurens and Hinton, Geoffrey},
publisher = {Société Française de Statistique},
title = {Visualizing {Data} Using {t-SNE:} A Practical Computo Example
(Mock)},
journal = {Computo},
date = {2008-08-11},
url = {https://computo.sfds.asso.fr/published-paper-tsne},
issn = {2824-7795},
langid = {en},
abstract = {We present a new technique called “t-SNE” that visualizes
high-dimensional data by giving each datapoint a location in a two
or three-dimensional map. The technique is a variation of Stochastic
Neighbor Embedding {[}@hinton:stochastic{]} that is much easier to
optimize, and produces significantly better visualizations by
reducing the tendency to crowd points together in the center of the
map. t-SNE is better than existing techniques at creating a single
map that reveals structure at many different scales. This is
particularly important for high-dimensional data that lie on several
different, but related, low-dimensional manifolds, such as images of
objects from multiple classes seen from multiple viewpoints. For
visualizing the structure of very large data sets, we show how t-SNE
can use random walks on neighborhood graphs to allow the implicit
structure of all the data to influence the way in which a subset of
the data is displayed. We illustrate the performance of t-SNE on a
wide variety of data sets and compare it with many other
non-parametric visualization techniques, including Sammon mapping,
Isomap, and Locally Linear Embedding. The visualization produced by
t-SNE are significantly better than those produced by other
techniques on almost all of the data sets.}
}

date: 2008-08-11
description: >
This page is a reworking of the original t-SNE article using the Computo template. It aims to help authors submitting to the journal by using some advanced formatting features. We warmly thank the authors of t-SNE and the editor of JMLR for allowing us to use their work to illustrate the Computo spirit.
Expand All @@ -29,7 +62,7 @@
pdf: ''
repo: published-paper-tsne
title: Visualizing Data using t-SNE (mock contributon)
url: https://computo.sfds.asso.fr/published-paper-tsne
url: https://computo-journal.org/published-paper-tsne
year: 2008
- abstract': >-
We present a new technique called “t-SNE” that visualizes
Expand All @@ -53,6 +86,39 @@
t-SNE are significantly better than those produced by other
techniques on almost all of the data sets.
authors: Laurens van der Maaten and Geoffrey Hinton
bibtex: >+
@article{van_der_maaten2008,
author = {van der Maaten, Laurens and Hinton, Geoffrey},
publisher = {French Statistical Society},
title = {Visualizing {Data} Using {t-SNE:} A Practical {Computo}
Example (Mock)},
journal = {Computo},
date = {2008-08-11},
url = {https://computo-journal.org/published-paper-tsne-R},
issn = {2824-7795},
langid = {en},
abstract = {We present a new technique called “t-SNE” that visualizes
high-dimensional data by giving each datapoint a location in a two
or three-dimensional map. The technique is a variation of Stochastic
Neighbor Embeddi{[}@hinton:stochastic{]} that is much easier to
optimize, and produces significantly better visualizations by
reducing the tendency to crowd points together in the center of the
map. t-SNE is better than existing techniques at creating a single
map that reveals structure at many different scales. This is
particularly important for high-dimensional data that lie on several
different, but related, low-dimensional manifolds, such as images of
objects from multiple classes seen from multiple viewpoints. For
visualizing the structure of very large data sets, we show how t-SNE
can use random walks on neighborhood graphs to allow the implicit
structure of all the data to influence the way in which a subset of
the data is displayed. We illustrate the performance of t-SNE on a
wide variety of data sets and compare it with many other
non-parametric visualization techniques, including Sammon mapping,
Isomap, and Locally Linear Embedding. The visualization produced by
t-SNE are significantly better than those produced by other
techniques on almost all of the data sets.}
}

date: 2008-08-11
description: >
This page is a reworking of the original t-SNE article using the Computo template. It aims to help authors submitting to the journal by using some advanced formatting features. We warmly thank the authors of t-SNE and the editor of JMLR for allowing us to use their work to illustrate the Computo spirit.
Expand All @@ -62,5 +128,5 @@
pdf: ''
repo: published-paper-tsne-R
title: Visualizing Data using t-SNE (mock contributon)
url: https://computo.sfds.asso.fr/published-paper-tsne-R
url: https://computo-journal.org/published-paper-tsne-R
year: 2008
17 changes: 3 additions & 14 deletions site/publications.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ for (const item of items) {
let doiurl = item.url === "" ? "https://doi.org/" + item.doi : item.url;
let bibtitle = item.title.replace(/'/g, "\\'");
let bibauthors = item.authors.replace(/'/g, "\\'");
let bibtex = item.bibtex.replace(/'/g, "\\'").replace(/\"/g, '&quot;').replace(/\r?\n/g, "\\n");
if (item.year !== currentYear) {
if (currentYear !== null) { %>
</div> <!-- End previous year section -->
Expand Down Expand Up @@ -52,7 +53,7 @@ for (const item of items) {
<a href="<%= item.pdf %>" class="btn btn-outline-secondary btn-sm" target="_blank" style="padding:0.2em 0.6em;">PDF</a>
<% } %> -->
<a href="https://github.com/computorg/<%- item.repo %>" class="btn btn-outline-secondary btn-sm" target="_blank" style="padding:0.2em 0.6em;">Sources (Git)</a>
<button type="button" class="btn btn-outline-secondary btn-sm" onclick="generateBibTex('<%- bibtitle %>', '<%- bibauthors %>', '<%= item.year %>', '<%= doiurl %>')" style="padding:0.2em 0.6em;"><span style="font-variant: small-caps; font-family: 'Times New Roman', Times, serif;">Bib<span style="vertical-align: -0.2em;">T</span><span style="vertical-align: 0em;">E</span>X</span></button>
<button type="button" class="btn btn-outline-secondary btn-sm" onclick="generateBibTex('<%= bibtex %>')" style="padding:0.2em 0.6em;"><span style="font-variant: small-caps; font-family: 'Times New Roman', Times, serif;">Bib<span style="vertical-align: -0.2em;">T</span><span style="vertical-align: 0em;">E</span>X</span></button>
</div>
</div>
</div>
Expand Down Expand Up @@ -124,19 +125,7 @@ for (const item of items) {
$('#abstractContent').text(abstract);
});

function generateBibTex(title, authors, year, url) {
// Generate a simple BibTeX key from the first author's last name and year
var firstAuthor = authors.split(' and ')[0].split(' ').pop().toLowerCase();
var bibKey = firstAuthor + year;

var bibTeX = '@article{' + bibKey + ',\n' +
' title={' + title + '},\n' +
' author={' + authors + '},\n' +
' journal={Computo},\n' +
' year={' + year + '},\n' +
' url={' + url + '}\n' +
'}';

function generateBibTex(bibTeX) {
// Create a temporary textarea to copy the BibTeX to clipboard
var textArea = document.createElement('textarea');
textArea.value = bibTeX;
Expand Down
Loading