Wow, thanks so much for sharing! My code is in Python so I can't reuse yours directly, but will certainly take a look and see if I can learn anything and use some ideas, if you're OK with that.
You're correct that currently I'm not paying attention to rows/columns to predict each case. I do "fix" a lot of cells, but mostly due to notation variants or errors, missing or wrong symbols, extra characters and comments, etc. If an alg solves the wrong case for its cell, it gets assigned to the case it does solve. If an alg doesn't do anything useful, it's marked as unknown. Many of the remaining unknowns are, as you've said, things like [R D R, U'] or [R' D R, D] or M U2 M U2.
I did put some thought into how to fix unknown algs and detect algs that are wrong for the case, and considered both checking rows/columns and simply looking to adjacent cells for hints. After looking through the unknowns to see what kinds of errors there were, I wasn't convinced I could consistently and reliably determine what the author intended, and wasn't yet convinced that auto-fixing algs was an appropriate thing for my site to do anyway, so I decided for now to put all the unknowns into a separate Google sheet where I could invite the authors and wider community to comment to add fixes. That's still my plan, although I haven't got round to it yet.
I will certainly have a look at your code to see if it will change my mind about whether I can reliably fix some algs automatically. Definitely there are some for which it could be quite easy if the expected case can be predicted from the cell. I might run some tests to see what proportion those are, and evaluate the results to see if they are sensible.
Many thanks again for sharing.