Revision 11629
Added by Aaron Marcuse-Kubitza about 11 years ago
schema.sql | ||
---|---|---|
111 | 111 |
, new."Accepted_name_author" |
112 | 112 |
), ''); |
113 | 113 |
new."Is_homonym" = COALESCE(genus_is_homonym, family_is_homonym); |
114 |
new."Is_plant" = (CASE |
|
114 |
/* exclude homonyms because these are not valid matches (i.e. TNRS provides |
|
115 |
a name, but the name is not meaningful because it is not unambiguous). */ |
|
116 |
new.is_valid_match = COALESCE(CASE |
|
115 | 117 |
WHEN new."Family_score" = 1 AND NOT family_is_homonym -- exact match |
116 | 118 |
THEN true |
117 | 119 |
ELSE -- consider genus |
... | ... | |
126 | 128 |
THEN "Specific_epithet_is_plant" |
127 | 129 |
ELSE NULL -- ambiguous |
128 | 130 |
END) |
129 |
END); |
|
130 |
/* exclude homonyms because these are not valid matches (i.e. TNRS provides |
|
131 |
a name, but the name is not meaningful because it is not unambiguous). */ |
|
132 |
new.is_valid_match = COALESCE(new."Is_plant", false); |
|
131 |
END, false); |
|
133 | 132 |
new.scrubbed_taxon_name_with_author = COALESCE( |
134 | 133 |
new."Accepted_scientific_name", matched_taxon_name_with_author); |
135 | 134 |
|
... | ... | |
197 | 196 |
"Accepted_name_lsid" text, |
198 | 197 |
"Accepted_scientific_name" text, |
199 | 198 |
"Is_homonym" boolean, |
200 |
"Is_plant" boolean, |
|
201 | 199 |
is_valid_match boolean NOT NULL, |
202 | 200 |
scrubbed_taxon_name_with_author text |
203 | 201 |
); |
Also available in: Unified diff
inputs/.TNRS/schema.sql: tnrs: removed Is_plant, since this functionality is now provided by is_valid_match. note that whether a name is a plant is not meaningful for TNRS, because it can match only plant names (thus a "non-plant" is actually a non-match).