-
Notifications
You must be signed in to change notification settings - Fork 0
Naive Bayes classification of film reviews
License
adneforslund/BayesClassification
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Main.py There are no dependencies to this program, except for python3.6.* For help use ' python main.py -h ' To use this program, run it in the command line as python main.py with the following arguments main.py -h -To get help using the program main.py -f - Argument to give a pathname to data main.py {-tr, --train} -f path/to/DATA/aclImdb/ - Train the classifier, given a pathname to the top directory containing the train-folder - Makes a text-file, that stores the state of the training algorithm and is used for classification main.py {-cl , --classify} -f . - Use to classify one review, given a pathname to the review. If no proper path is found, e.g. by using ., the application will ask you to type a review in the terminal. - the training must already have been done, e.g. you need an nbc.txt file main.py {-te, --test} -f path/to/DATA/aclImdb/ - classify all the reviews in test directory in the DATA folder, give pathname to the DATA-folder - the training must already have been done, e.g. you need an nbc.txt file --Example of usage-- Training, which must be done before anything else: python main.py -tr -f DATA/aclImdb/ Testing: python main.py -te -f DATA/aclImdb/ Classification of one review: (Important: a valid pathname must be given, in this case, the root path is used) python main.py -cl -f . Write your review here:
About
Naive Bayes classification of film reviews
Topics
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published