知识卡片

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

空白切分不自动剥离标点

理解等级:中级

str.split按空白得到词串,会把me,和rain.这样的标点保留在词元中。若检索只查不带标点的词就可能漏检;这并非任何任务都必须纠正的错误,保留或拆开需看模型和词表契约。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • · 查看原书依据

      The simplest way to tokenize a sentence is to use whitespace in a string as the “delimiter” of words. In Python, this can be accomplished with the standard library method split.

    参考来源

    - 位置:《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) - 结论依据:摘录中关于空白切分不自动剥离标点的定义、比较或条件支撑卡片;原书表述不严谨的范围已在覆盖记录逐项限定,不把案例结果外推为普遍结论。 - 原始内容:The simplest way to tokenize a sentence is to use whitespace in a string as the “delimiter” of words. In Python, this can be accomplished with the standard library method split.