6 ms·
Germany's laws on github, machine-readable and ready to be forked
- knwang 14y agoGreat idea! can see how this can apply to many other fields than law.
- lazerwalker 14y agoI find it fascinating that for a repository of German law, written in German, the README and commit history are all in English. I wonder if that will have the effect of scaring off any would-be contributors.
- chm 14y agoI second that. I'd like my government to do the same! Don't really care about the versioning system, as long as it's open-source and alive.
- jaseg 14y agoActually, it is not "the government" doing this. It is somebody scraping an official web site containing every law, processing it and pushing the result to this repository.
- matt4711 14y agothe readme has a german section right above the english one.
- lazerwalker 14y agoAh, right you are! Didn't notice it thanks to the anchor link. Doesn't change the commit history's melange of English and German.
- eupharis 14y agoAll Germans I have ever met have had excellent English. Certainly good enough to read short English commits with only the occasional dictionary reference required. The Eurobarometer report from 2006 says 56% of Germans speak English. But I suspect that rather underestimates the case here. There is a huge difference between someone checking a box on a form that says they can speak English and being able to parse short messages in English. And given only fairly educated, tech-savvy Germans are likely to participate in this, I think the negative effect from English commits is straight up zero, or at worst incredibly low. Source: http://en.wikipedia.org/wiki/List_of_countries_by_English-speaking_population http://en.wikipedia.org/wiki/List_of_countries_by_English-sp...
- aidenn0 14y agoIt's been a few years since I visited Germany, but it varied quite a bit with region, level of education, and age (pretty universal among younger Gymnasiasten, very rare among older people in former East Germany, particularly more rural parts). I have gotten reactions from "Why did you bother to learn German? Everyone here speaks English" to "Gott sei dank! Du kannst Deutsch" ("Thank god! You can speak German")
- ddon 14y agoAmazing idea, which should be implemented by all sorts of governments around the world!
- damncabbage 14y agoThere was a great discussion on HN previously about this topic which also explains why a straight git implementation isn't viable for US law; I'm not sure if doing the same with Germany's laws would be similarly difficult: http://news.ycombinator.com/item?id=3968653 http://news.ycombinator.com/item?id=3968653
- mcrider 14y agoIsn't US law not public-domain anyway? Or at least on a state by state basis? I remember a copyright issue concerning someone reprinting some of Oregon's laws.
- acomar 14y agoThat doesn't make any sense. How can laws not be in the public domain? Can any lawyers around comment?
- eupharis 14y agoIANAL but you are right from the basic premise: “If a Law Isn't Public, It Isn't a Law”—Justice Stephen Breyer But I believe the distinction here is that just because the law is public, that doesn't mean that you can call up anyone who has a copy of the law (including the organization who wrote the law) and say "Hey, give me a copy of the law." So orgs like Malamud's get copies of the law and provide them freely to all: http://boingboing.net/2012/03/19/liberating-americas-secret.html http://boingboing.net/2012/03/19/liberating-americas-secret....
- gchpaco 14y agoThe law is non-copyrightable. However a lot of state laws say "You will build your building according to Document X by Corporation Y" and that is copyrighted and not given out without a lot of money. The reason why these exist is that lawmakers aren't experts in, say, concrete; and those who are tend to be employed privately, and make industrial standards. As an example consider specifying that a program will be written in C (a bad idea here, but saying "structural members for buildings shall be steel as defined by this standard" isn't a terrible idea). C is defined by the relevant ANSI or ISO standard; now if you want to know what the law actually says, you have to pony up the money for an official standard. I don't know what settled law is about this, but it is at the least morally questionable activity.
- grakic 14y agoI do not know about Germany, but in my country the issue is that "An update to the law X" may introduce changes not just to parts of X, but to govern the parts of laws Y, Z too. Or it may introduce completly new regulations not being a part of either law text. This is why it is hard to make current versions of X, Y or Z in terms of a version control. It is also common to have laws X and Y both applying in the same context, and sometimes it is not clear which one is newer or how to apply "An update to X". It is little easier to work on a more fine grain, in terms of sections and articles and not the law text as a whole, but this makes it a lot less official.
- acomar 14y agoIsn't that precisely taken into account by patches, hunks, and branches?
- DougBTX 14y agoThe readme suggests that he only gets a copy of the final laws. That means he can diff two versions of a law, but more work would need to be done to say that a change to two different laws belongs in the same patch. Apparently that data is not machine readable.
- Groxx 14y agoAwesome stuff. I couldn't find anywhere though: is this an 'official' project, or is it just someone who processed the XML forms into markdown? Also, this: "All German citizens can easily find an up-to-date version of their laws online." And it's only 130 megs of markdown when zipped (246 unzipped)! A mere 4,737,628 lines[1]! Surely you have time to read it, right? And therefore be a well-informed, law-abiding citizen? I wonder how big America's would be :| [1] `wc -l $(find . -name '*.md')` admittedly very rough
- jaseg 14y agoThis is not an official project, "just" someone who registered the organization "Bundesregierung" ("Federal Government") at github and processed the official XMLs into markdown.
- yaix 14y agoMy guess is that about 129 megs of those are tax laws.
- NonEUCitizen 14y agoI think this is where "German citizens can easily find an up-to-date version of their laws online" : http://www.bgbl.de/Xaver/start.xav?startbk=Bundesanzeiger_BGBl http://www.bgbl.de/Xaver/start.xav?startbk=Bundesanzeiger_BG...
- hendrik-xdest 14y agoIt's not. You still have to have the complete text of the law and manually add the changes that are described in the Bundesanzeiger. It states for example something like "Change in BGB: Paragraph 123, section 45, change the word 'and' to 'and/or'. Only completely new texts would be printed in full. The Bundesanzeiger is merely the last step in the law making process. First, the two law making institutions (Bundestag, Bundesrat) have to vote in favor of the law and the president has put his X under it. Only after the law is published in the Bundesanzeiger it takes effect.
- zmb 14y agoApplying versioning to laws is a fantastic idea, if only to make an easily accessible account of legislation's evolution.
- coopdog 14y agoThey should definitely do this for bills also, so you can easily see who has incorporated what into each bill, and how the bill is evolving as it happens
- dhucerbin 14y agoIn Poland we have project "Sejmometr" /Parliment-o-meter/ [1]. It's website with almost current information about parliment works - bills, voting, speeches. It even have json api [2] [1] http://sejmometr.pl http://sejmometr.pl [2] http://sejmometr.pl/api/dokumenty http://sejmometr.pl/api/dokumenty
- jstalin 14y agoAgreed. Every proposed change and amendment should be attributed to whichever legislator requested it so we can see who's inserting all these crazy clauses and loopholes.
- ahh 14y agoIf only they'd accept pull requests.
- akent 14y ago"You are encouraged to open pull request. Of course only valid legistation voted on by the Bundestag will be merged."
- RivieraKid 14y ago> Of course only valid legistation voted on by the Bundestag will be merged. And I was excited for a moment...
- jasonkolb 14y agoWhat sucks is this would never happen in the US. The reason being that most of the earmarks and so forth are added to bills after they're passed. And not only that, they're added as images in tiny fonts so that they can't even be scanned in. God bless America.
- drstewart 14y agoYou mean except for this? https://github.com/divegeek/uscode https://github.com/divegeek/uscode Honest question, did you even search for reasons that this would be feasible or did you just rush in to make an anti-US comment?
- dfc 14y agoUnfortunately I do not remember the link to the GPO page on xml or the XML page on thomas.loc.gov. However there are an awful lot of government documents in xml format. What specifically are you missing? For an interesting site that is using some of the new federal technology openess initiatives (for lack of a better term) take a look at: http://www.govtrack.us/ http://www.govtrack.us/ . Carl Malamud also has an extensive collection of machine readable government documents but sadly http://bulk.resource.org/ http://bulk.resource.org/ and http://public.resource.org/ http://public.resource.org/ seem to be down. Resources: Gov XML initiative: http://xml.gov/ http://xml.gov/ House XML Initiative: http://xml.house.gov/ http://xml.house.gov/ Code of Federal Regulations (XML format): http://www.gpo.gov/fdsys/bulkdata/CFR http://www.gpo.gov/fdsys/bulkdata/CFR e.g: CFR Chapter 12 (regulation of banks. 12cfr30 is customer information security at banks if you are interested) http://www.gpo.gov/fdsys/pkg/CFR-2012-title12-vol1/xml/CFR-2012-title12-vol1-chapI.xml http://www.gpo.gov/fdsys/pkg/CFR-2012-title12-vol1/xml/CFR-2... GovTracks About / Data Sources Page: http://www.govtrack.us/about http://www.govtrack.us/about EDITED: To include links to the Code of Federal Regulations
- guelo 14y agoNo part of your comment is true.
- mcrider 14y agoThe concept is great, especially seeing the specific contributions legislators make (of course in this example all commits are coming from one guy, so not so useful here). I'd love to see this advance, as well as seeing more developments in semantic markup of laws (think: 'Siri, how do I get out of this ticket?'). Not to mention just better avenues for laypeople to educate themselves on the law. I find it a little ridiculous that the legal system, which pretty much runs our lives, is so complex that it requires an industry of some of the most highly paid people in our society to interact with it. The whole thing is ripe for hacking IMO.
- neilxdsouza 14y agoSomeone should come out with an artificial intelligence app, which reads through the laws and past history of cases and helps lawyers build cases. :-)
- chucknibbleston 14y agowe are living in the future
- skrebbel 14y agoGesetze sind Prosa, sie enthalten keine maschinenlesbare Semantik. (Laws are prose, they contain no machine readable semantics) And there was me hoping they had fixed that! Ahwell, one step at a time :)
- tsahyt 14y agoRewriting law to be machine-readable as in "instructions a machine can understand" would be quite a task I suppose. Interesting project though. Would that even be possible? How well does the law map on the black and white logic of a computer?
- skrebbel 14y agoSometimes, I fantasize about turning that around. What if parts of the law (say, fiscal law sounds like a candidate) are chosen to be as black and white as the logic of a computer? Policymakers could get automated compile errors when trying to craft conflicting laws. They could instantly compute what the effect of a law change is on this and that demographic or persona.
- tsahyt 14y ago> automated compile errors when trying to craft conflicting laws That just made my day :) It's actually a good idea, I think. I'm just not exactly sure whether that would work because laws govern the real world and in the real world, logic isn't binary. However, such laws would at least be understandable for mere programmers ;)
- icebraining 14y agoLogic in computers doesn't have to be binary either. There are plenty of implementations of fuzzy logic, including some programming languages.
- gosub 14y agodata Offense = MensRea | ActusReus CriminalLaw :: [Offense] -> Punishment ExtenuatingCircumstances :: CriminalLaw -> [Circumstance] -> ExtenuatingEffect -> Punishment
- mtgx 14y agoStart with the IP-related laws. They seem to have some of the most aggressive ones in the world, which could explain why the Pirate Party there is also the fastest growing branch.
- gurkendoktor 14y agoI doubt it. Germans started getting sued for illegal downloads right when DSL grew popular (a decade ago), without any political response. We also have no software patents; we can still (CMIIW) freely share copyrighted works with friends, just not with the public; we can crack what wouldn't otherwise run. The only part that is so terrible and draconic that everybody knows about it is the GEMA, which is concerned with music and loyalties.
- axx 14y agoYeah, and now the GEMA want Kindergardens to pay fees for singing child songs that are in the portfolio of the GEMA. ridiculous!
- hendrik-xdest 14y agoThis is not completely true. You can share copyrighted materials but you are not allowed to bypass or crack any security measures to do so. Also, the information on cracking a protection system, like ripping a DVD or an LP, may not be discussed publicly. Tutorials on these topics are illegal. The same is true for software products that would allow network intrusions. Wireshark is illegal, as well.
- gurkendoktor 14y agoThat is all true. I probably live too deep within my bubble of DRM-free media :)
- Zenst 14y agoSorry semi-OT humour but this is one of the very few times were you can actualy fork with the law and come out ontop :). Sadly though alot of laws due to changes and word-smith pervertions can be hard to understand and in that it would be nice if there was some universal way to express law's that you could get any law in any country and express. That would be immpressive though hard to do. Only comparision would be picture based traffic signs, that is somewhat as close to universal with regards to laws as can get. Be nice when all the countries have there laws up in such a way. Will make grepping alot more fun and probrbaly be the birth of lgrep (law-grep).
- TazeTSchnitzel 14y agoThe closest thing to a universal expression of law is probably English. In older times, it would have been... Latin?
- weel 14y agoThe problem with translating law is that a lot of the time words are used as "terms of art" that have a special meaning based on tradition or, worse, precedent: some court at some point was forced to decide on the meaning of some very fuzzy word, they came down one way, and now the very fuzzy word has a very precise meaning and lawyers like to use it precisely because it has a precise meaning! That sort of stuff easily gets lost in translation, which is why legal translation is such a pain to do. And probably a good part of why it took the English courts so long to switch from Law French (an old dialect of Norman French long used for English legal writing) to English.
- leif 14y agothis is the best gravatar I've ever seen
- tubbo 14y agoThat....is fucking awesome. And since US law is a much larger project with more forks, I feel as though it should use Mercurial. :)
- miniatureape 14y agoWouldn't it make sense to give each sentence it's own line, and use double linefeeds to demarcate paragraphs? It would make diffs much easier to read.
- jaseg 14y agoThe python scripts to generate the repository from the xmls freely available from the german government is also on github: https://github.com/bundestag/gesetze-tools https://github.com/bundestag/gesetze-tools So, go ahead, hack! ;)
- joshu 14y agoWhere is the compiler for this?
- zallarak 14y agoGermany is killing it. Their economy is roaring, they've set very strong renewable energy goals and are acting on them, and to top it all off, they protect their civil liberties and are a relatively benevolent nation.