SAN FRANCISCO (AP) — The San Francisco district attorney's office is partnering with the nonprofit Code for America to proactively wipe out thousands of marijuana convictions using a computer algorithm.

District Attorney George Gascon says in a statement Tuesday the partnership will help prosecutors identify those that are eligible under California's revised marijuana laws.

Gascon in January announced his office would dismiss and seal more than 3,000 misdemeanor marijuana convictions dating back to 1975 after voters approved Proposition 64 legalizing recreational marijuana for adults 21 and older.

Code for America will use its algorithm to search through San Francisco's nearly 5,000 felony cases and identify those that are eligible, which will then be reviewed by a prosecutor and submitted to the court.