Skip to content

Commit 8dc8c0b

Browse files
committed
updated paper for reintroducing bib_match
1 parent e3a3f4a commit 8dc8c0b

1 file changed

Lines changed: 89 additions & 73 deletions

File tree

paper.json

Lines changed: 89 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"type": "object",
77
"properties": {
88
"paper_id": {
9-
"description": "A unique ID for each paper (user-supplied > DOI > file_name)",
9+
"description": "A unique ID for each paper (user-supplied > file_name)",
1010
"type": ["string", "null"]
1111
},
1212
"info": {
@@ -19,7 +19,7 @@
1919
},
2020
"text": {
2121
"type": "array",
22-
"items": { "$ref": "#/$defs/sentence" },
22+
"items": { "$ref": "#/$defs/text" },
2323
"uniqueItems": true
2424
},
2525
"section": {
@@ -30,12 +30,12 @@
3030
"url": {
3131
"description": "Hyperlinks found in the paper text",
3232
"type": "array",
33-
"items": { "$ref": "#/$defs/link" },
33+
"items": { "$ref": "#/$defs/url" },
3434
"uniqueItems": true
3535
},
3636
"bib": {
3737
"type": "array",
38-
"items": { "$ref": "#/$defs/bib_entry" },
38+
"items": { "$ref": "#/$defs/BIB" },
3939
"uniqueItems": true
4040
},
4141
"xref": {
@@ -55,7 +55,12 @@
5555
},
5656
"eq": {
5757
"type": "array",
58-
"items": { "$ref": "#/$defs/equation" }
58+
"items": { "$ref": "#/$defs/eq" }
59+
},
60+
"bib_match": {
61+
"type": "array",
62+
"items": { "$ref": "#/$defs/bib_match" },
63+
"uniqueItems": true
5964
}
6065
},
6166

@@ -223,21 +228,17 @@
223228
}
224229
},
225230

