@@ -0,0 +1,2154 @@
+/**%0A* Program input's text file does word count and then outputs text file%0A* @author  http://www.mikestratton.net%0A* @version 1.0%0A* @since   7/27/2014%0A***********************************************%0A***************REFERENCES**********************%0A***********************************************%0Ahttp://faculty.washington.edu/stepp/courses/2004autumn/tcss143/lectures/files/2004-11-10/WordCount.java%0Ahttps://www.youtube.com/watch?v=WEZRc0GoP3E%0A*/%0A%0Aimport java.util.*;%0Aimport java.io.*;%0A%0Apublic class wordCountNLP%0A%7B  %0A    public static void main(String%5B%5D args) throws FileNotFoundException %0A   %7B%0A      HashMap map = new HashMap();  %0A      Scanner console = new Scanner(System.in);           %0A      System.out.println(%22File to be read: %22);%0A      String inputFile = console.next();%0A      File file = new File(inputFile);%0A      Scanner in = new Scanner(file);%0A      %0A      while (in.hasNext()) %7B%0A         String word = in.next(); %0A            %0A            if(map.containsKey(word)) %7B%0A               Integer count = (Integer)map.get(word);%0A               map.put(word, new Integer(count.intValue() + 1));%0A            %7D           %0A            else %7B%0A               map.put(word, new Integer(1));%0A            %7D%0A       %7D%0A       %0A      Scanner output = new Scanner(System.in);           %0A      System.out.println(%22Please select output file name: %22);%0A      String outputFile = output.next();%0A      %0A%0A         ArrayList arraylist = new ArrayList(map.keySet());%0A         Collections.sort(arraylist);     %0A%0A            String fileName = outputFile;%0A            %0A            try %7B%0A               PrintWriter outputStream = new PrintWriter(fileName);%0A               for (int i = 0; i %3C arraylist.size(); i++) %0A               %7B%0A                  String key = (String)arraylist.get(i);%0A                  Integer count = (Integer)map.get(key);%0A               %0A               outputStream.println(key + %22;%22 + count);%0A               %7D   %0A               outputStream.close();%0A               System.out.println(%22Execution complete%22);%0A            %7D %0A               catch (FileNotFoundException e)%7B%0A                  e.printStackTrace(); %0A               %7D              %0A    %7D  %0A%7D%0A

Create wordCountNLP.java