RED-6368: Include Tables and Images into Prototype Document Structure
*added some starting rules
This commit is contained in:
parent
dc76e581c4
commit
33d47e5202
@ -26,16 +26,16 @@ rule "1: Redact CBI_author"
|
||||
FileAttribute(label == "Vertebrate Study" , value.toLowerCase() == "yes")
|
||||
entity: EntityNode(type == "CBI_author")
|
||||
then
|
||||
entity.setRedact(true);
|
||||
entity.setRedaction(true);
|
||||
update(entity)
|
||||
end
|
||||
|
||||
rule "2: do not redact genitive CBI_author"
|
||||
|
||||
when
|
||||
entity: EntityNode(type == "CBI_author", anyMatch(textAfter, "['’’'ʼˈ´`‘′ʻ’']s"), redact == true)
|
||||
entity: EntityNode(type == "CBI_author", anyMatch(textAfter, "['’’'ʼˈ´`‘′ʻ’']s"), redaction == true)
|
||||
then
|
||||
entity.setRedact(false);
|
||||
entity.setRedaction(false);
|
||||
entity.setEntityType(EntityType.FALSE_POSITIVE);
|
||||
update(entity)
|
||||
end
|
||||
|
||||
@ -3,7 +3,7 @@ package drools
|
||||
import java.util.Set;
|
||||
|
||||
import com.iqser.red.service.redaction.v1.server.settings.RedactionServiceSettings;
|
||||
import com.iqser.red.service.redaction.v1.server.redaction.model.*
|
||||
import com.iqser.red.service.redaction.v1.server.redaction.model.*;
|
||||
|
||||
global RedactionServiceSettings redactionServiceSettings;
|
||||
global Dictionary dictionary;
|
||||
|
||||
@ -1,40 +0,0 @@
|
||||
package drools
|
||||
|
||||
import static java.lang.String.format;
|
||||
import static com.iqser.red.service.redaction.v1.server.document.services.RegexMatcher.anyMatch;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.LinkedList;
|
||||
import java.util.HashSet;
|
||||
|
||||
import com.iqser.red.service.redaction.v1.server.document.graph.*
|
||||
import com.iqser.red.service.redaction.v1.server.document.graph.nodes.*
|
||||
import com.iqser.red.service.redaction.v1.server.redaction.model.EntityType;
|
||||
import com.iqser.red.service.redaction.v1.model.FileAttribute;
|
||||
import com.iqser.red.service.redaction.v1.model.Engine;
|
||||
import com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.type.DictionaryEntry;
|
||||
import com.iqser.red.service.redaction.v1.server.redaction.utils.EntitySearchUtils;
|
||||
import java.util.Set;
|
||||
global DocumentGraph document
|
||||
|
||||
|
||||
|
||||
rule "1: Redact CBI_author"
|
||||
|
||||
when
|
||||
FileAttribute(label == "Vertebrate Study" && (value.toLowerCase() == "yes"))
|
||||
entity: EntityNode(type == "CBI_author")
|
||||
then
|
||||
entity.setRedact(true);
|
||||
update(entity)
|
||||
end
|
||||
|
||||
rule "2: do not redact genitive CBI_author"
|
||||
|
||||
when
|
||||
entity: EntityNode(type == "CBI_author", anyMatch("['’’'ʼˈ´`‘′ʻ’']s", textAfter))
|
||||
then
|
||||
entity.setRedact(false);
|
||||
entity.setEntityType(EntityType.FALSE_POSITIVE);
|
||||
update(entity)
|
||||
end
|
||||
Loading…
x
Reference in New Issue
Block a user