commonmeta-ruby 3.2.15 → 3.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (27) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/bin/commonmeta +1 -1
  4. data/lib/commonmeta/author_utils.rb +1 -1
  5. data/lib/commonmeta/cli.rb +17 -0
  6. data/lib/commonmeta/crossref_utils.rb +56 -14
  7. data/lib/commonmeta/readers/json_feed_reader.rb +25 -1
  8. data/lib/commonmeta/utils.rb +37 -0
  9. data/lib/commonmeta/version.rb +1 -1
  10. data/spec/cli_spec.rb +27 -3
  11. data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/doi_prefix/doi_prefix_by_blog.yml +997 -0
  12. data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/doi_prefix/doi_prefix_by_uuid.yml +256 -0
  13. data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/encode/by_blog.yml +997 -0
  14. data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/encode/by_blog_unknown_blog_id.yml +49 -0
  15. data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/encode/by_uuid.yml +256 -0
  16. data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/encode/by_uuid_unknown_uuid.yml +49 -0
  17. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_doi_prefix_for_blog/by_blog_id.yml +997 -0
  18. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_doi_prefix_for_blog/by_blog_post_uuid.yml +389 -0
  19. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_doi_prefix_for_blog/by_blog_post_uuid_specific_prefix.yml +389 -0
  20. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed_item/by_uuid.yml +136 -0
  21. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed_item_metadata/blog_post_with_non-url_id.yml +136 -0
  22. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed_item_metadata/ghost_post_with_organizational_author.yml +91 -0
  23. data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/write_metadata_as_crossref/json_feed_item_from_rogue_scholar_with_organizational_author.yml +91 -0
  24. data/spec/readers/json_feed_reader_spec.rb +68 -0
  25. data/spec/utils_spec.rb +8 -0
  26. data/spec/writers/crossref_xml_writer_spec.rb +28 -0
  27. metadata +15 -2
