muatik / naive-bayes-classifier Goto Github PK
View Code? Open in Web Editor NEWyet another general purpose naive bayesian classifier.
License: MIT License
yet another general purpose naive bayesian classifier.
License: MIT License
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.
I am getting this error and not sure how to get rid off this.
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'
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?
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'
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?
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=["?!#%&"])
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.