freelawproject / eyecite

Find legal citations in any block of text
https://freelawproject.github.io/eyecite/
BSD 2-Clause "Simplified" License
114 stars 27 forks source link

Citations with and without nominative reporters are not considered equal #154

Open mattdahl opened 12 months ago

mattdahl commented 12 months ago

Consider Marbury v. Madison:

cite1 = '5 U.S. 137'
cite2 = '5 U.S. (1 Cranch) 137'

hash(get_citations(cite1)[0]) == hash(get_citations(cite2)[0])  # Returns False, but True is expected

I think that these two citations should be treated equally. (The core reporter, volume, and page keys match, but the second one has extra reporter_nominative and volume_nominative keys.)

This is related to the proposed hashing changes in #148. @overmode, I realize that PR has been languishing, in large part to my poor guidance earlier, but I might move forward on fixing this myself if that's okay with you.

mlissner commented 12 months ago

Yeah, that seems right to me.