知识卡片

普通读书笔记卡 · 6771.b · 生成模型:GPT-6

正则确定匹配不等于语义正确

理解等级:中级

正则对给定文本与实现给出匹配结果,确定性描述程序行为,而不是对现实句界或实体含义100%正确。回溯引擎也可能在无前后查看时出现很高耗时;不能用有限状态机的直觉为任意Python正则作性能保证。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • · 查看原书依据

      This formal grammar and finite state machine approach to pattern matching has some other awesome features. A true finite state machine is guaranteed to eventually stop (halt) in a finite number of steps. So if you use a regular expression as your pattern matcher, you know that you will always receive an answer to your question about whether you’ve found a match in your string

    参考来源

    - 位置:《Natural Language Processing in Action, Second Edition》第11章《信息抽取与知识图谱》(来源项目:a19c7933-4eda-4176-aebd-30fe7e1ad292;源文件:extracted/Natural Language Processing in Action, Second Edition/_epub-src/OEBPS/Text/chapter-11.html) - 结论依据:摘录中关于正则确定匹配不等于语义正确的定义、比较或条件支撑卡片;原书表述不严谨的范围已在覆盖记录逐项限定,不把案例结果外推为普遍结论。 - 原始内容:This formal grammar and finite state machine approach to pattern matching has some other awesome features. A true finite state machine is guaranteed to eventually stop (halt) in a finite number of steps. So if you use a regular expression as your pattern matcher, you know that you will always receive an answer to your question about whether you’ve found a match in your string