Skip to content

Clarification on Frequency Count for “s” in BPE Example (Page 91) #1

@Friend09

Description

@Friend09

image

Hi,

I was reading the Byte Pair Encoding (BPE) example on Page 91 of the book, and I have a question regarding the frequency calculation in Iteration 5.

Specifically, the frequency of the merged token “s” with is listed as 8, but the frequency of “s” is only 7 prior to the merge. Need some clarification on this
• How can “s” appear 8 times when “s” only occurs 7 times in the corpus?

Could you please clarify how this frequency was computed? Is there an additional detail about how token pairs are counted that might not be immediately apparent from the example?

Thank you for your time!
Raghu

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions