知识卡片
匹配身份与位置承担不同职责
Matcher结果包含规则ID以及起止token位置;位置用于取跨度,ID用于确定哪条规则。多规则可能命中同一范围,应先去重或定优先级;可通过词汇表字符串映射规则名,不必依赖私有归一方法。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- · 查看原书依据
The first number in a match 3-tuple is the integer ID for the match. You can find the mapping between the key “drug” and this long integer (475 …) with the matcher .normalize_key('drug') expression. The second two numbers in the match 3-tuple tell you the start and stop indices of the matched pattern in your tokenized text (doc). You can use the start and stop
参考来源
- 位置:《Natural Language Processing in Action, Second Edition》第10章《真实世界中的大语言模型》(来源项目:a19c7933-4eda-4176-aebd-30fe7e1ad292;源文件:extracted/Natural Language Processing in Action, Second Edition/_epub-src/OEBPS/Text/chapter-10.html)
- 结论依据:摘录中关于匹配身份与位置承担不同职责的定义、比较或条件支撑卡片;原书表述不严谨的范围已在覆盖记录逐项限定,不把案例结果外推为普遍结论。
- 原始内容:The first number in a match 3-tuple is the integer ID for the match. You can find the mapping between the key “drug” and this long integer (475 …) with the matcher .normalize_key('drug') expression. The second two numbers in the match 3-tuple tell you the start and stop indices of the matched pattern in your tokenized text (doc). You can use the start and stop