zotero / translation-server

A Node.js-based server to run Zotero translators
Other
122 stars 51 forks source link

Redirect / Translator selection problem (DOI Resolver?) #48

Closed mtrojan-ub closed 5 years ago

mtrojan-ub commented 5 years ago

Only happens for some websites, e.g.: https://www.cambridge.org/core/journals/journal-of-law-and-religion/article/new-genealogy-of-religious-freedom/A76E3285DBD0EEF59A0EB82D4F4068E7

In Zotero you see the following tags (using Translator "Cambridge Core"): grafik

Translation Server's returned JSON contains only an empty tags array.

mtrojan-ub commented 5 years ago

hmm, tested it via curl, might have to do something with our environment...

mtrojan-ub commented 5 years ago

After a bit more testing, i found out that the reason might be similar to #49, except there is a different kind of redirect and testing is not restricted to ourselves.

The problem occurs if you try to harvest the DOI URL instead of the URL mentioned above: https://dx.doi.org/10.1017/jlr.2018.11?urlappend=%3Fsource=rss

Then you get this result: [{"key":"4KR54S7G","version":0,"itemType":"journalArticle","creators":[{"firstName":"David","lastName":"Decosimo","creatorType":"author"}],"tags":[],"title":"THE NEW GENEALOGY OF RELIGIOUS FREEDOM","publicationTitle":"Journal of Law and Religion","pages":"3-41","volume":"33","abstractNote":"This article pursues an immanent critique of a scholarly movement and mood that I call “the new genealogy of religious freedom” and sketches an alternative proposal. The new genealogy of religious freedom claims that religious freedom is incoherent, systemically biased, oppressive, ideological—and necessarily so. Its critique deploys a methodology inherited from Nietzsche and targets a vision of religious freedom associated with “foundationalists” like Kant and Rawls. This article calls both the methodology and the vision into question. The version of genealogy that this movement promotes proves self-destructive and incoherent, veering toward nihilism and unable to account for its own status as\n \n . Its attack on foundationalist religious freedom is effective, but it presupposes—and targets—conceptions of freedom, neutrality, and power that we need not endorse. For foundationalists and genealogists alike, these assumptions define religious freedom. This article rejects those assumptions and that vision of religious freedom. It sketches a pragmatist, dialectical vision of religious freedom rooted in alternate conceptions of power, freedom, and neutrality and a corresponding strategy for legally defining “religion,” inheriting the strengths of genealogy and foundationalism while avoiding their weaknesses.","url":"https://www.cambridge.org/core/product/identifier/S0748081418000115/type/journal_article","DOI":"10.1017/jlr.2018.11","date":"April 2, 2018","libraryCatalog":"DataCite","accessDate":"2018-11-09T08:25:47Z"}]

If you directly use the cambridge.org URL instead: https://www.cambridge.org/core/journals/journal-of-law-and-religion/article/new-genealogy-of-religious-freedom/A76E3285DBD0EEF59A0EB82D4F4068E7

You get the following result: [{"key":"PQ64JCMH","version":0,"itemType":"journalArticle","creators":[{"firstName":"David","lastName":"Decosimo","creatorType":"author"}],"tags":[{"tag":"religious freedom","type":1},{"tag":"genealogy","type":1},{"tag":"power","type":1},{"tag":"essentialism","type":1},{"tag":"defining religion","type":1},{"tag":"pragmatist","type":1}],"title":"THE NEW GENEALOGY OF RELIGIOUS FREEDOM","DOI":"10.1017/jlr.2018.11","url":"https://www.cambridge.org/core/journals/journal-of-law-and-religion/article/new-genealogy-of-religious-freedom/A76E3285DBD0EEF59A0EB82D4F4068E7","abstractNote":"This article pursues an immanent critique of a scholarly movement and mood that I call “the new genealogy of religious freedom” and sketches an alternative proposal. The new genealogy of religious freedom claims that religious freedom is incoherent, systemically biased, oppressive, ideological—and necessarily so. Its critique deploys a methodology inherited from Nietzsche and targets a vision of religious freedom associated with “foundationalists” like Kant and Rawls. This article calls both the methodology and the vision into question. The version of genealogy that this movement promotes proves self-destructive and incoherent, veering toward nihilism and unable to account for its own status as critique. Its attack on foundationalist religious freedom is effective, but it presupposes—and targets—conceptions of freedom, neutrality, and power that we need not endorse. For foundationalists and genealogists alike, these assumptions define religious freedom. This article rejects those assumptions and that vision of religious freedom. It sketches a pragmatist, dialectical vision of religious freedom rooted in alternate conceptions of power, freedom, and neutrality and a corresponding strategy for legally defining “religion,” inheriting the strengths of genealogy and foundationalism while avoiding their weaknesses.","date":"2018/04","publicationTitle":"Journal of Law and Religion","volume":"33","issue":"1","pages":"3-41","ISSN":"0748-0814, 2163-3088","language":"en","libraryCatalog":"Cambridge Core","accessDate":"2018-11-09T08:29:12Z"}]

Here you can see that the correct translator is chosen in the second case, and that e.g. tags have been parsed correctly.

adomasven commented 5 years ago

This is not related to #49, but rather to how translation server handles DOI URLs by looking them up in various metadata databases instead of fetching and translating the DOI resource directly. This is done since most of the time it produces more accurate metadata.

dstillman commented 5 years ago

We’re going to be fixing this, though — web translation should try the actual URL before it falls back to a DOI in the URL.