In the nlu.yml file, I use this method to extract entities:
- regex: cardno
examples: |
- (^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)
- intent: say_name+say_cardno
examples: |
- 我叫[张三]{"entity":"name"},身份证号是[320981199205110888]{"entity":"cardno"}
- 我叫[李四]{"entity":"name"},身份证号是[320981198206110818]{"entity":"cardno"}
- 我叫[王五]{"entity":"name"},身份证号是[320981197207110777]{"entity":"cardno"}
- 我是[赵雪峰]{"entity":"name"},身份证是[321282199506212618]{"entity":"cardno"}
- 我是[高红梅]{"entity":"name"},身份证是[610114198002264135]{"entity":"cardno"}
But I need to extract two entities at the same time, such as “name,cardno”.I have an intent of “name+cardno”,but it is not possible to accurately identify all Chinese names+cardno. I tried to improve recognition accuracy by adding more corpus, but the effect was minimal. I need help.!Is there a method to match all entities that meet the rules through regularization.