Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<alvisnlp-plan id="ner-taxa">
<param name="taxaDict">
<alias module="dict" param="dictFile"/>
</param>
<param name="compiledDict">
<alias module="dict" param="trieSource"/>
</param>
<param name="sectionFilter">
<alias module="dict" param="sectionFilter"/>
</param>
<dict class="TabularProjector">
<targetLayerName>ambiguousTaxa</targetLayerName>
<matchStartCaseInsensitive/>
<valueFeatures>,taxid,canonical-name,path,pos,rank,species-taxid,species-name</valueFeatures>
<constantAnnotationFeatures>source=NCBI</constantAnnotationFeatures>
</dict>
<disambiguate>
<not-ambiguous class="Action">
<target>documents.sections.layer:ambiguousTaxa</target>
<action>$[not span:ambiguousTaxa].(add:taxa|remove:ambiguousTaxa|set:feat:disambiguation("not-ambiguous"))</action>
<addToLayer/>
<removeFromLayer/>
<setFeatures/>
</not-ambiguous>
<disambiguate-coreferences class="Action">
<target>documents.sections.layer:ambiguousTaxa</target>
<action>$[(section.nav:sections-before.layer:taxa|before:taxa)[@taxid == target.@taxid]].
(add:taxa|remove:ambiguousTaxa|span:ambiguousTaxa.remove:ambiguousTaxa|set:feat:disambiguation("coreference"))</action>
<addToLayer/>
<removeFromLayer/>
<setFeatures/>
</disambiguate-coreferences>
<disambiguate-coreference-more-general class="Action">
<target>documents.sections.layer:ambiguousTaxa</target>
<action>$[(section.nav:sections-before.layer:taxa|before:taxa)[@path ^= target.@path and @rank == "genus"]].
(add:taxa|remove:ambiguousTaxa|span:ambiguousTaxa.remove:ambiguousTaxa|set:feat:disambiguation("is-general"))</action>
<addToLayer/>
<removeFromLayer/>
<setFeatures/>
</disambiguate-coreference-more-general>
<disambiguate-coreferences-more-specific class="Action">
<target>documents.sections.layer:ambiguousTaxa</target>
<action>$[(section.nav:sections-before.layer:taxa|before:taxa) as gen.$[target.@path ^= @path and not target.span:ambiguousTaxa[@path ^= gen.@path]]].
(add:taxa|remove:ambiguousTaxa|span:ambiguousTaxa.remove:ambiguousTaxa|set:feat:disambiguation("is-specific"))</action>
<addToLayer/>
<removeFromLayer/>
<setFeatures/>
</disambiguate-coreferences-more-specific>
<remove-disambiguated class="Action">
<target>documents.sections.layer:ambiguousTaxa</target>
<action>$[span:taxa].remove:ambiguousTaxa</action>
<removeFromLayer/>
</remove-disambiguated>
<report-ambiguous class="Action">
<target>documents.sections.layer:ambiguousTaxa</target>
<action>module:log("Ambiguous taxon in " ^ section.document.@id ^ "/" ^ section.@name ^ " at " ^ start ^ "-" ^ end ^ ": " ^ @form ^ " -> " ^ @taxid ^ " (" ^ @canonical-name ^ ")")</action>
</report-ambiguous>
</disambiguate>
</alvisnlp-plan>