Below is the circuit I built, yet the solution has the resistor as a load resistor instead of as a current limiting resistor. I am wondering if this circuit will output this transfer function.
You're almost there... The diode network you came up with makes sense.
However, your circuit will clamp the output voltage at +0.7 and -4.7V instead of presenting a transfer function with slope=1 as requested.
Consider having the diode network in series between Vi and Vo instead. It's a good idea to have a shunt resistor on the output side to make sure Vo goes to zero between -4.7V and +0.7V.