That is basically what we do in the federal system. Judges have to calculate sentences using a mechanical, point-based system called the U.S. Sentencing Guidelines. The judge has discretion to depart from the calculated sentence, but in practice the guideline sentence has a powerful anchoring effect.
And it's terrible. Turns out that its much easier to formulate a system with inhumanely long sentences when you're a committee developing an abstract point-scoring system than when you're an individual judge faced with deciding the fate of a living, breathing human in front of you.
However we do take account for both the letter and the spirit of the law when making a judgment, and we take account of the circumstances and the nature of the crime, the offenders and the offended parties.
We also make arguments based on the spirit of the law that do appeal to our human nature and empathy at large and this is a very important part of our legal system.
You would not want to see a judicial system where this isn't possible, you see this usually under martial law and other authoritative regimes were all crimes and all offenders are equal to the law and receive the same and often harsh punishment.
Even tho in the US the execution of the legal system might not be perfect, or quite far from it depending on how you look at it the principles of it are pretty important, if was pretty much the first legal system where we said we will not throw people to jail for being in debt, it was one of the few legal systems that did hold itself to higher standards of justice and equality.
And you can't have that with computers, not only because you can't teach them those things but because a legal system isn't some static list, it isn't the 10 commandments.
Our legal system is a living and breeding organism and judges, arbiters and lawyers are it's organs without them debating and arguing the legal system would "die". You won't have new arguments, you won't have new precedents for the most part the entire legal system would grind to a halt and the only thing you'll have remaining is a penal code.
And trust me you do not want to live under a legal system which is in a effect a static and impartial penal code.
But if we were going to go that route eventually, perhaps a system where a judge is provided the "impartial" judgment as additional information or where the decisions are reviewed by a judge before sentencing and could be lessened/cancelled but not increased?