Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| bc01f90e70 |
@@ -9,8 +9,8 @@ paper-atlas collect eccv2026-publications \
|
||||
--out /data/paper-index/collected/eccv-publisher-metadata
|
||||
```
|
||||
|
||||
目录归档含 `receipts.jsonl`、`volume-checkpoint.json`、`summary.json` 及 156 页 HTML。摘要在章节详情页读取,章节归档沿用 `springer-selected` 的 `receipts.json` 格式。两类归档都按响应大小和 SHA-256 校验。目录卷号、分页、章节 DOI 归属、标题及 2026 年出处需要一致。已有输出目录需另查回执或换新空目录后运行。
|
||||
目录归档含 `receipts.jsonl`、`volume-checkpoint.json`、`summary.json` 及 156 页 HTML。摘要在章节详情页读取,章节归档沿用 `springer-selected` 的 `receipts.json` 格式。两类归档都按响应大小和 SHA-256 校验。目录卷号、分页、章节 DOI 归属、标题及 2026 年出处需要一致。数字上标的两种数学定界符可按同一标题核对,章节标题和目录原文分别保存。已有输出目录需另查回执或换新空目录后运行。
|
||||
|
||||
输出含规范化 JSONL、manifest、采集回执以及所选章节的内容寻址存证。每条保留出版 DOI、卷号、页码、按顺序的完整作者及公开摘要。单名署名须由同页的结构化作者列表按顺序确认,确认后按原名保存为字符串,引用元数据仍保留原文。目录证据用 URL 和哈希连接到输入归档,保存归档以便复核。主会出版观察依据 Springer 正式论文集,原始投稿号、决定日期及签名仍未知。工具仅处理已归档的公开 HTML。
|
||||
输出含规范化 JSONL、manifest、采集回执以及所选章节的内容寻址存证。每条保留出版 DOI、卷号、页码、按顺序的完整作者及公开摘要。目录证据用 URL 和哈希连接到输入归档,保存归档以便复核。主会出版观察依据 Springer 正式论文集,原始投稿号、决定日期及签名仍未知。工具仅处理已归档的公开 HTML。
|
||||
|
||||
生成的文件待做论文身份复核后方可导入。准备生产批次时核实每个 DOI 与现有 arXiv 标识的绑定,保持两者的来源证据。对已存在的同届节目投稿需先核对投稿身份及轨道,再附加出版来源,避免因直接导入创建重复投稿。具有 ICLR 等既往决定的论文须保留原记录。新的增量导入 manifest 需以当前实际来源覆盖为父版本,留存待核差集和独立验收回执。
|
||||
|
||||
@@ -102,10 +102,20 @@ def publisher_inventory(root):
|
||||
return entries
|
||||
|
||||
|
||||
def title_for_comparison(title):
|
||||
# Springer may render a numeric superscript with inline or display math delimiters.
|
||||
return clean(re.sub(r'\\\((\^[0-9]+)\\\)|\$\$(\^[0-9]+)\$\$',
|
||||
lambda match: match[1] or match[2], title))
|
||||
|
||||
|
||||
def publisher_row(chapter, toc, evidence):
|
||||
doi = chapter['doi']
|
||||
if clean(chapter['title']) != toc['title']:
|
||||
literal_title_differs = clean(chapter['title']) != toc['title']
|
||||
if literal_title_differs and title_for_comparison(chapter['title']) != title_for_comparison(toc['title']):
|
||||
raise ValueError('Chapter title differs from Springer contents, review the version')
|
||||
contents_evidence = {'url': toc['evidence_url'], 'sha256': toc['evidence_sha256']}
|
||||
if literal_title_differs:
|
||||
contents_evidence['title_literal'] = toc['title']
|
||||
url = ORIGIN + '/chapter/' + doi
|
||||
return {
|
||||
'source': SOURCE, 'external_id': doi, 'url': url,
|
||||
@@ -120,7 +130,7 @@ def publisher_row(chapter, toc, evidence):
|
||||
'book_title': BOOK_TITLE, 'book_doi': toc['book_doi'], 'lncs_volume': toc['lncs_volume'],
|
||||
'authors_citation_raw': chapter['authors_citation_raw'], 'first_page': chapter['first_page'],
|
||||
'last_page': chapter['last_page'], 'publisher_chapter_evidence': evidence,
|
||||
'publisher_contents_evidence': {'url': toc['evidence_url'], 'sha256': toc['evidence_sha256']},
|
||||
'publisher_contents_evidence': contents_evidence,
|
||||
'scope': 'Refereed conference proceedings, LNCS 17001–17078.',
|
||||
'original_decision_signature_verified': False,
|
||||
},
|
||||
|
||||
@@ -54,27 +54,6 @@ def read_page(index, url):
|
||||
return raw, evidence
|
||||
|
||||
|
||||
def require_display_authors(nodes, authors):
|
||||
matching_article_lists = []
|
||||
for node in nodes:
|
||||
if node.tag != 'script' or node.attrs.get('type') != 'application/ld+json':
|
||||
continue
|
||||
try:
|
||||
article = json.loads(''.join(node.children))
|
||||
except json.JSONDecodeError:
|
||||
continue
|
||||
if not isinstance(article, dict) or article.get('@type') != 'ScholarlyArticle':
|
||||
continue
|
||||
entries = article.get('author')
|
||||
if not isinstance(entries, list) or not all(
|
||||
isinstance(entry, dict) and isinstance(entry.get('name'), str) for entry in entries
|
||||
):
|
||||
raise ValueError('Unreviewed Springer article author list')
|
||||
matching_article_lists.append([clean(entry['name']) for entry in entries])
|
||||
if matching_article_lists != [authors]:
|
||||
raise ValueError('Single-name author requires matching Springer display author list')
|
||||
|
||||
|
||||
def parse_chapter(html, doi, *, book_title, publication_year):
|
||||
nodes = list(Document(html).root.walk())
|
||||
meta = defaultdict(list)
|
||||
@@ -94,22 +73,12 @@ def parse_chapter(html, doi, *, book_title, publication_year):
|
||||
raise ValueError('Missing named chapter authors')
|
||||
authors = []
|
||||
for raw in raw_authors:
|
||||
if ',' not in raw:
|
||||
name = clean(raw)
|
||||
if len(name.split()) != 1 or not any(character.isalpha() for character in name):
|
||||
raise ValueError('Unreviewed citation author format')
|
||||
authors.append(name)
|
||||
continue
|
||||
if raw.count(',') != 1:
|
||||
raise ValueError('Unreviewed citation author format')
|
||||
family, given = [clean(s) for s in raw.split(',', 1)]
|
||||
if not family or not given:
|
||||
raise ValueError('Incomplete citation author')
|
||||
authors.append({'given':given, 'family':family})
|
||||
if any(isinstance(author, str) for author in authors):
|
||||
display_names = [author if isinstance(author, str) else author['given']+' '+author['family']
|
||||
for author in authors]
|
||||
require_display_authors(nodes, display_names)
|
||||
abstract_nodes = [n for n in nodes if n.attrs.get('id') == 'Abs1-content']
|
||||
if len(abstract_nodes) > 1:
|
||||
raise ValueError('Ambiguous abstract section')
|
||||
|
||||
@@ -6,7 +6,7 @@ import sqlite3
|
||||
import tempfile
|
||||
import unittest
|
||||
|
||||
from paper_atlas.collectors.eccv2026_publications import BOOK_TITLE, SOURCE, collect
|
||||
from paper_atlas.collectors.eccv2026_publications import BOOK_TITLE, SOURCE, collect, publisher_row
|
||||
from paper_atlas.db.store import Store
|
||||
from paper_atlas.ingestion.records import ingest_file
|
||||
|
||||
@@ -114,6 +114,19 @@ class ECCV2026PublicationsTests(unittest.TestCase):
|
||||
with self.assertRaises(FileExistsError):
|
||||
collect(root / 'out', **source)
|
||||
|
||||
def test_numeric_superscript_wrappers_preserve_both_title_literals(self):
|
||||
chapter = {'doi': FIRST_DOI, 'title': 'Example $$^2$$ : Formal title',
|
||||
'authors': [], 'abstract': 'Published abstract.', 'authors_citation_raw': [],
|
||||
'first_page': '1', 'last_page': '10'}
|
||||
toc = {'title': r'Example \(^2\) : Formal title', 'book_doi': FIRST_BOOK, 'lncs_volume': 17001,
|
||||
'evidence_url': 'https://link.springer.com/book/' + FIRST_BOOK, 'evidence_sha256': 'a' * 64}
|
||||
evidence = {'observed_at': '2026-11-18T00:00:00Z'}
|
||||
row = publisher_row(chapter, toc, evidence)
|
||||
self.assertEqual(row['title'], chapter['title'])
|
||||
self.assertEqual(row['metadata']['publisher_contents_evidence']['title_literal'], toc['title'])
|
||||
with self.assertRaisesRegex(ValueError, 'title differs'):
|
||||
publisher_row(chapter, {**toc, 'title': r'Example \(^3\) : Formal title'}, evidence)
|
||||
|
||||
def test_changed_contents_receipt_stops_before_output(self):
|
||||
with tempfile.TemporaryDirectory() as tmp:
|
||||
root = Path(tmp)
|
||||
|
||||
@@ -9,7 +9,7 @@ import tempfile
|
||||
import unittest
|
||||
|
||||
from paper_atlas.collectors.springer_selected import (
|
||||
BOOK, SCOPE, SOURCE, collect, parse_chapter, parse_toc, read_page, snapshot_index,
|
||||
BOOK, SOURCE, collect, parse_chapter, parse_toc, read_page, snapshot_index,
|
||||
)
|
||||
from paper_atlas.db.store import Store
|
||||
from paper_atlas.ingestion.records import ingest_file
|
||||
@@ -153,28 +153,6 @@ class SpringerSelectedTests(unittest.TestCase):
|
||||
html = self.fixture['chapters']['chapter-01.html'].replace('id="Abs1-content"','id="not-an-abstract"')
|
||||
self.assertIsNone(parse_chapter(html, BOOK+'_1')['abstract'])
|
||||
|
||||
def test_single_name_preserves_literal_and_requires_ordered_display_confirmation(self):
|
||||
html = f"""
|
||||
<meta name="citation_doi" content="{BOOK}_1">
|
||||
<meta name="citation_inbook_title" content="{SCOPE['book_title']}">
|
||||
<meta name="citation_publication_date" content="{SCOPE['publication_year']}">
|
||||
<meta name="citation_title" content="Example">
|
||||
<meta name="citation_author" content="Rajkumar">
|
||||
<meta name="citation_author" content="Doe, Jane">
|
||||
<meta name="citation_firstpage" content="1">
|
||||
<meta name="citation_lastpage" content="5">
|
||||
"""
|
||||
article = {'@type':'ScholarlyArticle', 'author':[{'name':'Rajkumar'}, {'name':'Jane Doe'}]}
|
||||
script = '<script type="application/ld+json">{}</script>'
|
||||
chapter = parse_chapter(html+script.format(json.dumps(article)), BOOK+'_1')
|
||||
self.assertEqual(chapter['authors'], ['Rajkumar', {'family':'Doe', 'given':'Jane'}])
|
||||
self.assertEqual(chapter['authors_citation_raw'], ['Rajkumar','Doe, Jane'])
|
||||
with self.assertRaisesRegex(ValueError, 'matching Springer display author list'):
|
||||
parse_chapter(html, BOOK+'_1')
|
||||
article['author'].reverse()
|
||||
with self.assertRaisesRegex(ValueError, 'matching Springer display author list'):
|
||||
parse_chapter(html+script.format(json.dumps(article)), BOOK+'_1')
|
||||
|
||||
def test_toc_ignores_frontmatter_but_rejects_duplicate_publications(self):
|
||||
html = self.fixture['toc']['springer-toc1.html']
|
||||
self.assertEqual(len(parse_toc(html)), 17)
|
||||
|
||||
Reference in New Issue
Block a user