|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gbif.ecat.parser.NameParser
public class NameParser
| Field Summary | |
|---|---|
protected static String |
all_letters_numbers
|
protected static String |
AUTHOR
|
protected static String |
author_letters
|
protected static String |
AUTHOR_LETTERS
|
protected static String |
AUTHOR_PREFIXES
|
protected static String |
AUTHOR_TEAM
|
protected static Pattern |
AUTHOR_TEAM_PATTERN
|
static Pattern |
CANON_NAME_IGNORE_AUTHORS
|
protected static Pattern |
CULTIVAR
|
boolean |
debug
|
protected static String |
EPHITHET
|
protected static String |
EPHITHET_PREFIXES
|
protected static Pattern |
EXTRACT_NOMSTATUS
|
static Pattern |
HYBRID_FORMULA_PATTERN
|
static String |
HYBRID_MARKER
|
protected static String |
INFRAGENERIC
|
static Pattern |
IS_VIRUS_PATTERN
|
protected static Logger |
log
|
protected static String |
MONOMIAL
|
protected static String |
name_letters
|
protected static String |
NAME_LETTERS
|
static Pattern |
NAME_PATTERN
|
protected static String |
RANK_MARKER_SPECIES
|
protected static String |
YEAR
|
| Constructor Summary | |
|---|---|
NameParser()
|
|
| Method Summary | ||
|---|---|---|
void |
addMonomials(Set<String> monomials)
|
|
protected static String |
cleanStrong(String name)
A very optimistic cleaning intended for names potentially very very dirty |
|
Set<String> |
getMonomials()
|
|
static void |
main(String[] args)
|
|
static String |
normalize(String name)
Carefully normalizes a scientific name trying to maintain the original as close as possible. |
|
protected static String |
normalizeStrong(String name)
Does the same as a normalize and additionally removes all ( ) and "und" etc Checks if a name starts with a blacklisted name part like "Undetermined" or "Uncertain" and only returns the blacklisted word in that case so its easy to catch names with blacklisted name parts. |
|
|
parse(String scientificName)
Fully parse the supplied name also trying to extract authorships. |
|
String |
parseToCanonical(String scientificName)
parses the name without authorship and returns the ParsedName.canonicalName() string |
|
protected static String |
preClean(String name)
basic careful cleaning, trying to preserve all parsable name parts |
|
void |
readMonomialsRsGbifOrg()
Read generic and suprageneric names from rs.gbif.org dictionaries and feed them into nameparser for monomial references. |
|
void |
setMonomials(Set<String> monomials)
Provide a set of case insensitive words that indicate a true monomial to detect a taxonomic subrank instead of an author. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static Logger log
public boolean debug
protected static final String NAME_LETTERS
protected static final String name_letters
protected static final String AUTHOR_LETTERS
protected static final String author_letters
protected static final String all_letters_numbers
protected static final String AUTHOR_PREFIXES
protected static final String AUTHOR
protected static final String AUTHOR_TEAM
protected static final Pattern AUTHOR_TEAM_PATTERN
protected static final String YEAR
protected static final String RANK_MARKER_SPECIES
protected static final String EPHITHET_PREFIXES
protected static final String EPHITHET
protected static final String MONOMIAL
protected static final String INFRAGENERIC
public static final String HYBRID_MARKER
public static final Pattern HYBRID_FORMULA_PATTERN
protected static final Pattern CULTIVAR
public static final Pattern IS_VIRUS_PATTERN
protected static final Pattern EXTRACT_NOMSTATUS
public static final Pattern CANON_NAME_IGNORE_AUTHORS
public static final Pattern NAME_PATTERN
| Constructor Detail |
|---|
public NameParser()
| Method Detail |
|---|
protected static String cleanStrong(String name)
name - To normalize
public static void main(String[] args)
public static String normalize(String name)
name - To normalize
protected static String normalizeStrong(String name)
name - To normalize
protected static String preClean(String name)
name -
public void addMonomials(Set<String> monomials)
public Set<String> getMonomials()
public <T> ParsedName<T> parse(String scientificName)
throws UnparsableException
scientificName -
UnparsableExceptionpublic String parseToCanonical(String scientificName)
scientificName -
public void readMonomialsRsGbifOrg()
public void setMonomials(Set<String> monomials)
monomials -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||