From acc5c1281b50c12e4d04c81b899410f6ca2cacac Mon Sep 17 00:00:00 2001
From: cloudroam <cloudroam>
Date: 星期二, 15 四月 2025 15:13:30 +0800
Subject: [PATCH] add: 增加航班和火车票
---
check_labels.py | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/check_labels.py b/check_labels.py
index 94f03b7..ec54cc1 100644
--- a/check_labels.py
+++ b/check_labels.py
@@ -1,4 +1,5 @@
-from ner_config import RepaymentNERConfig
+from ner_config import RepaymentNERConfig, FlightNERConfig, TrainNERConfig
+
# 脚本:校验非法格式
@@ -6,14 +7,14 @@
label_set = set()
line_num = 0
- with open(RepaymentNERConfig.DATA_PATH, 'r', encoding='utf-8') as f:
+ with open(FlightNERConfig.DATA_PATH, 'r', encoding='utf-8') as f:
for line in f:
line_num += 1
line = line.strip()
if line:
try:
_, label = line.split(maxsplit=1)
- if label not in RepaymentNERConfig.LABELS:
+ if label not in FlightNERConfig.LABELS:
print(f"行 {line_num}: 发现非法标签 '{label}'")
label_set.add(label)
except Exception as e:
--
Gitblit v1.9.3