Skip to content

how fix Can't build kenlm model, probably because of lack of memory, try to change -S exception #1

Description

@ATi-R

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions