It should be fairly trivial, I outlined a solution in this thread:
https://www.mobileread.com/forums/sho...d.php?t=244255
for uppercasing roman numerals. Converting them to arabic is similar, a bit of googling will find you a python function to do the actual conversion.
The only major problem would be dealing with small numbers, the dictionary based approach will probably not work well for numbers of less than three digits, so you would need to special case them.