• + 0 comments

    Hi everyone,

    I am working on a test related to POS tagging on the HackerRank through Fresco Play platform(TCS learning paltform). In my code, I need to use the following line:

    import os, import nltk, os.environ['NLTK_DATA'] = os.getcwd() + "/nltk_data", nltk_pos_tags = nltk.pos_tag(words)

    However, when I run this, I get the following error:

    Attempted to load taggers/averaged_perceptron_tagger_eng I have verified that the file averaged_perceptron_tagger.pickle exists in the expected directory. Here are the details:

    Path: /tmp/submission/20250629/05/53/hackerrank-b813a3a4362460f3b4dee7f6c8755415/code/nltk_data/taggers/averaged_perceptron_tagger

    Files in directory: ['averaged_perceptron_tagger.pickle']

    Despite this, the error suggests it is looking for averaged_perceptron_tagger_eng instead of averaged_perceptron_tagger.

    Could someone please help me understand what I am doing wrong or how to fix this issue?

    Thanks in advance!