spm_train.py 345 B

123456789101112
  1. #!/usr/bin/env python3
  2. # Copyright (c) Facebook, Inc. and its affiliates.
  3. # All rights reserved.
  4. #
  5. # This source code is licensed under the license found in the
  6. # https://github.com/pytorch/fairseq/blob/master/LICENSE
  7. import sys
  8. import sentencepiece as spm
  9. if __name__ == "__main__":
  10. spm.SentencePieceTrainer.Train(" ".join(sys.argv[1:]))