Lawyers are the professionals everyone loves to loathe. Jokes about attorneys abound, and Shakespeare’s line from Henry VI remains a cultural favorite: ”The first thing we do, let’s kill all the lawyers.”

Soon, that dream may come true, and machines will be the ones to do it.

Academically trained attorneys are increasingly being replaced by technology to analyze evidence and assess it for relevance in investigations, lawsuits, compliance efforts, and more. Forty percent of more than 100 in-house attorneys in major American corporations told the industry publication Corporate Counsel, in a survey published on Jan. 23, that they rely on technology assisted review (TAR).

Technology assisted review (TAR) is a term that covers many different aspects of machine reading, including analytics, predictive coding, and more. Predictive coding uses patterns of human responses to “train machines to read” and decide if documents are relevant to a legal matter, ostensibly as attorneys would. So, rather than having many lawyers read a million documents, a few review a percentage of the possible evidence and predictive coding technology uses those answers to guide a computer review of the rest. This eliminates the need for all but a few lawyers to review evidence and assess it, then train machines, rather than lawyers with training eyeballing all the documents.

As the Wall Street Journal asked in 2012, “Why hire lawyers? Computers are cheaper.”

Law firms and corporate counsel now often hire electronic discovery companies who manage these sorts of computerized reviews, like Update Legal—formerly a staffing firm—and Epiq Systems. These e-discovery companies then hire attorneys on an hourly, per-project basis and provide the law firms with the software and technological expertise needed to run reviews; the human lawyers then review the documents that haven’t been eliminated.

The legal industry has rapidly taken to the trend. The first mention of machine reviews was in a 2005 article discussing statistical approaches to evidence reviews. Less than a decade later, TAR had taken over the industry, and no one seemed to be lamenting the loss of lawyers—not even lawyers.

“Overall, the myth that exhaustive manual review is the most effective—and therefore the most defensible—approach to document review is strongly refuted,” lawyers wrote in 2009 in the Richmond Journal of Law and Technology. “Technology-assisted review can (and does) yield more accurate results than exhaustive manual review, with much lower effort.” And of course, with much less money spent: their study found that TAR produced a 50-fold savings in cost over manual review.

In 2012, a federal judge in New York District Court, Andrew Peck, issued the first judicial opinion in the US endorsing the use of TAR in a pending case, Da Silva Moore v. Publicis Groupe, writing, “Computer-assisted review appears to be better than the available alternatives, and thus should be used in appropriate cases.”

Whether or not machines are always substantively superior to humans is arguable. Human readers accumulate knowledge over the course of a review and can use this context to inform their document analyses, which are likely to be more nuanced than what you get from a machine because there are distinctly human nuances of language, including context, that machines have not yet grasped, and may never.

Another way to look at it: just as an automobile is not always the best mode of transport for every situation, predictive coding isn’t right for every review. Sometimes human readers, assisted by keyword searches, may be a more appropriate tool, depending on the specifics of a matter and the issues at stake. In a 2012 Forbes story on TAR, Matthew Gibson noted, “Even though automobiles represent a newer mode of transport than horses, a horse would certainly prove to be a more effective means for reaching a high mountain lake without roadways…predictive coding is one of many tools that should be included in the litigator’s tool belt.”

Nevertheless, reliance on machines for discovery is now standard practice and law schools are preparing their students by teaching courses on e-discovery, which some students have lamented as offensive and a sign of their dismal futures doing nothing but legal document review.

That might be (slightly) misplaced blame; it seems law graduates will be lucky to have any work at all in coming years. “Between the faltering economy caused by the 2008 recession, globalization, increased law school class sizes and enrollment, and emerging technologies that level the playing field between small and large law firms, the number of legal jobs have declined while competition for clients has increased,” wrote Above the Law in 2016.

Some say e-discovery represents the sole hope most lawyers have to find work. “In the past decade, the legal profession has gone through an identity crisis of sorts,” observed Christopher Gallagher, national director of eQ Discovery Services, an e-discovery company, in a 2015 article in Bloomberg Law. Most licensed attorneys have seen significant decreases in their yearly income, he continued. Meanwhile, e-discovery has boomed, so lawyers may find work managing reviews in the employ of this type of tech company, like Gallagher himself did. The market is expected to reach $9.9 billion in 2017. According to Gallagher, “It’s an industry game changer.”

There is little doubt that reliance on machines for assistance in legal matters will only grow. “We are still in early days in terms of the adoption and use of various types of data analytics for discovery purposes,” George Socha, managing director at BDO Consulting told Corporate Counsel. “But I’d say at the same time the rate of adoption is increasing. These types of approaches are being accepted far more than they were a year ago and especially two or five years ago.”

No one will be spared, it seems. A joke “FantasySCOTUS” algorithm, created by Josh Blackman, a professor at the South Texas College of Law, predicts Supreme Court case outcomes, and was later developed into a more sophisticated model. As OZY noted in an article on legal automation in 2015, “The better the world gets at simulating the outcome of your labors, the more redundant you start to appear.” One day then, the publication predicted, even John Roberts, chief justice in the US Supreme Court, may be replaced by Chief Justice Robot.