Actualiser app.py
This commit is contained in:
4
app.py
4
app.py
@@ -90,7 +90,7 @@ def analyze_text():
|
|||||||
logger.warning(f"Entity IBAN does not match strict IBAN regex: '{ent_text}'")
|
logger.warning(f"Entity IBAN does not match strict IBAN regex: '{ent_text}'")
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# Recadrage stricte IP_ADDRESS (IPv4 uniquement ici)
|
# Recadrage stricte IP_ADDRESS
|
||||||
if res.entity_type == "IP_ADDRESS":
|
if res.entity_type == "IP_ADDRESS":
|
||||||
match = IPV4_REGEX.search(ent_text)
|
match = IPV4_REGEX.search(ent_text)
|
||||||
if match:
|
if match:
|
||||||
@@ -110,7 +110,7 @@ def analyze_text():
|
|||||||
|
|
||||||
filtered_results.append(res)
|
filtered_results.append(res)
|
||||||
|
|
||||||
# Optionnel: ici tu peux aussi filtrer les chevauchements si tu veux
|
# Option: filtrer les chevauchements
|
||||||
|
|
||||||
response_data = [res.to_dict() for res in filtered_results]
|
response_data = [res.to_dict() for res in filtered_results]
|
||||||
return make_response(jsonify(response_data), 200)
|
return make_response(jsonify(response_data), 200)
|
||||||
|
|||||||
Reference in New Issue
Block a user