Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add saving and loading corpus/stopwords to Tokenizer and add integration to HF Hub via bm25s.hf.TokenizerHF (save/load) #59

Merged
merged 3 commits into from
Sep 22, 2024

Conversation

xhluca
Copy link
Owner

@xhluca xhluca commented Sep 22, 2024

  • Add Tokenizer.save_vocab and Tokenizer.load_vocab methods to save/load vocabulary to a json file called vocab.tokenizer.json by default
  • Add Tokenizer.save_stopwords and Tokenizer.load_stopwords methods to save/load stopwords to a json file called stopwords.tokenizer.json by default
  • Add TokenizerHF class to allow saving/loading from huggingface hub
    • New function: load_vocab_from_hub, save_vocab_to_hub, load_stopwords_from_hub, save_stopwords_to_hub

@xhluca xhluca merged commit 1e636a9 into main Sep 22, 2024
2 checks passed
@xhluca xhluca deleted the add-saving-loading-to-tokenizer branch September 22, 2024 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant