Checks if a given text has a named entity
Closes file after reading
Reads text from file