Code Monkey home page Code Monkey logo

Comments (2)

carlini avatar carlini commented on August 29, 2024

Yeah. This project works in byte-space, not "word"-space. If you tokenize your dataset, then you'll have to handle things yourself if you want different tokens. (If your dataset isn't that big, you can also just work in byte-space and everything will be fine and easy.)

For your specific example, you'll want to make sure to add an initial space b = " Architecturally" and everything should match what you expect. This is because most tokenizers add the space to the following word. So it's not "that" context-dependent, just what the one prior byte was.

If you want to do this properly to do word searching, you'll want to find all first tokens that contain your word and start from there. I don't know exactly how "Architecturally" is tokenized but let's pretend it's "Arch" "itect" "urally". This means you'll want to find all tokens that contain "Arch" which might be "\nArch", " Arch", "Arch", "\tArch". Then run your search for each of those followed by the remaining 2 tokens.

from deduplicate-text-datasets.

WWWonderer avatar WWWonderer commented on August 29, 2024

Hi Nicholas,

Okay thank you for prompt reply! This helps a lot and indeed by adding a space at the start I was able to find most of the sequences in SQUAD.

Have a good day!

from deduplicate-text-datasets.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.