code: private static boolean isName(final String _text, final boolean isFirstWord, final boolean nextWordIsName) {
          if (hasManyCaps(_text)) return true;
          else if (startsWithCap(_text)) {
              if (isFirstWord) {
                  // if the word is the first word in a sentence and
                  // ends with -ly (adv) -> consider it not a name
                  if (_text.endsWith("ly")) return false;
  
                  // we need to deal with the first word in the sentence very carefully.
                  // as we can not tell if the first word is a name by detecting upper case characters.
                  final String type_original = Dictionary.checkup(_text);
                  final String type_lowercase = Dictionary.checkup(toEngLowerCase(_text));
                  if (type_original == null) {
                      // if the word cannot be found in the dictionary, we consider it as a name entity.
                      if (type_lowercase == null) return true;
                  }
                  else if ("NNP".equals(type_original)) return true;
                  //noinspection IfMayBeConditional,SimplifiableIfStatement
                  if (startsWith(type_lowercase, "IN", "CC", "RB", "WRB"/*, "JJ"*/, ".")) return false;
                  else return nextWordIsName;
              }
              else return true;
          }
          else return false;
      }
docs: This method detects a word if it is a potential name word.