Closed SouthWindShiB closed 3 years ago
The format that INCEpTION expects is the format returned by the PubAnnotation API which looks like this:
[
{
"text": "Depression and cardiovascular comorbidity\nDepression has long had a popular link to cardiovascular disease and death. However, only during the last 15 years has scientific evidence supporting this common wisdom been available. Beginning in the early 1990s, there began to accumulate community-based epidemiological evidence that medically healthy depressed patients followed for long periods of time were at increased risk of both cardiovascular disease and cardiac death. In the mid-1990s, evidence appeared to indicate that depression following a heart attack increased the risk of death. It is now apparent that depression aggravates the course of multiple cardiovascular conditions. There are two major unanswered questions. One is whether treating depression will reduce the risk of cardiovascular disease and death. Here, preliminary, but not definitive, evidence suggests that the serotonin reuptake inhibitors may be useful. The other unanswered question regards the mechanisms that underlie this link between depression and cardiovascular disease. There is strong evidence linking platelet activation, autonomic activity, and inflammatory markers to both depression and heart disease, but why these links exist is far less clear.",
"sourcedb": "PMC",
"sourceid": "3181839",
"divid": 0,
"section": "TIAB",
"source_url": "http://www.ncbi.nlm.nih.gov/pmc/3181839"
},
{
"text": "When psychiatrists use the term \u201ccomorbidity\u201d In connection with depression, they are almost always referring to other psychiatric conditions, primarily anxiety or addictive disorders, and these do co-occur with depression more often than would be expected by chance.1However, vascular disease, particularly the association between depression and heart disease, Is among the best-documented of all comorbidities.2Not only writers and poets, but our language Itself refers to, \u201cdying of a broken heart.\u201d Almost all languages, In one way or another, express a very similar Idea. However, In spite of this widespread popular acceptance, scientific evidence has been slow In emerging, and has turned out to be of a more complicated nature than expected.",
"sourcedb": "PMC",
"sourceid": "3181839",
"divid": 1,
"section": "INTRODUCTION",
"source_url": "http://www.ncbi.nlm.nih.gov/pmc/3181839"
},
....
]
The file is expected to consist of multiple sections which the reader then will concatenate into a single document.
Note that denotations are presently not imported.
Assuming the that issue was resolved as there was no more feedback and thus closing the issue.
Describe the bug
MismatchedInputException: Cannot deserialize value of type
java.util.ArrayList<de.tudarmstadt.ukp.inception.externalsearch.pubannotation.model.PubAnnotationDocumentSection>
from Object value (tokenJsonToken.START_OBJECT
) at [Source: (BufferedInputStream); line: 1, column: 1]To Reproduce Steps to reproduce the behavior:
Screenshots If applicable, add screenshots to help explain your problem.
Please complete the following information:
The json file is: { "text": "IRF-4 expression in CML may be induced by IFN-α therapy", "denotations": [ {"id": "T1", "span": {"begin": 0, "end": 5}, "obj": "Protein"}, {"id": "T2", "span": {"begin": 42, "end": 47}, "obj": "Protein"} ] }