Inference for Regression with Variables Generated from Unstructured Data