|
@@ -120,14 +120,13 @@ class FrontParser(Parser):
|
|
|
"""
|
|
|
|
|
|
for nation in self.result[1]:
|
|
|
- if nation is not None:
|
|
|
- txt = nation.txt
|
|
|
- conf = nation.conf
|
|
|
- res = re.findall(".*民族[\u4e00-\u9fa5]+", txt)
|
|
|
+ txt = nation.txt
|
|
|
+ conf = nation.conf
|
|
|
+ res = re.findall(".*民族[\u4e00-\u9fa5]+", txt)
|
|
|
|
|
|
- if len(res) > 0:
|
|
|
- self.res["ethnicity"] = RecItem(res[0].split("族")[-1], conf)
|
|
|
- return
|
|
|
+ if len(res) > 0:
|
|
|
+ self.res["ethnicity"] = RecItem(res[0].split("族")[-1], conf)
|
|
|
+ return
|
|
|
|
|
|
# if len(self.result[1]) == 1:
|
|
|
# txt = self.result[1][0].txt
|