Hi, I run this code based on my own dataset and I created kenlm.apra file based on that dataset. In this part of the code in kenlm_model.py file
try: print('Building a model, cmd: {}'.format(cmd)) subprocess.call(cmd, shell=True) print('Built kenlm model, N = {}, path: {}'.format(params['N'], params['modelp'])) model = kenlm.Model(params['modelp']) print("::::::::::::::: " , model) return cls(model) except Exception as e: print(e) print('Can\'t build kenlm model, probably because of lack of memory, try to change -S') return None
I got this error and exception:
Cannot read model '/content/drive/MyDrive/awant/kenlm/tmp/tmp_knlm.arpa' (End of file Byte: 0)
Can't build kenlm model, probably because of lack of memory, try to change -S
How can I fix this? What is -S parameter?
Thanks
Hi, I run this code based on my own dataset and I created kenlm.apra file based on that dataset. In this part of the code in kenlm_model.py file
try: print('Building a model, cmd: {}'.format(cmd)) subprocess.call(cmd, shell=True) print('Built kenlm model, N = {}, path: {}'.format(params['N'], params['modelp'])) model = kenlm.Model(params['modelp']) print("::::::::::::::: " , model) return cls(model) except Exception as e: print(e) print('Can\'t build kenlm model, probably because of lack of memory, try to change -S') return NoneI got this error and exception:
Cannot read model '/content/drive/MyDrive/awant/kenlm/tmp/tmp_knlm.arpa' (End of file Byte: 0)
Can't build kenlm model, probably because of lack of memory, try to change -S
How can I fix this? What is -S parameter?
Thanks