Skip to content

Commit c2aef80

Browse files
authored
docs: align README and architecture output examples with v0.2 (0.9.23) (#8)
Update the embedded output examples to match what extraction actually produces: - publisher and publicationYear shown as null (platform-owned, set at publish) - rightsList removed (stripped from output); publisher dropped from the ROR canonicalisation note and the pipeline-uses list - descriptionType shown as Other (set deterministically; no longer asked of the model) - affiliation identifier casing corrected to schemeURI - formats added (derived from the file extension) - architecture caption examples fixed to the {id, caption} shape Docs only; patch bump to 0.9.23.
1 parent cac5571 commit c2aef80

3 files changed

Lines changed: 19 additions & 27 deletions

File tree

README.md

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,7 @@ The pipeline uses:
6363
- **Qwen2-VL-7B** for vision-based OCR of image posters
6464
- **pdfplumber** for layout-aware PDF text extraction
6565
- **lingua-language-detector** for ISO 639-1 language detection on body text (overrides any value the model emits — body text beats metadata-fragment guessing)
66-
- **ROR** (`https://api.ror.org`) for affiliation and publisher canonicalisation; matched names get a ROR identifier attached
67-
- **SPDX** matching (with integer-exact version handling) for license normalisation in `rightsList`
66+
- **ROR** (`https://api.ror.org`) for affiliation canonicalisation; matched names get a ROR identifier attached
6867

6968
## Quick Start
7069

@@ -124,34 +123,25 @@ Output conforms to the [poster-json-schema](https://github.com/fairdataihub/post
124123
"name": "Stanford University",
125124
"affiliationIdentifier": "https://ror.org/00f54p054",
126125
"affiliationIdentifierScheme": "ROR",
127-
"schemeUri": "https://ror.org/"
126+
"schemeURI": "https://ror.org/"
128127
}
129128
]
130129
}
131130
],
132131
"titles": [
133132
{ "title": "Machine Learning Approaches to Diabetic Retinopathy Detection" }
134133
],
135-
"publicationYear": 2025,
134+
"publicationYear": null,
136135
"language": "en",
137136
"researchField": "Health Sciences",
138137
"subjects": [
139138
{ "subject": "Machine Learning" },
140139
{ "subject": "Diabetic Retinopathy" }
141140
],
142141
"descriptions": [
143-
{ "description": "We present a deep learning model...", "descriptionType": "Abstract" }
144-
],
145-
"publisher": { "name": "Zenodo" },
146-
"rightsList": [
147-
{
148-
"rights": "Creative Commons Attribution 4.0 International",
149-
"rightsIdentifier": "CC-BY-4.0",
150-
"rightsIdentifierScheme": "SPDX",
151-
"schemeUri": "https://spdx.org/licenses/",
152-
"rightsUri": "https://creativecommons.org/licenses/by/4.0/"
153-
}
142+
{ "description": "We present a deep learning model...", "descriptionType": "Other" }
154143
],
144+
"publisher": null,
155145
"content": {
156146
"sections": [
157147
{ "sectionTitle": "Abstract", "sectionContent": "..." },
@@ -160,15 +150,17 @@ Output conforms to the [poster-json-schema](https://github.com/fairdataihub/post
160150
]
161151
},
162152
"imageCaptions": [{ "id": "fig1", "caption": "Figure 1. ROC curves showing..." }],
163-
"tableCaptions": [{ "id": "table1", "caption": "Table 1. Performance metrics" }]
153+
"tableCaptions": [{ "id": "table1", "caption": "Table 1. Performance metrics" }],
154+
"formats": ["application/pdf"]
164155
}
165156
```
166157

167158
Notes on the auto-populated fields:
168159
- `language` is detected from the raw body text (lingua heuristic). Returns null when text is too short (<200 chars / <50 non-ASCII codepoints) or the detector is unsure.
169160
- `researchField` must be one of the four OpenAlex top-level domains: `Health Sciences`, `Life Sciences`, `Physical Sciences`, `Social Sciences`. Null when the model can't pick one confidently.
170-
- `affiliation` and `publisher` get ROR enrichment when the matcher returns a high-confidence chosen result. Strings without a confident match pass through unchanged. Set `POSTER2JSON_ROR=0` to disable.
171-
- `rightsList` entries are matched against an SPDX table; the matcher is conservative on version numbers (e.g. `CC-BY-4.0` and `CC-BY-4.1` are never confused).
161+
- `affiliation` gets ROR enrichment when the matcher returns a high-confidence chosen result. Strings without a confident match pass through unchanged. Set `POSTER2JSON_ROR=0` to disable.
162+
- `publisher` and `publicationYear` are always emitted as `null`. They are platform-owned and set when the poster is published, not by extraction.
163+
- `formats` is derived from the input file's extension, not the model.
172164

173165
## System Requirements
174166

docs/architecture.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -127,23 +127,23 @@ ORCIDs are extracted from poster text via regex, then matched to the appropriate
127127

128128
### ROR enrichment
129129

130-
Affiliation names are looked up against the [ROR API](https://ror.org). When a match is found, `affiliationIdentifier`, `affiliationIdentifierScheme`, and `schemeUri` are populated.
130+
Affiliation names are looked up against the [ROR API](https://ror.org). When a match is found, `affiliationIdentifier`, `affiliationIdentifierScheme`, and `schemeURI` are populated.
131131

132-
### Publisher enrichment
132+
### Publisher
133133

134-
If a publisher name is extracted, it is also looked up against ROR to populate `publisherIdentifier`, `publisherIdentifierScheme`, and `schemeURI`.
134+
`publisher` is always emitted as `null`. It is platform-owned and assigned when the poster is published (the hosting repository), so extraction does not populate or enrich it.
135135

136136
### Language detection
137137

138138
The `language` field is detected from the raw poster text using the `lingua` language detector, overwriting any value the LLM may have produced. The result is an ISO 639-1 code (e.g., "en"), or null when the text is too short (<200 chars / <50 non-ASCII codepoints) or the detector is unsure.
139139

140140
### Description type
141141

142-
The LLM prompt instructs the model to classify `descriptionType` based on poster content. It defaults to "Abstract" for poster summaries, but the model can choose from the full set of DataCite description types (Abstract, Methods, SeriesInformation, TableOfContents, TechnicalInfo, Other).
142+
`descriptionType` is not requested from the model; it is set deterministically to `"Other"`, since the description is a machine-generated summary. `"Abstract"` is reserved for an author-provided formal abstract, which the platform attaches downstream.
143143

144-
### Rights normalization
144+
### Rights
145145

146-
License strings from the LLM are canonicalized to SPDX form. This includes alias matching, Creative Commons URL parsing, and fuzzy matching (Levenshtein distance 1). Junk entries like funding acknowledgments or boilerplate text are filtered out.
146+
`rightsList` is stripped from the output. The license is chosen by the user at publish time rather than inferred from the poster.
147147

148148
### Funding normalization
149149

@@ -185,10 +185,10 @@ Outputs conform to [poster-json-schema](https://github.com/fairdataihub/poster-j
185185
]
186186
},
187187
"imageCaptions": [
188-
{"caption": "Figure 1. Description"}
188+
{"id": "fig1", "caption": "Figure 1. Description"}
189189
],
190190
"tableCaptions": [
191-
{"captions": ["Table 1.", "Description"]}
191+
{"id": "table1", "caption": "Table 1. Description"}
192192
]
193193
}
194194
```

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[tool.poetry]
22

33
name = "poster2json"
4-
version = "0.9.22"
4+
version = "0.9.23"
55
description = "Convert scientific posters (PDF/images) to structured JSON metadata using Large Language Models"
66

77
packages = [{ include = "poster2json" }]

0 commit comments

Comments
 (0)