Git Product home page Git Product logo

cse5243's Introduction

Project 1
Name: Fang Zhou

1. Structure of the project
Root
|-cleanr.py	Cleaner class. It's used to clean the data.
|-parser.py	Parser class. It's used to parse the data.
|-reuter.py	Reuter class. The Reuter class to hold a lot of info.
|-vector.py	Main funciton.
|-env_bash.sh	Environment script for bash
|-env_tcsh.sh	Environment script for tcsh 
|-Makefile
|-readme

2. Set Python environment
Please run the env script (env_bash.sh or env_tcsh.sh) before 
you run the program. Use 'source env_bash.sh' or 'source env_bash.sh'
to run it. It depends on the shell you are using.

3. How to run
You should give the program three input arguments.
The first one is the input filename.

The second one is the output filename.
Note: Because we have three feature vectors, so once you 
give the output filename, the program uses vc0, vc1, and 
vc2 as the extension of the outputfile. So you will get 
three output files with the same prefix.

The third one is the number of attributes.
You can set the number of values as you want.

For example:
python -O ./vector.py data result 100

This function will generate three files: result.vc1, result.vc2,
and result.vc3, for feature vectors based on TF-IDF, word frequency,
and general information, respectively.

Note: I also prepare a Makefile for the grader. If you run 'make',
it will run the program with the whole dataset and generate three
vector files name result.vc1, result.vc2, resut.vc3.
It may take 2-3 mins on our deparment cluster.

4. How to review
You can use vim or other editors to open the output files.
The first line in each output file should contain the attribute 
names. So you can easily know there are how many attributes and
what the meanings of them are.
The other lines show the values of the feature vectors in the unit
of document, which means one line represents one document in this
file.
If you do not want the attribute names, you can use awk, sed and any 
commands you like to remove the first line.

If you have any problems, please let me know.
Email: [email protected]

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.