I have a dictionary of terms dictonery/AB.txt and a large text file dictonery/annotate.txt. 
I want to know which dictionary terms in AB.txt are in the annotate.txt file. 
Here is my code so far:
 String fileString = new String(Files.readAllBytes(Paths.get("dictonery/AB.txt")), StandardCharsets.UTF_8);
 Map<String, String> map = new HashMap<String, String>();
 String entireFileText = new Scanner(new File("dictonery/annotate.txt")).useDelimiter("\\A").next();
 map.put(fileString, "m");
 for (String key : map.keySet()) {
     if(fileString.contains(key)) {
         System.out.print(key);
     }
 }
At the moment the whole dictionery is returned. How can I get it to be the specific terms in the annotator.txt file?
 
     
     
     
    