assemblyline-v4-service 4.5.1.dev40__py3-none-any.whl → 4.5.1.dev42__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of assemblyline-v4-service might be problematic. Click here for more details.

@@ -1 +1 @@
1
- 4.5.1.dev40
1
+ 4.5.1.dev42
@@ -207,8 +207,17 @@ def detections(ocr_output: str) -> Dict[str, List[str]]:
207
207
  # Legacy support (before configurable indicator thresholds)
208
208
  terms = indicator_config
209
209
  elif isinstance(indicator_config, dict):
210
- # Set indicator threshold before variable overwrite with terms list
211
- terms = indicator_config.get("terms", [])
210
+ # Either you're exclusively overwriting the terms list or you're selectively including/excluding terms
211
+ if indicator_config.get("terms"):
212
+ # Overwrite terms list with service configuration
213
+ terms = indicator_config["terms"]
214
+ else:
215
+ included_terms = set(indicator_config.get("include", []))
216
+ excluded_terms = set(indicator_config.get("exclude", []))
217
+ # Compute the new terms list for indicator type
218
+ terms = list(set(terms).union(included_terms) - excluded_terms)
219
+
220
+ # Set the indicator hit threshold
212
221
  hit_threshold = indicator_config.get("threshold", 1)
213
222
 
214
223
  # Perform a pre-check to see if the terms even exist in the OCR text
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: assemblyline-v4-service
3
- Version: 4.5.1.dev40
3
+ Version: 4.5.1.dev42
4
4
  Summary: Assemblyline 4 - Service base
5
5
  Home-page: https://github.com/CybercentreCanada/assemblyline-v4-service/
6
6
  Author: CCCS Assemblyline development team
@@ -1,4 +1,4 @@
1
- assemblyline_v4_service/VERSION,sha256=8x67druxrzIHU7-1HGjeuWl1gzFpEq8AjIjrOu642uM,12
1
+ assemblyline_v4_service/VERSION,sha256=JDyeR86lFrbTtJdpRv0mdNgwH38j6QOC1ATU7oSyfMY,12
2
2
  assemblyline_v4_service/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  assemblyline_v4_service/healthz.py,sha256=sS1cFkDLw8hUPMpj7tbHXFv8ZmHcazrwZ0l6oQDwwkQ,1575
4
4
  assemblyline_v4_service/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -8,7 +8,7 @@ assemblyline_v4_service/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5
8
8
  assemblyline_v4_service/common/api.py,sha256=Xzp8j4HCCfjPvNSGKiZl5ttH2_Itg47cjlH0NXNtth0,6849
9
9
  assemblyline_v4_service/common/base.py,sha256=mKkkzbxVL_wVMy_VieU9mlHYLqZXndga_4dWWbnEnx8,14045
10
10
  assemblyline_v4_service/common/helper.py,sha256=xs9quuf-M1JOdKieBqOmWaOece0CtzXFhhe85xQYmuY,3289
11
- assemblyline_v4_service/common/ocr.py,sha256=XHHD0bOKu7DdBEMQ3sPZxQjp4K4G3js_Ib2GKWD6Xuw,7897
11
+ assemblyline_v4_service/common/ocr.py,sha256=A8OnjpEor-S3OUC_jZzJ-Er3KKAsMdQLEXTtMS81Xbk,8397
12
12
  assemblyline_v4_service/common/ontology_helper.py,sha256=QpwerYoS5hXjWzpx3Pmwv6j2330PQVYqxYGamjcpW3I,7890
13
13
  assemblyline_v4_service/common/request.py,sha256=XXBafAQCV43_OBLXOSHxYoDHmqwERBkNul8fb_X6Ves,11774
14
14
  assemblyline_v4_service/common/result.py,sha256=9AqM6qCYiia_Bpyn_fBFhzNQMcqJbtFSiGjp57fXW2E,32713
@@ -38,8 +38,8 @@ test/test_common/test_request.py,sha256=wxSwnOj-_YOv2SuZjOJsw09q8A7p8GJmJuK4vozq
38
38
  test/test_common/test_result.py,sha256=Wm0Cs5kZRzlZr0jL-l8OTsYAvkoN2eaB3NkeXzvyssI,42208
39
39
  test/test_common/test_task.py,sha256=jnfF68EgJIu30Pz_4jiJHkncfI-3XpGaut5r79KIXOA,18718
40
40
  test/test_common/test_utils.py,sha256=TbnBxqpS_ZC5ptXR9XJX3xtbItD0mTbtiBxxdyP8J5k,5904
41
- assemblyline_v4_service-4.5.1.dev40.dist-info/LICENCE.md,sha256=NSkYo9EH8h5oOkzg4VhjAHF4339MqPP2cQ8msTPgl-c,1396
42
- assemblyline_v4_service-4.5.1.dev40.dist-info/METADATA,sha256=Yn--i8CBZsOaXL-yaa-2WF2n5rlVaEYpdNmh6a1K6XY,9498
43
- assemblyline_v4_service-4.5.1.dev40.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
44
- assemblyline_v4_service-4.5.1.dev40.dist-info/top_level.txt,sha256=LpTOEaVCatkrvbVq3EZseMSIa2PQZU-2rhuO_FTpZgY,29
45
- assemblyline_v4_service-4.5.1.dev40.dist-info/RECORD,,
41
+ assemblyline_v4_service-4.5.1.dev42.dist-info/LICENCE.md,sha256=NSkYo9EH8h5oOkzg4VhjAHF4339MqPP2cQ8msTPgl-c,1396
42
+ assemblyline_v4_service-4.5.1.dev42.dist-info/METADATA,sha256=phuF0_lUGvn6DV0BtEMS1MTK4KeoS7ik26b7sd0d8-c,9498
43
+ assemblyline_v4_service-4.5.1.dev42.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
44
+ assemblyline_v4_service-4.5.1.dev42.dist-info/top_level.txt,sha256=LpTOEaVCatkrvbVq3EZseMSIa2PQZU-2rhuO_FTpZgY,29
45
+ assemblyline_v4_service-4.5.1.dev42.dist-info/RECORD,,