Git Product home page Git Product logo

classify's Introduction

1. Ready for train set and test set:
   The 'data' directory contains many subject subdirectory, such as 'ent', 'game' and so on,
   every subdirectory contains a 'link.dat' file and many shell script and python script.
   
   'link.dat' record the url of many html texts.
	
   so, if you want to classify for a subject, you should enter the 'subject' directory, 

   and run: './auto.sh'

   the 'auto.sh' will help you download the html text and parse words, 

   and save the a file into directory 'train' and 'test'.

2. Clean unused train set and test set file
   The test set and test set file may have some rabbish text, 

   if you want delete them, you could do like this:
	
   run: './clean.sh'

   the 'clean.sh' will delete the file which bytes is less then 300bytes.

3. Create train data file by bayes:

   The 'train.py' is a python script for creating train data,
  
   you should run: 'python train.py'

   the python script will read the train set file from directory 'train',
 
   and output the train data file 'data.dat' .

4. Test

   The 'test.py' is a test script for test the classify effect,

   you should run: 'python test.py'

   the python script will read the test set file from directory 'test',

   and output the effect.

5. Classify for a url link
   
   The 'classify.sh' is a shell script which could classify the url link into a subject of train data file,

   you should run: 'classify.sh url'

   the script will tell you, it may be belong to which subject.
 
   

   
   

classify's People

Contributors

yanshuyuan avatar

Watchers

James Cloos avatar  avatar

Forkers

hsomesun

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.