name-parser/src/main/java/org/gbif/nameparser/ParsingJob.java
/**
   * if no rank marker is set, inspect epitheta for wrongly placed rank markers and modify parsed name accordingly.
   * This is sometimes the case for informal names like: Coccyzus americanus ssp.
   */
if no rank marker is set, inspect epitheta for wrongly placed rank markers and modify parsed name accordingly.
This is sometimes the case for informal names like: Coccyzus americanus ssp.
if no rank marker is set inspect epitheta for wrongly placed rank markers and modify parsed name accordingly . This is sometimes the case for informal names like : Coccyzus americanus ssp .
private void lookForIrregularRankMarker() throws InterruptedException {
    if (pn.getRank().otherOrUnranked()) {
      if (pn.getInfraspecificEpithet() != null) {
        Matcher m = matcherInterruptable(RANK_MARKER_ONLY, pn.getInfraspecificEpithet());
        if (m.find()) {
          setRank(pn.getInfraspecificEpithet());
          pn.setInfraspecificEpithet(null);
        }
      }
      if (pn.getSpecificEpithet() != null) {
        Matcher m = matcherInterruptable(RANK_MARKER_ONLY, pn.getSpecificEpithet());
        if (m.find()) {
          setRank(pn.getSpecificEpithet());
          pn.setSpecificEpithet(null);
        }
      }
    } else if(pn.getRank() == Rank.SPECIES && pn.getInfraspecificEpithet() != null) {
      pn.setRank(Rank.SUBSPECIES);
      pn.addWarning(Warnings.SUBSPECIES_ASSIGNED);
    }
  }
private void lookForIrregularRankMarker ( ) throws InterruptedException { if ( pn . getRank ( ) . otherOrUnranked ( ) ) { if ( pn . getInfraspecificEpithet ( ) != null ) { Matcher m = matcherInterruptable ( RANK_MARKER_ONLY , pn . getInfraspecificEpithet ( ) ) ; if ( m . find ( ) ) { setRank ( pn . getInfraspecificEpithet ( ) ) ; pn . setInfraspecificEpithet ( null ) ; } } if ( pn . getSpecificEpithet ( ) != null ) { Matcher m = matcherInterruptable ( RANK_MARKER_ONLY , pn . getSpecificEpithet ( ) ) ; if ( m . find ( ) ) { setRank ( pn . getSpecificEpithet ( ) ) ; pn . setSpecificEpithet ( null ) ; } } } else if ( pn . getRank ( ) == Rank . SPECIES && pn . getInfraspecificEpithet ( ) != null ) { pn . setRank ( Rank . SUBSPECIES ) ; pn . addWarning ( Warnings . SUBSPECIES_ASSIGNED ) ; } }
if no rank marker is set, inspect epitheta for wrongly placed rank markers and modify parsed name accordingly.
if no rank marker is set inspect epitheta for wrongly placed rank markers and modify parsed name accordingly .
// we found a rank marker, make it one // we found a rank marker, make it one // sometimes sp. is wrongly used as a subspecies rankmarker