Skip to content

shahrivari/ganmaz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ganmaz

A Simple and Stupid Lazy Text Classifier

license Build Status

Ganmaz is a simple text classifier which is based on k-NN (k Nearest Neighbors), the well-knonw nonparametric text classification technique. The program is easy to use and can do classification via rest API.

For building the software, execute:
'mvn package' on the project source root.
The JAR file will be generated in: 'target/ganmaz-1.0.jar'

Then execute Ganmaz in command line via:
java -cp target/ganmaz-1.0.jar ir.toolki.ganmaz.RestKt
The Rest server will accept texts for classification via:
localhost:5050/classify/text_to_classify using HTTP GET
and localhost:5050/classify using HTTP POST

For testing a dataset run: java -cp target/ganmaz-1.0.jar ir.toolki.ganmaz.RestKt --test --json sample.json

There are several command line params:
--json VAL : The path of json file (default: )
--k N : The number of Neighbors for classifier. (default: 5)
--port N : The port to listen (default: 5050)
--test : Test the file. (default: false)

If no json file is given by the user, Ganmaz uses a default sample JSON file which provides a two class dataset.

That's all...