remimorvan / knowledge-clustering

Clustering notions for the knowledge LaTeX package
MIT License
13 stars 1 forks source link

"Resource punkt not found" error when notion files contains an '@' #8

Closed remimorvan closed 2 years ago

remimorvan commented 2 years ago

If the notion file contains a notion with a scope, e.g.

\knowledge{notion}
    | tree-width@graph

then calling knowledge clusterwill produce the error

Resource punkt not found.
  Please use the NLTK Downloader to obtain the resource:

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

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

  Attempted to load tokenizers/punkt/PY3/e.pickle

  Searched in:
    - '/Users/rmorvan/nltk_data'
    - '/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/nltk_data'
    - '/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/share/nltk_data'
    - '/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/lib/nltk_data'
    - '/usr/share/nltk_data'
    - '/usr/local/share/nltk_data'
    - '/usr/lib/nltk_data'
    - '/usr/local/lib/nltk_data'
    - ''
**********************************************************************

This bug seems to only exist since v.0.3 : v.0.2.4 works fine.

remimorvan commented 2 years ago

Fixed in v.0.3.2.

LeonPyramid commented 9 months ago

Seems to be back in v 0.6.0

remimorvan commented 9 months ago

Seems to be back in v 0.6.0

It works fine on my computer. Have you run knowledge init after installing knowledge-clustering ?

LeonPyramid commented 9 months ago

Solved by downloading manually two nltk package

import nltk
nltk.download('punkt')
nltk.download('averaged_perceptron_tagger')
LeonPyramid commented 9 months ago

Ah yeah i did not run init my bad