Automatically constructing a dictionary for information extraction tasks