Downloads · 30 days
272
0% of all-time downloads
eunsour/en-ko-transliterator
en-ko-transliterator is a machine learning model from eunsour. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as apache-2.0.
Downloads · 30 days
272
0% of all-time downloads
All-time downloads
103K
Public
Parameters
582M
4.7 GB on disk
Likes
6
Public
Click a slice to open those files.
.bin2.3 GB · 50%
From the Hugging Face model README
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
def transliteration(word: str):
model_checkpoint = "eunsour/en-ko-transliterator"
model = AutoModelForSeq2SeqLM.from_pretrained(model_checkpoint)
tokenizer = AutoTokenizer.from_pretrained(model_checkpoint, src_lang="en", tgt_lang="ko")
encoded_en = tokenizer(word, truncation=True, max_length=48, return_tensors="pt")
generated_tokens = model.generate(**encoded_en)
result = tokenizer.batch_decode(generated_tokens, skip_special_tokens=True)
return result
transliteration("transformer")
# ['트랜스포머']