...
For option 2, 3, 4 and 5 we use the method of a Python Slice.
They require a specified start and stop value to be defined. Start and stop can be integers, to define an index, or floats to define a percentage of a slice. Start and stop need to have the same type.
...
Note |
---|
IMPORTANT: Regex is quite a bit more efficient than the and/or operators. Try to use regexes as much as possible. |
Info |
---|
Note that when using different operators the where_to_search will be passed down. If on a lower level one is found, that one will be used. This way you can: |
Tag example
Document type example
Code Block |
---|
{
"type": "document_type",
"rules": [
{
"gen_id": "Bat&BallHotel",
"confidence": 100,
"rule_type": ["first"],
"+and": [
{"+rule": ["L:(?i)The Bat & Ball Hotel"]},
{"+rule": ["L:(?i)Order"]}
]
}
]
} |
FAQ
Expand |
---|
title | How can I only look in the email subject for my regex? |
---|
|
By adding the option where_to_search::search_in to your rule. An example field would look like this: Code Block |
---|
| "rules": [
{
"confidence": 97,
"+rule": ["L:noreply@contract.fit"]
"where_to_search":
{
"search_in": ["email_subject"]
}
}
] |
|
...