1
|
<!DOCTYPE html>
|
2
|
<html>
|
3
|
<head>
|
4
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
5
|
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
|
6
|
<script src="http://services.ceon.pl/oapdemonstrators/common.js"></script>
|
7
|
<link rel="stylesheet" type="text/css" href="http://services.ceon.pl/oapdemonstrators/style.css">
|
8
|
|
9
|
</head>
|
10
|
<body>
|
11
|
<div id="container">
|
12
|
<title>Citation matching</title>
|
13
|
<div id="sidebar">
|
14
|
<h3>Citation matching details</h3>
|
15
|
|
16
|
<p>
|
17
|
<b>Usage.</b> Please provide citations separated by newlines and the service will show the referenced documents. The documents are searched for in <a href="http://www.ncbi.nlm.nih.gov/pmc/tools/openftlist/" target="_blank">PMC Open Access Subset</a> database retrieved on 01/16/2014.
|
18
|
</p>
|
19
|
|
20
|
<p>
|
21
|
The service returns a result containing the following fields for each citation:
|
22
|
|
23
|
</p><ul>
|
24
|
<li><b>citation-text</b>: raw citation text you have provided.</li>
|
25
|
<li><b>extracted-metadata</b>: metadata fields the service was able to extract from the citation string. Note that this is not always extracted perfectly; however, it does not have to be since the quality of this data is usually sufficient for the whole algorithm to work correctly.</li>
|
26
|
<li><b>matched-documents</b>: list of metadata records of documents from the database that match a given citation along with normalised confidence score (between 0.0 and 1.0).</li>
|
27
|
</ul>
|
28
|
<p></p>
|
29
|
|
30
|
<p>
|
31
|
<b>Machine-readable service.</b> The service provides a <a href="http://services.ceon.pl/citationmatching/api.html">RESTful API</a> which can be accessed by external client services.
|
32
|
</p>
|
33
|
|
34
|
<p>
|
35
|
<b>General description of the algorithm</b>. A citation text is analysed using stochastic parser to extract the metadata information. Extracted fields are compared with records in document database using fuzzy string similarity metrics. The final score used to assess documents most likely referenced by a given citation is computed using machine learning techniques (for details, see our paper <a href="http://arxiv.org/abs/1303.6906" target="_blank">arXiv:1303.6906</a>).
|
36
|
</p>
|
37
|
</div>
|
38
|
<div id="page">
|
39
|
<div id="form">
|
40
|
<textarea class="textarea yellow" id="docText" placeholder="Paste your citations here, separated by newline" onblur="this.placeholder = 'Paste your citations here, separated by newline'" onfocus="this.placeholder = ''" name="document" rows="9"></textarea>
|
41
|
<br>
|
42
|
|
43
|
|
44
|
<div class="buttons">
|
45
|
<input id="submit" class="btn" type="submit" value="Submit">
|
46
|
<div id="examples" class="examples_right">
|
47
|
<a id="example" class="btn example left-tooltip" type="button" value="Insert example 1" data-tooltip="Citation string with abbreviated journal name">Insert example 1</a>
|
48
|
<a id="example2" class="btn example left-tooltip" type="button" value="Insert example 2" data-tooltip="Three citation strings. The metadata fields extracted from each of them are partially incorrect; nevertheless, the algorithm manages to find the right document matching each citation string.">Insert example 2</a>
|
49
|
</div>
|
50
|
</div>
|
51
|
|
52
|
|
53
|
</div>
|
54
|
|
55
|
<div id="result" style="display:none">
|
56
|
<h4>Result:</h4>
|
57
|
<div id="result_menu">
|
58
|
|
59
|
<ul>
|
60
|
<li><a id="JSON" class="no_link sheet">JSON</a></li>
|
61
|
<li><a id="table" class="no_link sheet">Table</a></li>
|
62
|
</ul>
|
63
|
</div>
|
64
|
<span id="result_section">
|
65
|
<pre id="result_pre"></pre>
|
66
|
</span>
|
67
|
</div>
|
68
|
</div>
|
69
|
</div> <!-- container -->
|
70
|
<script>
|
71
|
var example_input = 'Karlson E. W., Chang S. C., Cui J., Chibnik L. B., Fraser P. A., De Vivo I., et al.: Geneenvironment interaction between HLA-DRB1 shared epitope and heavy cigarette smoking in predicting incident RA. Ann Rheum Dis, 2010; 69: 54-60.'
|
72
|
var example_input2 = 'Baker, Kemp, March, Fretwell, Hill, Gardiner: Predicting in vivo cardiovascular properties of β-blockers from cellular assays. FASEB, 2011\n\nBaker, J. G., Kemp, P., March, J., Fretwell, L., Hill, S. J., Gardiner S. M.: Predicting in vivo cardiovascular properties of β-blockers from cellular assays: a quantitative comparison of cellular and cardiovascular pharmacological responses. The FASEB Journal. 2011\n\nAssaf Shapira, Meital Gal-Tanamy, Limor Nahary, Dana Litvak-Greenfeld, Romy Zemel, Ran Tur-Kaspa, Itai Benhar: Engineered Toxins "Zymoxins" Are Activated by the HCV NS3 Protease by Removal of an Inhibitory Protein Domain, 2011, PLoS ONE15:54:24'
|
73
|
|
74
|
$("#example").click(function(){
|
75
|
addExample(example_input,$("#docText"))
|
76
|
|
77
|
})
|
78
|
|
79
|
$("#example2").click(function(){
|
80
|
addExample(example_input2,$("#docText"))
|
81
|
|
82
|
})
|
83
|
|
84
|
$("#submit").click(function(){
|
85
|
var text= $("#docText").val()
|
86
|
if(text){
|
87
|
|
88
|
var citations = text.split("\n").filter(function(v){return v!==''})
|
89
|
var citation_texts = []
|
90
|
for (var i=0;i<citations.length;i++){
|
91
|
citation_texts.push({"citation-text":citations[i]})
|
92
|
}
|
93
|
var input = new Object()
|
94
|
input.citations = citation_texts
|
95
|
var url = "http://services.ceon.pl/coansys/citation_matching.do"
|
96
|
restService("POST",url,input,$("#result_pre")).done(function(result) {
|
97
|
var response_json = JSON.parse(result)
|
98
|
var clickable_JSON = syntaxHighlight(JSON.stringify(response_json,null,4))
|
99
|
|
100
|
var table = citationMatchingTable(response_json)
|
101
|
|
102
|
$("#result_pre").html(clickable_JSON)
|
103
|
$("#JSON").addClass('active')
|
104
|
$("#table").removeClass('active')
|
105
|
addLinkToDoiNext()
|
106
|
$("#result").show()
|
107
|
|
108
|
$("#JSON").click(function(){
|
109
|
$("#result_pre").html(clickable_JSON)
|
110
|
addLinkToDoiNext()
|
111
|
$(this).addClass('active')
|
112
|
$("#table").removeClass('active')
|
113
|
|
114
|
})
|
115
|
$("#table").click(function(){
|
116
|
$("#result_pre").html(table)
|
117
|
addLinkToDoi()
|
118
|
$(this).addClass('active')
|
119
|
$("#JSON").removeClass('active')
|
120
|
})
|
121
|
|
122
|
})
|
123
|
// $(".score").each(function(){
|
124
|
// $(this).css({'width': parseInt($(this).text)*100+'%','background-color':'green'});
|
125
|
// })
|
126
|
//
|
127
|
|
128
|
}
|
129
|
|
130
|
})
|
131
|
|
132
|
function citationMatchingTable(json) {
|
133
|
|
134
|
var table='<table id="main_table" class="border">'
|
135
|
for (var i=0;i<json.results.length;i++){
|
136
|
var extracted_data = json.results[i]["extracted-metadata"]
|
137
|
table+='<tr><td class="number_td"><span class=" citation_nr grey">'+(i+1)+'</span></td>' +
|
138
|
'<td>' +
|
139
|
'<table class="row_table">' +
|
140
|
"<tr><th class='align-left section'>Entered citation:</th></tr>" +
|
141
|
"<tr><td>"+json.results[i]["citation-text"]+"</td></tr>" +
|
142
|
"<tr><th class='align-left section'>Extracted metadata:</th></tr>" +
|
143
|
'<tr><td>'
|
144
|
if (jQuery.isEmptyObject(extracted_data)){
|
145
|
table+="No extracted metadata"
|
146
|
} else {
|
147
|
table+='<table class="extracted_data_table">' +
|
148
|
'<tr><th class="ext_title">Title</th><th class="ext_author">Author</th><th class="ext_year">Year</th><th class="ext_journal">Journal</th><th class="ext_pages">Pages</th></tr>' +
|
149
|
'<tr>'
|
150
|
|
151
|
table+=(extracted_data.hasOwnProperty("title") ? '<td class="ext_title"><span>'+extracted_data["title"]+'</span></td>' : '<td class="ext_title"></td>')
|
152
|
table+=(extracted_data.hasOwnProperty("author") ? '<td class="ext_author"><span>'+extracted_data["author"]+'</span></td>' : '<td class="ext_author"></td>')
|
153
|
table+=(extracted_data.hasOwnProperty("year") ? '<td class="ext_year">'+extracted_data["year"]+'</td>' : '<td class="ext_year"></td>')
|
154
|
table+=(extracted_data.hasOwnProperty("journal") ? '<td class="ext_journal"><span>'+extracted_data["journal"]+'</span></td>' : '<td class="ext_journal"></td>')
|
155
|
table+=(extracted_data.hasOwnProperty("pages") ? '<td class="ext_pages">'+extracted_data["pages"]+'</td>' : '<td class="ext_pages"></td>')
|
156
|
table+= '</tr></table>'
|
157
|
}
|
158
|
|
159
|
table+= '</tr></td>'
|
160
|
table+="<tr><th class='align-left section'>Matched documents:</th></tr>" +
|
161
|
'<tr><td>'
|
162
|
if (json.results[i]["matched-documents"].length==0){
|
163
|
table+='<span>No matched documents</span>'
|
164
|
|
165
|
} else{
|
166
|
table+='<table class="result_table">' +
|
167
|
'<tr><th>Nr</th><th>DOI</th><th>Title</th><th>Author</th><th>Year</th><th>Journal</th><th>Pages</th><th class="doc_score">Score</th></tr>'
|
168
|
for (var j=0;j<json.results[i]["matched-documents"].length;j++){
|
169
|
matched_document = json.results[i]["matched-documents"] [j]
|
170
|
table+='<tr>'
|
171
|
table+='<td class="doc_nr">'+(j+1)+'</td>'
|
172
|
table+=((matched_document["metadata"].hasOwnProperty("doi")) ? '<td class="doc_doi doi">'+matched_document["metadata"]["doi"]+'</td>' : '<td class="doc_doi"></td>')
|
173
|
table+=((matched_document["metadata"].hasOwnProperty("title")) ? '<td class="doc_title"><span>'+matched_document["metadata"]["title"]+'</span></td>' : '<td class="doc_title"></td>')
|
174
|
table+=((matched_document["metadata"].hasOwnProperty("author")) ? '<td class="doc_author"><span>'+matched_document["metadata"]["author"]+'</span></td>' : '<td class="doc_author"></td>')
|
175
|
table+=((matched_document["metadata"].hasOwnProperty("year")) ? '<td class="doc_year">'+matched_document["metadata"]["year"]+'</td>' : '<td class="doc_year"></td>')
|
176
|
table+=((matched_document["metadata"].hasOwnProperty("journal")) ? '<td class="doc_journal"><span>'+matched_document["metadata"]["journal"]+'</span></td>' : '<td class="doc_journal"></td>')
|
177
|
table+=((matched_document["metadata"].hasOwnProperty("pages")) ? '<td class="doc_pages">'+matched_document["metadata"]["pages"]+'</td>' : '<td class="doc_pages"></td>' )
|
178
|
table+='<td class="doc_score"><div class="score">'+matched_document["score"].toFixed(2)+'</div></td>'
|
179
|
table+='</tr>'
|
180
|
|
181
|
}
|
182
|
table += '</table>'
|
183
|
}
|
184
|
|
185
|
table+="</td></tr>"
|
186
|
table+="</table></td></tr>"
|
187
|
}
|
188
|
table+='</table>'
|
189
|
return table
|
190
|
}
|
191
|
|
192
|
|
193
|
</script>
|
194
|
</body>
|
195
|
</html>
|