|
6 | 6 | "type": "object", |
7 | 7 | "properties": { |
8 | 8 | "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)", |
10 | 10 | "type": ["string", "null"] |
11 | 11 | }, |
12 | 12 | "info": { |
|
19 | 19 | }, |
20 | 20 | "text": { |
21 | 21 | "type": "array", |
22 | | - "items": { "$ref": "#/$defs/sentence" }, |
| 22 | + "items": { "$ref": "#/$defs/text" }, |
23 | 23 | "uniqueItems": true |
24 | 24 | }, |
25 | 25 | "section": { |
|
30 | 30 | "url": { |
31 | 31 | "description": "Hyperlinks found in the paper text", |
32 | 32 | "type": "array", |
33 | | - "items": { "$ref": "#/$defs/link" }, |
| 33 | + "items": { "$ref": "#/$defs/url" }, |
34 | 34 | "uniqueItems": true |
35 | 35 | }, |
36 | 36 | "bib": { |
37 | 37 | "type": "array", |
38 | | - "items": { "$ref": "#/$defs/bib_entry" }, |
| 38 | + "items": { "$ref": "#/$defs/BIB" }, |
39 | 39 | "uniqueItems": true |
40 | 40 | }, |
41 | 41 | "xref": { |
|
55 | 55 | }, |
56 | 56 | "eq": { |
57 | 57 | "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 |
59 | 64 | } |
60 | 65 | }, |
61 | 66 |
|
|
223 | 228 | } |
224 | 229 | }, |
225 | 230 |
|
226 | | - "sentence": { |
| 231 | + "text": { |
227 | 232 | "type": "object", |
228 | 233 | "required": ["text_id", "section_id", "paragraph_id", "text"], |
229 | 234 | "properties": { |
230 | 235 | "text_id": { "type": "integer" }, |
231 | 236 | "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)", |
233 | 238 | "type": ["integer", "null"] |
234 | 239 | }, |
235 | 240 | "paragraph_id": { "type": "integer" }, |
236 | 241 | "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 | | - }, |
241 | 242 | "page_number": { |
242 | 243 | "type": ["integer", "null"], |
243 | 244 | "description": "The page number of the original document where the sentence starts (1-based)" |
|
285 | 286 | } |
286 | 287 | }, |
287 | 288 |
|
288 | | - "link": { |
| 289 | + "url": { |
289 | 290 | "type": "object", |
290 | 291 | "required": ["href", "text_id"], |
291 | 292 | "properties": { |
|
303 | 304 | "type": "object", |
304 | 305 | "required": ["given", "family"], |
305 | 306 | "properties": { |
306 | | - "given": { "type": "string" }, |
307 | | - "family": { "type": "string" } |
| 307 | + "given": { "type": ["string", "null"] }, |
| 308 | + "family": { "type": ["string", "null"] } |
308 | 309 | }, |
309 | 310 | "additionalProperties": false |
310 | 311 | }, |
311 | 312 |
|
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": { |
353 | 314 | "type": "object", |
354 | | - "required": ["bib_id", "title", "authors", "text_id"], |
| 315 | + "required": ["bib_id", "text_id"], |
355 | 316 | "properties": { |
356 | 317 | "bib_id": { |
357 | 318 | "type": "integer", |
358 | 319 | "description": "1-based positional ID within the paper" |
359 | 320 | }, |
| 321 | + "text_id": { |
| 322 | + "type": ["integer", "null"], |
| 323 | + "description": "The text table ID of the reference as written in the paper" |
| 324 | + }, |
360 | 325 | "bib_type": { |
361 | 326 | "type": ["string", "null"], |
362 | 327 | "enum": [ |
|
377 | 342 | "pattern": "^10\\.\\d{4,9}/\\S+$" |
378 | 343 | }, |
379 | 344 | "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"] }, |
380 | 410 | "authors": { |
381 | 411 | "description": "Structured author list", |
382 | 412 | "type": ["array", "null"], |
|
388 | 418 | "items": { "$ref": "#/$defs/bib_author" } |
389 | 419 | }, |
390 | 420 | "publisher": { "type": ["string", "null"] }, |
391 | | - "publication_year": { "type": ["integer", "null"] }, |
392 | | - "publication_date": { |
| 421 | + "year": { "type": ["integer", "null"] }, |
| 422 | + "date": { |
393 | 423 | "type": ["string", "null"], |
394 | 424 | "format": "date" |
395 | 425 | }, |
|
406 | 436 | "url": { |
407 | 437 | "type": ["string", "null"], |
408 | 438 | "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 |
423 | 439 | } |
424 | 440 | } |
425 | 441 | }, |
|
504 | 520 | } |
505 | 521 | }, |
506 | 522 |
|
507 | | - "equation": { |
| 523 | + "eq": { |
508 | 524 | "type": "object", |
509 | 525 | "required": ["text_id", "grp_id", "lhs", "comp", "rhs"], |
510 | 526 | "properties": { |
|
0 commit comments