In November 2016, California gave Napster founder Sean Parker, the LA rapper Snoop Dogg and purportedly even Reverend Jessie Jackson common cause to celebrate. All three backed the state’s new law Proposition 64, which legalised Marijuana.

For Californians already convicted of marijuana possession, Proposition 64 is an even greater reason to cheer. In 2014 the state ruled that citizens can apply to have felony convictions downgraded to misdemeanours if they received them under laws that were subsequently changed. Thousands of people caught with cannabis when it was illegal could now access jobs, housing and personal finance they were previously excluded from.

But despite these legal remedies, very few are applying. In Los Angeles county, just 6% of those eligible have successfully downgraded their convictions for any offence, and the figure for marijuana offences is likely even lower. Now San Francisco is trying to crack the problem by using technology to automatically write-off citizens’ marijuana convictions.

• For more like this, see our digital government newsfeed.

Cracking the code

Very few of those with marijuana convictions are aware they can change their record. Even when they are aware, applying to do so is difficult, said Evonne Silva, from the Code for America (CfA) team working with the city on the problem. “It costs money, and it is a complicated process,” she said.

CfA’s solution is to make the process automatic. “What we're doing is taking all of the onus off the people to apply,” said Paras Sanghavi, technical lead on the project.

In early 2018, CfA and San Francisco’s District Attorney began building software that will read through the city’s prosecution records, or “rap sheets”, for marijuana convictions. The computer program will work out which offences are eligible for downgrading and automatically fill out the forms required to do it. Officials in the DA’s office can then process these quickly and easily.

Criminal convictions are difficult to process because they are recorded in unformatted text files. But the basic component of the new software is a language processing tool; by training the software on existing files, the software learns what language refers to marijuana convictions. It then uses this to automatically search records for the relevant criteria. Sanghavi and his team hope to have a working tool by June or July.

Coding the law

The partnership with San Francisco is just one part of a wider CfA campaign, called “Clear my Record”. Since 2015 the organisation has been building tools to connect applicants to legal aid, and increase the number of record-clearing applications. It is also working with several other counties in California, and aims to clear 250,000 eligible convictions by 2019.

But when dealing with other kinds of offences, it can be difficult to access the necessary documentation. Whereas all the information needed for downgrading marijuana convictions is contained in the rap sheets themselves, other crimes might require information from different reports, such as police records, which often aren’t available at a central location.

“We have the opportunity to help lawmakers write laws with automation in mind”

Even once the documents are collected, they can be incredibly difficult to parse. Because their layout is often inconsistent — for instance, in some forms criminal sentences are recorded under specifically named fields, in others as general comments — improving the accuracy of software tools is a difficult task. Sanghavi and his team have therefore been working with public defenders to access partially censored rap sheets to test them.

Building the tools could be made much easier if the law was designed for computers from the start, the CfA team believes. Writing laws so that they are machine-readable, as in a new project in New Zealand, would shorten the time engineers need to train machines to navigate inconsistent language and layouts. In the CfA’s ideal scenario, when laws change, records could be changed quickly and easily, almost in the manner of a software update.

Sanghavi sees the current campaign as an opportunity to prove the utility of this approach. “We have the opportunity to help lawmakers write laws with automation in mind,” he said. “Making sure that in the future if we were to add different remedies, that we could make sure that the data was available, not just in a human-readable way but in a machine-readable way.”

As it stands, the CfA tool will help many San Franciscans get their lives back on track. But if successful it could help make the wider case for laws to be written more clearly and consistently, helping ensure that changes aren’t lost somewhere in the system.

(Picture credit: Flickr/Thomas Hawk)

Anoush Darabi
anoush.darabi@apolitical.co