@@ -0,0 +1,256 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://rogue-scholar.org/api/posts/2b22bbba-bcba-4072-94cc-3f88442fff88
6
+ body:
7
+ encoding: UTF-8
8
+ string: ''
9
+ headers:
10
+ Connection:
11
+ - close
12
+ Host:
13
+ - rogue-scholar.org
14
+ User-Agent:
15
+ - http.rb/5.1.1
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Age:
22
+ - '0'
23
+ Cache-Control:
24
+ - public, max-age=0, must-revalidate
25
+ Content-Length:
26
+ - '17762'
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ Date:
30
+ - Sun, 18 Jun 2023 06:01:21 GMT
31
+ Etag:
32
+ - '"rm8wu4t2aydoe"'
33
+ Server:
34
+ - Vercel
35
+ Strict-Transport-Security:
36
+ - max-age=63072000
37
+ X-Matched-Path:
38
+ - "/api/posts/[slug]"
39
+ X-Vercel-Cache:
40
+ - MISS
41
+ X-Vercel-Id:
42
+ - fra1::iad1::6w82h-1687068080550-7c14323d7dbd
43
+ Connection:
44
+ - close
45
+ body:
46
+ encoding: UTF-8
47
+ string: '{"id":"https://doi.org/10.54900/6p6re-xyj61","uuid":"2b22bbba-bcba-4072-94cc-3f88442fff88","url":"https://upstream.force11.org/an-initial-scholarly-ai-taxonomy/","title":"An
48
+ Initial Scholarly AI Taxonomy","summary":"Although advances in artificial
49
+ intelligence (AI)1 have been unfolding for over decades, the progress in the
50
+ last six months has come faster than anyone expected. The public release of
51
+ ChatGPT in November 2022, in particular, has opened up new possibilities and
52
+ heightened awareness of AI''s potential role in various aspects of our work
53
+ and life.It follows that in the context of the publishing industry, AI also
54
+ holds the promise of transforming multiple facets of the publishing process2.
55
+ In this...","date_published":"2023-04-11T08:00:34Z","date_modified":"2023-04-11T15:29:38Z","date_indexed":"1970-01-01T00:00:00+00:00","authors":[{"url":null,"name":"Adam
56
+ Hyde"},{"url":"https://orcid.org/0000-0002-7378-2408","name":"John Chodacki"},{"url":null,"name":"Paul
57
+ Shannon"}],"image":"https://upstream.force11.org/content/images/2023/04/1-1.png","content_html":"
58
+ <!--kg-card-begin: html--><p class=''u-drop-cap-small''>Although advances
59
+ in artificial intelligence (AI)<sup>1</sup> have been unfolding for over decades,
60
+ the progress in the last six months has come faster than anyone expected.
61
+ The public release of ChatGPT in November 2022, in particular, has opened
62
+ up new possibilities and heightened awareness of AI''s potential role in various
63
+ aspects of our work and life.</p><!--kg-card-end: html--><!--kg-card-begin:
64
+ html--><p>It follows that in the context of the publishing industry, AI also
65
+ holds the promise of transforming multiple facets of the publishing process<sup>2</sup>.
66
+ In this blog post, we begin the development of a rough taxonomy for understanding
67
+ how and where AI can and/or should play a role in a publisher’s workflow.</p><!--kg-card-end:
68
+ html--><p>We intend to iterate on this taxonomy (for now, we will use the
69
+ working title ‘Scholarly AI Taxonomy’).</p><h2 id=\"scholarly-ai-taxonomy\">Scholarly
70
+ AI Taxonomy</h2><p>To kickstart discussions on AI''s potential impact on publishing
71
+ workflows, we present our initial categorization of the \"Scholarly AI Taxonomy.\"
72
+ This taxonomy outlines seven key roles that AI could potentially play in a
73
+ scholarly publishing workflow:</p><ol><li><strong>Extract</strong>: Identify
74
+ and isolate specific entities or data points within the content.</li><li><strong>Validate</strong>:
75
+ Verify the accuracy and reliability of the information.</li><li><strong>Generate</strong>:
76
+ Produce new content or ideas, such as text or images.</li><li><strong>Analyse</strong>:
77
+ Examine patterns, relationships, or trends within the information.</li><li><strong>Reformat</strong>:
78
+ Modify and adjust information to fit specific formats or presentation styles.</li><li><strong>Discover</strong>:
79
+ Search for and locate relevant information or connections.</li><li><strong>Translate</strong>:
80
+ Convert information from one language or form to another.</li></ol><p>The
81
+ above is the first pass at a taxonomy. To flesh out these further, we have
82
+ provided examples to illustrate each category further. </p><p>We thoroughly
83
+ recognise that some of the examples below, when further examined, may be miscategorized.
84
+ Further, we recognise that some examples could be illustrations of several
85
+ of these categories at play at once and don’t sit easily within just one of
86
+ the items listed. We also acknowledge that the categories themselves will
87
+ need thorough discussion and revision going forward. However, we hope that
88
+ this initial taxonomy can play a role in helping the community understand
89
+ what AI could mean for publishing processes.</p><p>Also note, in the examples
90
+ we are not making any assertions about the accuracy of AI when performing
91
+ these tasks. There are a lot of discussions already on whether the current
92
+ state of AI tools can do the following activities <em>well</em>. We are not
93
+ debating that aspect of the community discussion; that is for publishers and
94
+ technologists to explore further as the technology progresses and as we all
95
+ gain experience using these tools. </p><p>These categories are only proposed
96
+ as a way of understanding the <em>types of contributions</em> AI tools can
97
+ make. That being said, some of the below examples are more provocative than
98
+ others in an attempt to help the reader examine what they think <em>and feel</em>
99
+ about these possibilities.</p><h2 id=\"initial-categorization\">Initial categorization</h2><p>Our
100
+ initial seven categories are detailed further below.</p><h3 id=\"1-extractidentify-and-isolate-specific-entities-or-data-points-within-the-content\">1.
101
+ Extract - <em>Identify and isolate specific entities or data points within
102
+ the content</em></h3><p>In the extraction stage, AI-powered tools can significantly
103
+ streamline the process of identifying and extracting relevant information
104
+ from content and datasets. However, an over-reliance on AI for this task can
105
+ lead to errors if the models are not well-tuned or lack the necessary context
106
+ to identify entities accurately. Some speculative examples:</p><ol><li>Identifying
107
+ author names and affiliations from a submitted manuscript to pre-fill forms
108
+ and save time during submission while increasing the accuracy of the input.</li><li>Extracting
109
+ key terms and phrases for indexing purposes.</li><li>Isolating figures and
110
+ tables from a research article for separate processing.</li><li>Extracting
111
+ metadata, such as title, abstract, and keywords, from a document.</li><li>Identifying
112
+ citations within a text for reference management.</li></ol><h3 id=\"2-validateverify-the-accuracy-and-reliability-of-the-information\">2.
113
+ Validate - <em>Verify the accuracy and reliability of the information</em></h3><p>AI-based
114
+ systems can validate information by cross-referencing data against reliable
115
+ sources or expected structures, ensuring content conformity, accuracy and/or
116
+ credibility. While this can reduce human error, it is essential to maintain
117
+ a level of human oversight, as AI models may not always detect nuances in
118
+ language or identify reliable sources. Some examples:</p><ol><li>Cross-referencing
119
+ citations to ensure accuracy and proper formatting.</li><li>Verifying author
120
+ affiliations against an established database.</li><li>Ensuring proper image
121
+ attribution and permissions.</li><li>Checking factual information in an article
122
+ against trusted sources.</li><li>Validating claims made in a scientific paper
123
+ against previous studies.</li></ol><h3 id=\"3-generateproduce-new-content-or-ideas-such-as-text-or-images\">3.
124
+ Generate - <em>Produce new content or ideas, such as text or images</em></h3><p>AI
125
+ can create high-quality text and images, saving time and effort for authors
126
+ and editors. However, the content generated by AI may contain factual inaccuracies,
127
+ lack creativity, or inadvertently reproduce biases present in the training
128
+ data, necessitating human intervention to ensure accuracy, quality, originality,
129
+ and adherence to ethical guidelines. Some examples:</p><ol><li>Generating
130
+ social media content (e.g., summarising longer text to a tweetable length)
131
+ or promotional content for a new publication.</li><li>Creating keyword lists
132
+ for search engine optimization (SEO).</li><li>Automatically generating an
133
+ abstract or summary of a manuscript, particularly a plain language summary
134
+ pitched at a certain audience.</li><li>Creating a list of suggested article
135
+ titles based on the content and target audience.</li><li>Producing visually
136
+ engaging charts or graphs from raw data.</li></ol><h3 id=\"4-analyseexamine-patterns-relationships-or-trends-within-the-information\">4.
137
+ Analyse - <em>Examine patterns, relationships, or trends within the information</em></h3><p>AI-driven
138
+ data analytics tools can help publishers extract valuable insights from their
139
+ content, identifying patterns and trends to optimize content strategy. While
140
+ AI can provide essential information, over-reliance on AI analytics may lead
141
+ to overlooking important context or misinterpreting data, requiring human
142
+ analysts to interpret findings accurately. Some examples:</p><ol><li>Analyse
143
+ an image to create accessible text descriptions.</li><li>Determining the sentiment
144
+ of reviews.</li><li>Identifying trending topics in a specific field to guide
145
+ editorial direction.</li><li>Analyzing the readability level of a manuscript.</li><li>Discovering
146
+ patterns in citation networks to identify influential articles and authors.</li></ol><h3
147
+ id=\"5-reformatmodify-and-adjust-information-to-fit-specific-formats-or-presentation-styles\">5.
148
+ Reformat - <em>Modify and adjust information to fit specific formats or presentation
149
+ styles</em></h3><p>AI can reformat content for specific media channels or
150
+ alternative structures, enhancing user experience and accessibility. However,
151
+ AI-generated formatting may not always be ideal or adhere to specific style
152
+ guidelines, requiring human editors to fine-tune the formatting. Some examples:</p><ol><li>Formatting
153
+ content to comply with a specific style guide.</li><li>Adapting a long-form
154
+ article for a shorter, mobile-friendly version.</li><li>Converting a manuscript
155
+ into XML or converting datasets to open formats.</li><li>Rearranging content
156
+ to fit different print and digital formats.</li><li>Adjusting images and graphics
157
+ for optimal display across various devices.</li></ol><h3 id=\"6-discoversearch-for-and-locate-relevant-information-or-connections\">6.
158
+ Discover - <em>Search for and locate relevant information or connections</em></h3><p>AI
159
+ can efficiently find and link information about a subject, streamlining the
160
+ research process. However, AI-driven information discovery may yield irrelevant,
161
+ incorrect, or outdated results, necessitating human verification and filtering
162
+ to ensure accuracy and usefulness. Some examples:</p><ol><li>Finding relevant
163
+ articles within a publisher’s corpus to recommend for further reading.</li><li>Identifying
164
+ potential reviewers for a submitted manuscript based on their expertise.</li><li>Discovering
165
+ trending topics for a call for papers.</li><li>Locating similar works to provide
166
+ context for a piece of content.</li><li>Searching for related images or multimedia
167
+ to accompany a text.</li></ol><h3 id=\"7-translateconvert-information-from-one-language-or-form-to-another\">7.
168
+ Translate - <em>Convert information from one language or form to another</em></h3><p>AI
169
+ can quickly translate languages and sentiments, making content more accessible
170
+ and understandable to diverse audiences. However, AI translations can sometimes
171
+ be inaccurate or lose nuances in meaning, especially when dealing with idiomatic
172
+ expressions or cultural context, necessitating the involvement of human translators
173
+ for sensitive or complex content. Some examples:</p><ol><li>Translating a
174
+ research article or book into another language.</li><li>Converting scientific
175
+ jargon into more accessible language for a popular science article.</li><li>Adapting
176
+ a text''s cultural references to be more understandable for a global readership.</li><li>Translating
177
+ the sentiment of a text.</li><li>Converting spoken language into written transcripts
178
+ (or vice versa) for interviews or podcasts.</li></ol><h2 id=\"balancing-ai-and-human-intervention-in-publishing-workflows\">Balancing
179
+ AI and Human Intervention in Publishing Workflows</h2><p>There is potential
180
+ for AI to benefit publishing workflows. Still, it''s crucial to identify where
181
+ AI should play a role and when human intervention is required to check and
182
+ validate outcomes of assisted technology. In many ways, this is no different
183
+ to how publishing works today. If there is one thing publishers do well, and
184
+ sometimes to exaggerated fidelity, it is quality assurance.</p><p>However,
185
+ AI tools offer several new dimensions which can bring machine assistance into
186
+ many more parts of the process at a much larger scale. This, together with
187
+ the feeling we have that AI is, in fact, in some ways ‘doing work previously
188
+ considered to be the sole realm of the sentient’ and the need for people and
189
+ AI machines to ‘learn together’ so those outcomes can improve, means there
190
+ is both factual and emotional requirements to scope, monitor, and check these
191
+ outcomes.</p><p>Consequently, workflow platforms must be designed with interfaces
192
+ allowing seamless ‘Human QA’ at appropriate points in the process. These interfaces
193
+ should enable publishers to review, edit, and approve AI-generated content
194
+ or insights, ensuring that the final product meets the required standards
195
+ and ethical guidelines. Where possible, the ‘Human QA’ should feed back into
196
+ the AI processes to improve future outcomes; this also needs to be considered
197
+ by tool builders.</p><p>To accommodate this ''Human QA'', new types of interfaces
198
+ will need to be developed in publishing tools. These interfaces should facilitate
199
+ easy interaction between human users and AI-generated content, allowing for
200
+ necessary reviews and modifications. For instance, a journal workflow platform
201
+ might offer a feature where users are asked to ''greenlight'' a pre-selected
202
+ option from a drop-down menu (e.g., institutional affiliation), generated
203
+ by AI. This way, researchers and editors can quickly validate AI-generated
204
+ suggestions while providing feedback to improve the AI''s performance over
205
+ time. Integrating such interfaces not only ensures that the content adheres
206
+ to the desired quality standards and ethical principles but also expedites
207
+ the publishing process, making it more efficient.</p><h2 id=\"the-speed-of-trust\">The
208
+ Speed of Trust</h2><p>Trust plays a large role in this process. As we learn
209
+ more about the fidelity and accuracy of these systems and confront what AI
210
+ processes can and can’t do well to date, we will need to move forward with
211
+ building AI into workflows ''at the speed of trust.''</p><p>Adopting a \"speed
212
+ of trust\" approach means being cautious yet open to AI''s potential in transforming
213
+ publishing workflows. It involves engaging in honest conversations about AI''s
214
+ capabilities and addressing concerns, all while striking a balance between
215
+ innovation and desirable community standards. As we navigate this delicate
216
+ balance, we create an environment where AI technology can grow and adapt to
217
+ better serve the publishing community.</p><p>For example, as a start, when
218
+ integrating AI into publishing workflows, we believe it is essential to provide
219
+ an ‘opt-in’ and transparent approach to AI contributions. Publishers and authors
220
+ should be informed about the extent of AI involvement and its limitations,
221
+ and presented with interfaces allowing them to make informed decisions about
222
+ when and how AI will be used. This transparent ‘opt-in’ approach helps build
223
+ trust, allows us to iterate forward as we gain more experience, and sets the
224
+ stage for discussions and practices regarding ethical AI integration in publishing
225
+ workflows.</p><h2 id=\"conclusion\">Conclusion</h2><p>The potential of AI
226
+ in publishing workflows is immense, and we find ourselves at a time when the
227
+ technology has taken a significant step forward. But it''s essential to approach
228
+ its integration with a balanced perspective. We can harness the power of AI
229
+ while adhering to ethical standards and delivering high-quality content by
230
+ considering both the benefits and drawbacks of AI, identifying areas for human
231
+ intervention, maintaining transparency, and evolving our understanding of
232
+ AI contributions.</p><p>This initial taxonomy outlined in this article can
233
+ serve as a starting point for understanding how AI can contribute to publishing
234
+ workflows. By quantifying AI contributions in this way, we can also discuss
235
+ the ethical boundaries of AI-assisted workflows more clearly and help publishers
236
+ make informed decisions about AI integration.</p><p>By adopting a thoughtful
237
+ strategy, the combined strengths of AI and human expertise can drive significant
238
+ advancements and innovation within the publishing industry.</p><hr><!--kg-card-begin:
239
+ html--><p class=''u-drop-cap-small''><sup>1</sup> It''s worth noting that
240
+ we use the term AI here, but we are actually referring to large language models
241
+ (LLMs); AI serves as useful shorthand since it''s the common term used in
242
+ our community. As we all gain more experience, being more accurate about how
243
+ we use terms like AI and LLM will become increasingly important. A Large Language
244
+ Model (LLM) can be described as a sophisticated text processor. It''s an advanced
245
+ machine learning model designed to process, generate, and understand natural
246
+ language text.</p><!--kg-card-end: html--><!--kg-card-begin: html--><p class=''u-drop-cap-small''><sup>2</sup>
247
+ By publishing, we are referring to both traditional journal-focused publishing
248
+ models as well as emergent publishing models such as preprints, protocols/methods,
249
+ micropubs, data, etc.</p>\n<!--kg-card-end: html--><p><em>Many thanks to Ben
250
+ Whitmore, Ryan Dix-Peek, and Nokome Bentley for the discussions that lead
251
+ to this taxonomy at our recent Coko Summit. This article was written with
252
+ the assistance of GPT4.</em></p> ","tags":["Thought Pieces"],"language":"en","references":[],"blog_id":"pm0p222","blog":{"id":"pm0p222","title":"Upstream","description":"The
253
+ community blog for all things Open Research.","language":"en","favicon":"https://upstream.force11.org/favicon.png","feed_url":"https://upstream.force11.org/atom/","home_page_url":"https://upstream.force11.org","user_id":"8498eaf6-8c58-4b58-bc15-27eda292b1aa","created_at":"2023-05-31T07:23:49+00:00","indexed_at":"2023-01-13","feed_format":"application/atom+xml","license":"https://creativecommons.org/licenses/by/4.0/legalcode","generator":"Ghost
254
+ 5.25","category":"Humanities","prefix":"10.54900","modified_at":"2023-06-06T08:00:49+00:00","version":"https://jsonfeed.org/version/1.1","backlog":true,"authors":null}}'
255
+ recorded_at: Sun, 18 Jun 2023 06:01:21 GMT
256
+ recorded_with: VCR 6.1.0