Hi..
So i use ELMoForManyLangs for my NLP task. I follow the way that is on
https://www.kaggle.com/realdeo/praktikum-nama-npm/notebook#Demo-Word-Embedding.
The code that i've tried is like this:
!cp -r /content/drive/MyDrive/ColabNotebooks/158
!git clone https://github.com/HIT-SCIR/ELMoForManyLangs
!pip install -e ELMoForManyLangs/
!cp/content/ELMoForManyLangs/ELMoForManyLangs/elmoformanylangs/configs/cnn_50_100_512_4096_sample.json /content/drive/MyDrive/ColabNotebooks/158/config.json
file = open("/content/drive/MyDrive/ColabNotebooks/158/config.json", "w")
teks = '{"seed": 1, "gpu": 3, "train_path": "/users4/conll18st/raw_text/Indonesian/id-20m.raw", "valid_path": null, "test_path": null, "config_path": "/users4/conll18st/elmo/configs/cnn_50_100_512_4096_sample.json", "word_embedding": null, "optimizer": "adam", "lr": 0.001, "lr_decay": 0.8, "model": "/users4/conll18st/elmo/src/final_models/id.model", "batch_size": 32, "max_epoch": 10, "clip_grad": 5, "max_sent_len": 20, "min_count": 3, "max_vocab_size": 150000, "save_classify_layer": false, "valid_size": 0, "eval_steps": 10000}'
import ELMoForManyLangs.elmoformanylangs as elmo
Initially it went well until I got an error while running this code :
e = elmo.Embedder('/content/drive/MyDrive/ColabNotebooks/158')
The error is like this :
JSONDecodeError: Expecting value: line 1 column 1 (char 0)
So how can I handle this error?
What I have tried:
to fix the error i've tried this :
e = elmo.Embedder('/content/drive/MyDrive/ColabNotebooks/158', encoding='UTF-8')
But it gives me another error :
__init__() got an unexpected keyword argument 'encoding'