← 返回刚才阅读的位置

知识卡片

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

编译缓存不等于无需管理模式

理解等级:中级

重复使用相同模式时,引擎可复用编译缓存,显式compile也便于把模式及flags作为对象保存。缓存存在不保证任意规模动态模式都零成本;性能取决于模式、输入和引擎,不能只按正则名称推断准确性或速度。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • · 查看原书依据

      Tip Use a regular expression tokenizer when speed is more important than accuracy. If you do not need the additional linguistic tags that spaCy and other pipelines provide, your tokenizer doesn’t need to waste time trying to figure out those tags.6 And each time you use a regular expression in the re or regex packages, a compiled and optimized version of it is cached in

    参考来源

    - 位置:《Natural Language Processing in Action, Second Edition》第02章《思维的词元》(来源项目:a19c7933-4eda-4176-aebd-30fe7e1ad292;源文件:extracted/Natural Language Processing in Action, Second Edition/_epub-src/OEBPS/Text/chapter-2.html) - 结论依据:摘录中关于编译缓存不等于无需管理模式的定义、比较或条件支撑卡片;原书表述不严谨的范围已在覆盖记录逐项限定,不把案例结果外推为普遍结论。 - 原始内容:Tip Use a regular expression tokenizer when speed is more important than accuracy. If you do not need the additional linguistic tags that spaCy and other pipelines provide, your tokenizer doesn’t need to waste time trying to figure out those tags.6 And each time you use a regular expression in the re or regex packages, a compiled and optimized version of it is cached in