fix issue
This commit is contained in:
parent
3160231280
commit
51efb77261
|
|
@ -113,7 +113,7 @@ class IdentityCardExtractor(Extractor):
|
|||
result["name"] = name.group(1).strip()
|
||||
tempName = result["name"]
|
||||
if tempName.startswith("名"):
|
||||
result["name"] = text[len("名"):]
|
||||
result["name"] = tempName[len("名"):]
|
||||
|
||||
# 提取民族
|
||||
ethnicity = re.search(r"民\s*(族|旅)\s*(\S+)", text, re.DOTALL)
|
||||
|
|
@ -382,7 +382,21 @@ class IdentityCardExtractor(Extractor):
|
|||
# 23
|
||||
# 公民身份号码
|
||||
# 430281197011090090"""
|
||||
|
||||
# text = """中华人民共和国
|
||||
# 居民身份证
|
||||
# 签发机关湘乡市公安局
|
||||
# 有效期限2016.01.25-2036.01.25
|
||||
# 名李绍光
|
||||
# 性别男
|
||||
# 民族汉
|
||||
# 出
|
||||
# 生
|
||||
# 1983年11月24日
|
||||
# 住址
|
||||
# 湖南省湘乡市山枣镇龙泉
|
||||
# 村峡山口村民组156号
|
||||
# 公民身份号码
|
||||
# 43038119831124301X"""
|
||||
# extractor = IdentityCardExtractor()
|
||||
# jsonstring = extractor.extract_textbyPaddle(text)
|
||||
# print(jsonstring)
|
||||
|
|
|
|||
Loading…
Reference in New Issue