platisd / duplicate-code-detection-tool

A simple Python3 tool to detect similarities between files within a repository
MIT License
162 stars 30 forks source link

No module named 'gensim' #29

Closed nhjclxc closed 10 months ago

nhjclxc commented 10 months ago

image

python duplicate_code_detection.py -d smartcar_shield/src Traceback (most recent call last): File "E:\nbu\similar\code\duplicate-code-detection-tool\duplicate_code_detection.py", line 10, in import gensim ModuleNotFoundError: No module named 'gensim'

platisd commented 10 months ago

Have you installed the dependencies, manually or via pip install --user -r requirements.txt && python3 -m nltk.downloader punkt?

nhjclxc commented 10 months ago

I opened the project with pycharm and used it to install all the dependencies, and then I tried the pip installation. Just ask if duplicate-code-detection-tool supports similarity detection at the java method level

platisd commented 10 months ago

similarity detection at the java method level

No, it compares at the file-level.

nhjclxc commented 10 months ago

But now a new problem has arisen. When I executed "python3 -m nltk.downloader punkt", the following error occurred: 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/english.pickle

image

nhjclxc commented 10 months ago

Thanks for your guidance, I successfully ran the project

image

platisd commented 10 months ago

OK looks good, well done. I guess this issue can be closed :+1: