Giter VIP home page Giter VIP logo

cce-python's Issues

compare.py cannot handle null renewal regnums

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.

AI and AF records may show that an A record is a foreign publication

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.