Views
No views yet
J-Raposo/code-search-net-tokenizerJ-Raposo)mit, apache-2.0]python subset (loaded with datasets.load_dataset("code_search_net", "python")). It aims to produce more meaningful sub-token splits for Python source code by (a) preserving punctuation and operators as informative tokens, (b) reducing excessive fragmentation of common identifiers and API names, and (c) handling docstrings and comments so that natural language context is preserved for downstream models.python subset (loaded via datasets.load_dataset("code_search_net", "python")).tokenizers fast API).tokenizer_config.json in the repo lists them.tokenizer.json (preferred tokenizers fast format) or vocab.json + merges.txt (legacy), and tokenizer_config.json.1from transformers import AutoTokenizer
2
3tokenizer = AutoTokenizer.from_pretrained("J-Raposo/code-search-net-tokenizer", use_fast=True)
4
5code = "def add(a, b):\n return a + b"
6enc = tokenizer(code, return_tensors="pt")
7print(enc)