vitorfs / parsifal

Parsifal is a tool to assist researchers to perform Systematic Literature Reviews
https://parsif.al
MIT License
416 stars 171 forks source link

Science Direct bibtex import #34

Closed helenocampos closed 3 years ago

helenocampos commented 9 years ago

Hi! I just found something that might be a bug. Even when the bibtex generated by Science Direct contains the abstract field, parsifal is not importing it.

vitorfs commented 9 years ago

Their bibtex file is kinda problematic at the moment... they put several "keywords" on the same file for example

...
author = "Henrik Bærbak Christensen and Klaus Marius Hansen and Morten Kyng and Konstantinos Manikas",
keywords = "Software ecosystem architecture",
keywords = "Third-party sponsored software ecosystems",
keywords = "Telemedicine software ecosystems ",

And they don't use curly brackets to represent the values like this:

author = {Henrik Bærbak Christensen and Klaus Marius Hansen and Morten Kyng and Konstantinos Manikas},

So for some reasons the parser we use don't parse their bibtex properly.

Anyway, I am trying to figure out a way to solve this problem, but unfortunately theres no straight solution as we use a third party bibtex parser to read the files and import to the tool.

helenocampos commented 9 years ago

A preprocess to the bibtex file to append curly braces in abstract should work as a temporary solution. Since I dont really know python, I wrote a piece of code in Java to meet my needs.

For every line of the bibtex file:

if(row.contains("abstract = \"")){
                row = row.replace("abstract = \"", "abstract = {");
                row = row.concat("}");
}