Code Monkey home page Code Monkey logo

naive-bayes-classifier's Issues

ImportError: No module named 'ExceptionNotSeen'

Maybe something is missing...

Traceback (most recent call last):
File "/Users/ZhangYuhao/Documents/Datamining/project/Q_number.py", line 3, in
from naiveBayesClassifier.trainer import Trainer
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/naiveBayesClassifier/trainer.py", line 1, in
from naiveBayesClassifier.trainedData import TrainedData
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/naiveBayesClassifier/trainedData.py", line 1, in
from ExceptionNotSeen import NotSeen
ImportError: No module named 'ExceptionNotSeen'

Could anyone help me out?

tokenizer.py doesnt have latest code

I installed naiveBayesClassifier by pip3 install naiveBayesClassifier
tokenizer.py doesnt have latest github code. Is the current github not in sync with pip?
Code I have was

#tokenizer.py
def tokenize(text):
    return text.lower().split(' ')

AttributeError: module 'naiveBayesClassifier.tokenizer' has no attribute 'tokenizer'

I have copied latest code from github for now.

there is something missing

the code newsTrainer = Trainer(tokenizer.Tokenizer(stop_words=[], signs_to_remove=["?!#%&"]) has missed a ) at last, the same to newsClassifier = Classifier(newsTrainer.data, tokenizer.Tokenizer(stop_words=[], signs_to_remove=["?!#%&"])

'module' object has no attribute 'Tokenizer'

newsTrainer = Trainer(tokenizer.Tokenizer(stop_words = [], signs_to_remove = ["?!#%&"]))
At the above line, I am getting an error.
Traceback (most recent call last):
File "", line 1, in
AttributeError: 'module' object has no attribute 'Tokenizer'

errors while trying newsClassifier.py

Traceback (most recent call last):
File "newsClassifier.py", line 22, in
newsTrainer.train(news['text'], news['category'])
File "/home/hydra/Desktop/AUR/projectSpider/naive-bayes-classifier/naiveBayesClassifier/trainer.py", line 17, in train
tokens = self.tokenizer.tokenize(text)
AttributeError: 'module' object has no attribute 'tokenize'

error while try to run the example

I face this problem while i try to run the example

the error occur at this line :
newsTrainer = Trainer(tokenizer.Tokenizer(stop_words = [], signs_to_remove = ["?!#%&"]))
and the error is this :
AttributeError: module 'naiveBayesClassifier.tokenizer' has no attribute 'Tokenizer'

anyone can help me solve it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.