8 ms·
Ah, yet another example of a switch statement being "AI".
by kelchm 7y ago
Ah, yet another example of a switch statement being "AI".
- tw1010 7y agoI think that's fake code in the images ;)
- chrismeller 7y agoWell it’s relevant to the story, so if it’s fake they put a surprising amount of effort into it...
- arethuza 7y agoI was trying to work out what language it is - also switching on strings like that doesn't seem like a great idea.
- denzil_correa 7y agoThe project is hosted on Github [0], I'm not sure if the entire source code is available though. [0] https://github.com/codeforamerica/autoclearance https://github.com/codeforamerica/autoclearance
- kevin_b_er 7y agoI would hope the entire source is available. We should always be wary of secret algorithmic decisions in court cases. The algorithm should be openly available for the public to see in the same way that the law is to be openly available.
- RiverBanshee 7y agoHi, engineer on the project here! That's an old version of the code that turned out to be too slow for the volume of records we need to process. The current version, which you see in the images from the article, is written in Golang.
- sauerbraten 7y agoThe code in the screenshot is valid Go (switching on strings, no parentheses around the if condition, incrementing a map value using ++) and could even be the output of go fmt (with the { on the same line as the if). The app itself appears to be written in Ruby (the github link is posted elsewhere in the comments), and looking at the image included in the article further down I assume the code is from a Go app that takes the Ruby app's logs and generates some statistics.
- lopmotr 7y agoYes, that was painful to see. The strings are even capitalized in a particular way so it doesn't look like it had already been processed to normalize the formatting.
- jonas21 7y agoIf you go to 1:51 in the video, you can see the same code on what appears to be an engineer's screen. It seems like it would be a lot of effort (and questionable journalism) to fake that.
- pimlottc 7y agoI don't see anywhere in the article where they call it AI. It is described as an algorithm, which seems appropriate to me.
- ejolto 7y agoIn the caption of the video "WATCH: AI helps clear cannabis conviction backlog".
- darepublic 7y agoThe word is associated with the cutting edge whereas the actual code itself I imagine is mundane and hacky
- if-then-else-do 7y agoWell, they do say that Life is a series of IF statements...
- CoolGuySteve 7y agoYou should try reading the article.
- klmr 7y agoThe software does perform text mining (presumably via some sort of NLP?), an area that is firmly a subset of AI.
- QuercusMax 7y agoIt could just be very simple keyword matching, especially if this is looking at court records.
- klmr 7y agoIt seems that this might indeed be the case. After writing the comment I’ve had a look through the (obsolete) Ruby code base of the project that somebody linked, and it doesn’t actually perform (what I’d call) text mining as far as I can see. Instead it parses the court documents, which seems to be a mostly structured format. No natural language processing.
- vectorEQ 7y agofor case in cases: if "cannabis" in case: case.flipverdict() There u go ,crazy machine learning algorithm :O
- daveFNbuck 7y agoNow you've created bugs where you overturn "not guilty" verdicts, expunge verdicts of cases that tangentially involved cannabis, and fail to expunge verdicts of cases where cannabis wasn't in the text but that still fell under the law change.
- jessaustin 7y agoHaha if it's not correct to start with it must be some sort of "machine learning". Besides, how many innocent verdicts for these crimes can there be? Prosecutors don't care near as much about pot possession as cops do (because they're not the ones getting the federal money), and they plea out possession when there's any doubt about convicting on more serious charges.