Solved

Text Classifier - Machine Learning

Posted on 2011-09-09
5
498 Views
Last Modified: 2012-05-12
Hey,

I have a few thousand quite text files that need to be classified by category.

I already have a few hundred manually classified.

There are about 50 different categories.

I'm thinking of using MALLET:
http://mallet.cs.umass.edu/index.php

But the problem is that I have no idea how to use MALLET, the instructions not being very good.

Could someone please explain how I would use MALLET for my purpose, or give me some other software to use which could do this?

Thank you for your time!

ADFB
0
Comment
Question by:ADFB
  • 2
  • 2
5 Comments
 
LVL 37

Expert Comment

by:Bing CISM / CISSP
ID: 36516769
0
 

Author Comment

by:ADFB
ID: 36517460
That's not how to use it, that's how to make it.

I only want to know how to use the application for my purposes, not hold to build it from scratch.
0
 
LVL 26

Accepted Solution

by:
dpearson earned 500 total points
ID: 36518141
I think you want to work through the quick start:
http://mallet.cs.umass.edu/quick-start.php

and then more specifically the document classification sample:
http://mallet.cs.umass.edu/classification.php

Once you have a basic loop going where you can train a classifier successfully you should be able to apply it to your specific problem fairly easily.

You can also get help from them directly at:
mallet-dev@cs.umass.edu.

Doug
0
 

Author Comment

by:ADFB
ID: 36518608
OK, thanks. I think I've figured it out, but I'm still confused about the following:

----------
Applying a Saved Classifier to New Unlabeled Data: To apply a saved classifier to new unlabeled data, use Csv2Classify (for one-instance-per-line data) or Text2Classify (for one-instance-per-file data).

bin/mallet classify-file --input data --output - --classifier classifier
bin/mallet classify-dir --input datadir --output - --classifier classifier

Using the above commands, classifications are written to standard output.
----------

I want it to output to CSV format, but I don't know what to type to get it to do that. What should the command look like to get it to output to CSV?

Thanks!
0
 
LVL 26

Expert Comment

by:dpearson
ID: 36519377
I didn't see anything obvious about the output format.  If it's not listed in the "--help" you may need to write a small converter program (e.g. in Perl) to take the output and convert it to CSV format.

If that outside your comfort zone, you can probably email the developers and they could either point you to an existing tool or they could extend Mallet to support CSV output.

Doug
0

Featured Post

Save on storage to protect fatherhood memories

You're the dad who has everything. This Father's Day, make sure your family memories are protected. My Passport Ultra has automatic backup and password protection to keep your cherished photos and videos safe. With up to 3TB, you have plenty of room to hold the adventures ahead.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now