1

Topic: Custom rule query

I've created a rule that checks for species that have not previously been entered into our R6 database. I took the Recommended Taxon Version Keys from R6 Nameserver, and excluded those that were present in the database leaving about 90,000 entries. However testing this against an R6 survey with 25,000 records, returned over 100 failed records, and as far as I can see there should not be any.

One example of a failed species is TVK = NBNSYS0000003162 (Herb Robert). This key is not present in the rule file, so why is RecordCleaner saying records for these species are failing the test? I clearly don't understand how the thing works!

Dave Slade
Senior IT & Records Officer,
15 Talbot Road, Talbot Green, Pontyclun, CF72 8AD
www.sewbrec.org.uk, www.sewbrecord.org.uk

2

Re: Custom rule query

Hello Dave

Which rule type are you using to check for species that are not currently in your Recorder 6 database? For the AnxillarySpecies rule type then by default the rule flags the record as failed if the species is not listed in the rule. To flag species as failed if they are in the list then the rule should be reversed by including "ReverseRule=True" in the metadata section of the rule.

Alternatively you could use the Recommended Taxon Version Keys that are in your R6 database which should produce a shorter list. In this case the rule by default should fail species that are not currently in R6

The rule types are documented in the NBN Record Cleaner verification rule guide downloadable from the NBN website (http://www.nbn.org.uk/Tools-Resources/R … rules.aspx)

Best wishes

Graham
NBN Technical Liaison Officer

3

Re: Custom rule query

This is what I was trying to use:

[Metadata]
TestType=AncillarySpecies
Group=New Species
ShortName=Check for species that are not represented in the SEWBReC database
Description=Check for species are not represented in the SEWBReC database
ErrorMsg=Records for this species should be checked
ReverseRule=True
LastChanged=20140929
[EndMetadata]

[INI]
1=This species is new to the SEWBReC database

[Data]
BMSSYS0000014257,1
etc

The RTVKs listed being the ones absent from the database - and it nearly works (127 out of 24.000 fail). If I take out the ReverseRule=True, then the majority fail!

I've obviously got my logic mixed up somewhere.

Dave Slade
Senior IT & Records Officer,
15 Talbot Road, Talbot Green, Pontyclun, CF72 8AD
www.sewbrec.org.uk, www.sewbrecord.org.uk

4

Re: Custom rule query

Hello Dave

Your logic seems correct, the rule format looks OK to me. As far as I can see the records should only be failing if their recommended taxonversionkeys are on the list of taxonversionkeys in  the rule.

Best wishes

Graham
NBN Technical Liaison Officer

5

Re: Custom rule query

Thanks Graham. I guess the next step is to make sure they really are the recommended TVKs - perhaps some changes here have passed me by somewhere. At least I know I'm on the right track.

Dave

Dave Slade
Senior IT & Records Officer,
15 Talbot Road, Talbot Green, Pontyclun, CF72 8AD
www.sewbrec.org.uk, www.sewbrecord.org.uk

6

Re: Custom rule query

Nope, I'm going to have to give up on this. Some of the false positives from the results are indeed due to the logic used to generate the list in the first place, but 'NBNSYS0000003162' is the RTVK for Herb Robert, my records use this RTVK, and this key is not present in my Cleaner Rule, so the species should pass the rule, and yet it fails all records of this species.

Dave Slade
Senior IT & Records Officer,
15 Talbot Road, Talbot Green, Pontyclun, CF72 8AD
www.sewbrec.org.uk, www.sewbrecord.org.uk