Paths in AWS lambda with Python NLTK

后端 未结 3 642
时光说笑
时光说笑 2021-01-03 03:00

I\'m encountering problems with the NLTK package in AWS Lambda. However I believe the issue is related more to path configurations in Lambda being incorrect. NLTK is having

3条回答
  •  春和景丽
    2021-01-03 03:23

    Seems your current Python code runs from /var/task. I would suggest trying (haven't tried myself):

    nltk.data.path.append("/var/task/nltk_data")
    

提交回复
热议问题