Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISBN: missing information from openlibrary #10

Open
dpriskorn opened this issue Sep 19, 2024 · 2 comments
Open

ISBN: missing information from openlibrary #10

dpriskorn opened this issue Sep 19, 2024 · 2 comments

Comments

@dpriskorn
Copy link

curl -X 'GET'
'https://citation-js.toolforge.org/api/v1/quickstatements/isbn/978-0134093413'
-H 'accept: text/plain'

->

	CREATE
	LAST	P31	Q3331189
	LAST	Len	"Campbell Biology"
	LAST	P212	"9780134093413"
	LAST	P577	+2017-01-01T00:00:00Z/9
	LAST	P856	"https://openlibrary.org/books/OL26973587M/Campbell_Biology"
	LAST	P1104	1488
	LAST	P1476	en:"Campbell Biology"
	LAST	P2093	"Lisa A. Urry"	P1545	"1"
	LAST	P2093	"Michael L. Cain"	P1545	"2"
	LAST	P2093	"Steven A. Wasserman"	P1545	"3"
	LAST	P2093	"Peter V. Minorsky"	P1545	"4"
	LAST	P2093	"Jane B. Reece"	P1545	"5"

This includes authors, title, isbn, date of publ, OL identifier, total number of pages.

I'm missing this information from the API, which is present in OL:

  • LCCN = P1144 = 2017448967
  • Weight = P2067 = 7.6 pounds
  • Dimensions = 11 x 9.3 x 2.1 inches ->
    ** length = P2043 =11 inches
    ** width = P2049 = 9.3 inches
    ** thickness = P2610 = 2.1 inches
  • Published in New York, NY -> P291 = Q60

Data we cannot store currently:

  • Format = Hardcover (we are currently missing a property for this)
@dpriskorn dpriskorn changed the title missing LCCN from openlibrary ISBN: missing information from openlibrary Sep 19, 2024
@larsgw
Copy link
Member

larsgw commented Sep 19, 2024

Interesting, the issue here is that the data is converted first to CSL-JSON, which does not have field for that information. Extending the CSL-JSON standard is a relatively slow process, but currently it does allow for custom fields. I would need to "standardize" a list of custom fields used throughout Citation.js plugins.

Published in New York, NY -> P291 = Q60

This field is supported (publisher-place), but automatically linking it to an identifier is difficult.

@dpriskorn
Copy link
Author

dpriskorn commented Sep 19, 2024

I suggest we output to string and let the user handle it:
#LAST P291 "New York, NY" #fixme

OR even better:

We could default to try matching with first result from the mediawiki API wbcirrussearch.
In this case I get the right result with limit 1 and that is good enough for most people IMO.
https://www.wikidata.org/w/api.php?action=wbsearchentities&format=json&search=New%20York%2C%20NY&language=en&limit=1&formatversion=2

{
    "searchinfo": {
        "search": "New York, NY"
    },
    "search": [
        {
            "id": "Q60",
            "title": "Q60",
            "pageid": 186,
            "concepturi": "http://www.wikidata.org/entity/Q60",
            "repository": "wikidata",
            "url": "//www.wikidata.org/wiki/Q60",
            "display": {
                "label": {
                    "value": "New York",
                    "language": "sv"
                },
                "description": {
                    "value": "stad i delstaten New York, USA",
                    "language": "sv"
                }
            },
            "label": "New York",
            "description": "stad i delstaten New York, USA",
            "match": {
                "type": "alias",
                "language": "en",
                "text": "New York, NY"
            },
            "aliases": [
                "New York, NY"
            ]
        }
    ],
    "search-continue": 1,
    "success": 1
}

Based on this lookup and inferrence the lines would be:

LAST P291 Q60 S1683 "New York, NY" S887 Q69652283                                                                                    

S1683=quote
Q69652283=inferred from title
S887=based on heuristic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants