Comments (5)
Thank you for uploading the model.
Seems the the model contains a null (\0) token, implying that the training corpus contains '\0'.
One possibility is that the corpus is not encoded in utf-8. Trivial work around is to escape '\0' in the corpus into some safe character like ' '.
Anyway, I will put some workaround (or simply emitting an error) to prevent the model from having '\0'.
Thank you.
from sentencepiece.
Updated the code to refuse null character. Please try the latest spm_train.
from sentencepiece.
Thank you for using SentencePiece
Seems the model accidentally contains an empty token, which is not allowed.
How did you make/train 'm.model'. Could you upload 'm.model' so I can investigate the error?
from sentencepiece.
Thank you for this amazing repo since it makes word segmentation on Cantonese much better and easier. It is really hard to find an unsupervised method that this good in terms of accuracy, speed, and low memory usage.
Attaching the model file.
m3.model.zip
from sentencepiece.
Thanks, I will first try to encode my corpus in utf-8. Will report back to here.
from sentencepiece.
Related Issues (20)
- About the corpus used to train the vocab HOT 2
- the value Conflict. HOT 3
- [Question] How does encoding work? HOT 2
- Unable to install sentencepiece on Python 3.12 HOT 3
- Hash-pin GitHub Actions used in workflows, keep them updated with Dependabot
- What is the appropriate vocabulary length setting? HOT 1
- Ensure workflows run with minimal permissions
- Trainer incorrectly concatenating input files HOT 2
- How to use EncodeAsIds for text that contains `<s>/</s>' HOT 3
- Does bpe support num_threads parameter? HOT 2
- Adding New Argument min_freq to SentencePieceTrainer.train in Python HOT 2
- [Question] Is sentence splitting required or optional? HOT 1
- crash in absl::~Flag when used in python along with PyTorch HOT 2
- FileNotFoundError: [WinError 2] HOT 2
- ImportError: cannot import name 'SentencePieceProcessor' from 'sentencepiece' (unknown location) HOT 2
- latency 100ms HOT 1
- Error when compiling for AMD with HIP C++ compiler (`hipcc`)
- Tips for Termux installation HOT 7
- c++ API compilation problem HOT 1
- Segmentation fault (core dumped) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sentencepiece.