226-
"sentence": {
231+
"text": {
227232
"type": "object",
228233
"required": ["text_id", "section_id", "paragraph_id", "text"],
229234
"properties": {
230235
"text_id": { "type": "integer" },
231236
"section_id": {
232-
"description": "References section table; null when sentence belongs to root (pre-first-heading)",
237+
"description": "References the section table; null when sentence belongs to root (pre-first-heading)",
233238
"type": ["integer", "null"]
234239
},
235240
"paragraph_id": { "type": "integer" },
236241
"text": { "type": "string" },
237-
"raw_text": {
238-
"description": "Original text before placeholder substitution (e.g. raw LaTeX for display math). Null when text is unmodified.",
239-
"type": ["string", "null"]
240-
},
241242
"page_number": {
242243
"type": ["integer", "null"],
243244
"description": "The page number of the original document where the sentence starts (1-based)"
@@ -285,7 +286,7 @@
285286
}
286287
},
287288

288-
"link": {
289+
"url": {
289290
"type": "object",
290291
"required": ["href", "text_id"],
291292
"properties": {
@@ -303,60 +304,24 @@
303304
"type": "object",
304305
"required": ["given", "family"],
305306
"properties": {
306-
"given": { "type": "string" },
307-
"family": { "type": "string" }
307+
"given": { "type": ["string", "null"] },
308+
"family": { "type": ["string", "null"] }
308309
},
309310
"additionalProperties": false
310311
},
311312

312-
"external_match": {
313-
"description": "Enrichment data from an external service for a bibliography entry",
314-
"type": ["object", "null"],
315-
"properties": {
316-
"id": {
317-
"description": "External identifier (DOI, OpenAlex ID, etc.)",
318-
"type": ["string", "null"]
319-
},
320-
"score": {
321-
"description": "Match confidence score",
322-
"type": ["number", "null"]
323-
},
324-
"title": { "type": ["string", "null"] },
325-
"authors": {
326-
"type": ["array", "null"],
327-
"items": { "$ref": "#/$defs/bib_author" }
328-
},
329-
"publication_year": { "type": ["integer", "null"] },
330-
"container": {
331-
"description": "Journal or book title",
332-
"type": ["string", "null"]
333-
},
334-
"volume": { "type": ["string", "null"] },
335-
"issue": { "type": ["string", "null"] },
336-
"first_page": { "type": ["string", "null"] },
337-
"last_page": { "type": ["string", "null"] },
338-
"publisher": { "type": ["string", "null"] },
339-
"editors": {
340-
"type": ["array", "null"],
341-
"items": { "$ref": "#/$defs/bib_author" }
342-
},
343-
"doi": { "type": ["string", "null"] },
344-
"bib_type": { "type": ["string", "null"] },
345-
"url": { "type": ["string", "null"] },
346-
"publication_date": { "type": ["string", "null"] },
347-
"edition": { "type": ["string", "null"] },
348-
"version": { "type": ["string", "null"] }
349-
}
350-
},
351-
352-
"bib_entry": {
313+
"bib": {
353314
"type": "object",
354-
"required": ["bib_id", "title", "authors", "text_id"],
315+
"required": ["bib_id", "text_id"],
355316
"properties": {
356317
"bib_id": {
357318
"type": "integer",
358319
"description": "1-based positional ID within the paper"
359320
},
321+
"text_id": {
322+
"type": ["integer", "null"],
323+
"description": "The text table ID of the reference as written in the paper"
324+
},
360325
"bib_type": {
361326
"type": ["string", "null"],
362327
"enum": [
@@ -377,6 +342,71 @@
377342
"pattern": "^10\\.\\d{4,9}/\\S+$"
378343
},
379344
"title": { "type": ["string", "null"] },
345+
"authors": {
346+
"description": "Array of author names, as formatted in the reference string",
347+
"type": ["array", "null"],
348+
"items": { "type": "string" }
349+
},
350+
"editors": {
351+
"description": "Array of editor names, as formatted in the reference string",
352+
"type": ["array", "null"],
353+
"items": { "type": "string" }
354+
},
355+
"publisher": { "type": ["string", "null"] },
356+
"year": { "type": ["integer", "null"] },
357+
"date": {
358+
"type": ["string", "null"],
359+
"format": "date"
360+
},
361+
"container": {
362+
"type": ["string", "null"],
363+
"description": "Journal or book title"
364+
},
365+
"volume": { "type": ["string", "null"] },
366+
"issue": { "type": ["string", "null"] },
367+
"first_page": { "type": ["string", "null"] },
368+
"last_page": { "type": ["string", "null"] },
369+
"edition": { "type": ["string", "null"] },
370+
"version": { "type": ["string", "null"] },
371+
"url": {
372+
"type": ["string", "null"],
373+
"format": "uri"
374+
}
375+
}
376+
},
377+
378+
"bib_match": {
379+
"description": "Enrichment data from an external service for a bibliography entry",
380+
"type": ["object", "null"],
381+
"required": ["service", "title", "authors"],
382+
"properties": {
383+
"service": {
384+
"type": ["string"],
385+
"enum": [
386+
"crossref",
387+
"openalex",
388+
"manual",
389+
"other"
390+
]
391+
},
392+
"bib_id": {
393+
"description": "Reference to the bib_id from the bib table",
394+
"type": ["integer"]
395+
},
396+
"service_id": {
397+
"description": "External identifier (DOI, OpenAlex ID, etc.)",
398+
"type": ["string", "null"]
399+
},
400+
"score": {
401+
"description": "Match confidence score",
402+
"type": ["number", "null"]
403+
},
404+
"bib_type": { "type": ["string", "null"] },
405+
"doi": {
406+
"type": ["string", "null"],
407+
"pattern": "^10\\.\\d{4,9}/\\S+$"
408+
},
409+
"title": { "type": ["string", "null"] },
380410
"authors": {
381411
"description": "Structured author list",
382412
"type": ["array", "null"],
@@ -388,8 +418,8 @@
388418
"items": { "$ref": "#/$defs/bib_author" }
389419
},
390420
"publisher": { "type": ["string", "null"] },
391-
"publication_year": { "type": ["integer", "null"] },
392-
"publication_date": {
421+
"year": { "type": ["integer", "null"] },
422+
"date": {
393423
"type": ["string", "null"],
394424
"format": "date"
395425
},
@@ -406,20 +436,6 @@
406436
"url": {
407437
"type": ["string", "null"],
408438
"format": "uri"
409-
},
410-
"text_id": {
411-
"type": ["integer", "null"],
412-
"description": "The text table ID of the reference as written in the paper"
413-
},
414-
"match": {
415-
"description": "External enrichment results, keyed by service",
416-
"type": "object",
417-
"properties": {
418-
"crossref": { "$ref": "#/$defs/external_match" },
419-
"openalex": { "$ref": "#/$defs/external_match" },
420-
"openlibrary": { "$ref": "#/$defs/external_match" }
421-
},
422-
"additionalProperties": false
423439
}
424440
}
425441
},
@@ -504,7 +520,7 @@
504520
}
505521
},
506522

507-
"equation": {
523+
"eq": {
508524
"type": "object",
509525
"required": ["text_id", "grp_id", "lhs", "comp", "rhs"],
510526
"properties": {

0 commit comments

Comments
 (0)