leonardr / cce-python Goto Github PK
View Code? Open in Web Editor NEWPython tools for processing data from the Catalog of Copyright Entries
License: MIT License
Python tools for processing data from the Catalog of Copyright Entries
License: MIT License
I'm running Python 2.7. When I run script 2-match-renewals.py I see this error:
Traceback (most recent call last):
File "2-match-renewals.py", line 52, in <module>
comparator = Comparator("output/1-parsed-renewals.ndjson")
File "/home/dmeyer/ghcode/cce-python/compare.py", line 15, in __init__
r = r.replace("-", "")
AttributeError: 'NoneType' object has no attribute 'replace'
This appears to be hit wherever there is a "regnum": null
in output/1-parsed-renewals.ndjson.
It looks like it could be fixed either by ensuring that when there is no regnum in the parsed renewals you put an empty list instead of None; or you could robustify the Comparator init's for r in regnum
loop to continue if r is None, avoiding the r = r.replace("-", "")
for a null r
.
Let's say we've got an A record with no renewal. The place of publication doesn't look foreign. Public domain, right?
Except, there's also a renewal for a seemingly unrelated AI or AF record which points to the A record. That indicates the work was originally a foreign publication, and its copyright was automatically restored by treaty.
The A record itself may also say something like "Prev pub. AF12345" -- another indication that it was originally a foreign publication.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.