The serial version

We have implemented the serial version of our keyword algorithm in the SerialKeywordExtraction class. It defines the main() method you are going to execute to test the algorithm.

The first step is to declare the following necessary internal variables to execute the algorithm:

  • Two Date objects to measure the execution time
  • A string to store the name of the directory that contains the document collection
  • An array of File objects to store the files with the document collection
  • A HashMap to store the global vocabulary of the document collection
  • A HashMap to store the keywords
  • Two int values to measure statistic data about the execution

The following includes the declaration of these variables:

public class SerialKeywordExtraction ...

Get Mastering Concurrency Programming with Java 9 - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.