Untitled

mail@pastecode.io avatar
unknown
plain_text
10 months ago
2.1 kB
3
Indexable
Never
Traceback (most recent call last):
  File "train_model.py", line 128, in <module>
    df_act_context=data_pre_processing_context(df_act_context)  ## Changes made here
  File "/CAPE_AIML/CAPE_USER_RECOMMENDATION/Code/feature_engineering.py", line 147, in data_pre_processing_context
    data['Nouns'] = data['concatenated_string'].apply(noun_extraction)
  File "/CAPE_AIML/venv/CAPEANALYTICS/lib/python3.6/site-packages/pandas/core/series.py", line 4213, in apply
    mapped = lib.map_infer(values, f, convert=convert_dtype)
  File "pandas/_libs/lib.pyx", line 2403, in pandas._libs.lib.map_infer
  File "/CAPE_AIML/CAPE_USER_RECOMMENDATION/Code/feature_engineering.py", line 166, in noun_extraction
    nouns = [word for (word, pos) in nltk.pos_tag(tokenized) if is_noun(pos)]
  File "/CAPE_AIML/venv/CAPEANALYTICS/lib/python3.6/site-packages/nltk/tag/__init__.py", line 165, in pos_tag
    tagger = _get_tagger(lang)
  File "/CAPE_AIML/venv/CAPEANALYTICS/lib/python3.6/site-packages/nltk/tag/__init__.py", line 107, in _get_tagger
    tagger = PerceptronTagger()
  File "/CAPE_AIML/venv/CAPEANALYTICS/lib/python3.6/site-packages/nltk/tag/perceptron.py", line 167, in __init__
    find("taggers/averaged_perceptron_tagger/" + PICKLE)
  File "/CAPE_AIML/venv/CAPEANALYTICS/lib/python3.6/site-packages/nltk/data.py", line 583, in find
    raise LookupError(resource_not_found)
LookupError:
**********************************************************************
  Resource averaged_perceptron_tagger not found.
  Please use the NLTK Downloader to obtain the resource:

  >>> import nltk
  >>> nltk.download('averaged_perceptron_tagger')

  For more information see: https://www.nltk.org/data.html

  Attempted to load taggers/averaged_perceptron_tagger/averaged_perceptron_tagger.pickle

  Searched in:
    - '/root/nltk_data'
    - '/CAPE_AIML/venv/CAPEANALYTICS/nltk_data'
    - '/CAPE_AIML/venv/CAPEANALYTICS/share/nltk_data'
    - '/CAPE_AIML/venv/CAPEANALYTICS/lib/nltk_data'
    - '/usr/share/nltk_data'
    - '/usr/local/share/nltk_data'
    - '/usr/lib/nltk_data'
    - '/usr/local/lib/nltk_data'