Skip to content

Commit

Permalink
add semantic scholar and GS to the matching procedure
Browse files Browse the repository at this point in the history
  • Loading branch information
vict0rsch committed Oct 16, 2023
1 parent bffb9f5 commit 184701e
Showing 1 changed file with 26 additions and 10 deletions.
36 changes: 26 additions & 10 deletions src/options/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ const startMatching = async (papersToMatch) => {
setHTML("matching-status-title", paper.title);
changeProgress(parseInt((idx / papersToMatch.length) * 100));

var bibtex, venue, note, code;
var bibtex, venue, note, code, match;

setHTML("matching-status-provider", "paperswithcode.org ...");
pwcMatch = await tryPWCMatch(paper);
Expand All @@ -520,19 +520,35 @@ const startMatching = async (papersToMatch) => {

if (!venue) {
setHTML("matching-status-provider", "dblp.org ...");
dblpMatch = await tryDBLP(paper);
console.log("dblpMatch: ", dblpMatch);
bibtex = dblpMatch?.bibtex;
venue = dblpMatch?.venue;
note = !paper.note && dblpMatch?.note;
match = await tryDBLP(paper);
console.log("dblpMatch: ", match);
bibtex = match?.bibtex;
venue = match?.venue;
note = !paper.note && match?.note;
}

if (!venue) {
setHTML("matching-status-provider", "crossref.org ...");
crossRefMatch = await tryCrossRef(paper);
console.log("crossRefMatch: ", crossRefMatch);
venue = dblpMatch?.venue;
note = !paper.note && dblpMatch?.note;
match = await tryCrossRef(paper);
console.log("crossRefMatch: ", match);
venue = match?.venue;
note = !paper.note && match?.note;
}

if (!venue) {
setHTML("matching-status-provider", "semanticscholar.org ...");
match = await trySemanticScholar(paper);
console.log("semanticScholarMatch: ", match);
venue = match?.venue;
note = !paper.note && match?.note;
}

if (!venue) {
setHTML("matching-status-provider", "scholar.google.com ...");
match = await tryCrossRef(paper);
console.log("googleScholarMatch: ", match);
venue = match?.venue;
note = !paper.note && match?.note;
}
if (venue || code) {
addPreprintUpdate({ bibtex, venue, note, codeLink: code, paper });
Expand Down

0 comments on commit 184701e

Please sign in to comment.