Skip to content

Commit

Permalink
Upgraded liblinear to 1.8 and use Maven for building
Browse files Browse the repository at this point in the history
  • Loading branch information
jnioche committed Feb 21, 2012
1 parent 9335652 commit fefdd40
Show file tree
Hide file tree
Showing 37 changed files with 64 additions and 8 deletions.
3 changes: 3 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
1.6
- upgraded liblinear 1.8
- uses Maven to build and manage the dependencies
1.5
- added parameter to ModelUtils to show only the top N most important attributes per category
- upgraded lisvm 3.0 + rely on external lib instead of modified code
Expand Down
2 changes: 1 addition & 1 deletion NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ This product includes software developed by the LIBSVM Project.
Taiwan University (http://www.csie.ntu.edu.tw/~cjlin/libsvm/).
Copyright (c) 2000-2006 Chih-Chung Chang and Chih-Jen Lin

This product includers software from http://www.bwaldvogel.de/liblinear-java/
This product includes software from http://www.bwaldvogel.de/liblinear-java/

2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
A Text Classification API in Java originally developed by DigitalPebble Ltd. The API is independent from the ML implementations used and can be used as a front end to various ML algorithms. libSVM and liblinear are currently embedded.
A Text Classification API in Java originally developed by DigitalPebble Ltd. The API is independent from the ML implementations used and can be used as a front end to various ML algorithms. libSVM and liblinear [https://github.com/bwaldvogel/liblinear-java] are currently embedded.

Standard weighting schemes are provided (occurrences,frequency,tf-idf) for building the vectors. The API aims at facilitating the use of ML for text applications and offers a convenient field-based representation of documents (e.g. title, content, keywords, etc...) with the option to specify a different weighting scheme per field.

Expand Down
Binary file removed lib/liblinear-1.7-with-deps.jar
Binary file not shown.
53 changes: 53 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.digitalpebble.textclassification</groupId>
<artifactId>textclassification</artifactId>
<packaging>jar</packaging>
<version>1.6</version>
<name>TextClassificationAPI</name>
<url>https://github.com/jnioche/textclassification</url>

<build>
<finalName>TextClassificationAPI-${project.version}</finalName>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</build>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<dependencies>
<dependency>
<groupId>de.bwaldvogel</groupId>
<artifactId>liblinear</artifactId>
<version>1.8</version>
</dependency>

<dependency>
<groupId>libsvm</groupId>
<artifactId>libsvm</artifactId>
<version>3.0</version>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.2</version>
<scope>test</scope>
</dependency>
</dependencies>


</project>
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
import java.util.ArrayList;
import java.util.List;

import liblinear.FeatureNode;
import liblinear.Linear;
import liblinear.Model;

import com.digitalpebble.classification.Document;
import com.digitalpebble.classification.Parameters;
import com.digitalpebble.classification.TextClassifier;
import com.digitalpebble.classification.Vector;

import de.bwaldvogel.liblinear.FeatureNode;
import de.bwaldvogel.liblinear.Linear;
import de.bwaldvogel.liblinear.Model;

public class LibLinearClassifier extends TextClassifier {

Model liblinearModel;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
import java.util.Iterator;
import java.util.Map;

import liblinear.Model;

import com.digitalpebble.classification.Lexicon;

import de.bwaldvogel.liblinear.Model;

public class ModelUtils {

/**
Expand Down

0 comments on commit fefdd40

Please sign in to comment.