Learning About the Term Structure and Optimal Rules for Inflation Targeting