code: private int getTokenCount(String article) {
          Pattern notWhiteSpace = Pattern.compile("\\S+");
          Matcher matcher = notWhiteSpace.matcher(article);
          int tokens = 0;
          while (matcher.find())
              tokens++;
          return tokens;
      }
docs: Returns the number of tokens in the article.