Skip to content

Commit

Permalink
Added files for homework 3.
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonbaldridge committed Feb 17, 2013
1 parent dbe7d5c commit 0a473da
Show file tree
Hide file tree
Showing 17 changed files with 26,696 additions and 1 deletion.
54 changes: 54 additions & 0 deletions bin/anlp
@@ -0,0 +1,54 @@
#!/bin/bash

EXIT_CODE=0

if [ -z $ANLP_DIR ]
then
ANLP_DIR=`dirname $0`/../
fi

if [ -z $JAVA_MEM_FLAG ]
then
JAVA_MEM_FLAG=-Xmx4g
fi

#JARS="`find $HOME/.ivy2/ -name '*.jar' -print | tr '\n' ':'`"
MANAGED_JARS="`find $ANLP_DIR/lib_managed -name '*.jar' -print | tr '\n' ':'`"
UNMANAGED_JARS="`find $ANLP_DIR/lib -name '*.jar' -print | tr '\n' ':'`"

SCALA_LIB="$HOME/.sbt/boot/scala-2.10.0/lib/scala-library.jar"

CP="$ANLP_DIR/target/classes:$SCALA_LIB:$ANLP_DIR/src/main/resources:$MANAGED_JARS:$UNMANAGED_JARS"

JAVA="$JAVA_HOME/bin/java"
JAVA_COMMAND="$JAVA -classpath $CP -Danlp.dir=$ANLP_DIR"

CMD=$1
shift

help()
{
cat <<EOF
anlp 0.2 commands:
run run the main method of a given class
app run the main method of a class in appliednlp.app
Include --help with any option for more information
EOF
}

CLASS=

case $CMD in
run) CLASS=$1; shift;;
app) CLASS=appliednlp.app.$1; shift;;
help) help; exit 1;;
*) echo "Unrecognized command: $CMD"; help; exit 1;;
esac

$JAVA_COMMAND $CLASS ${1+"$@"}
(( EXIT_CODE += $? ))

exit $EXIT_CODE

15 changes: 14 additions & 1 deletion build.sbt
@@ -1,9 +1,22 @@
name := "applied-nlp"

version := "0.1-SNAPSHOT"
version := "0.2-SNAPSHOT"

organization := "edu.utexas"

scalaVersion := "2.10.0"

retrieveManaged := true

crossPaths := false

resolvers ++= Seq(
"Sonatype Snapshots" at "https://oss.sonatype.org/content/repositories/releases/"
)

libraryDependencies ++= Seq(
"org.scalanlp" % "nak" % "1.1.0",
"org.scalanlp" % "chalk" % "1.1.1",
"org.rogach" %% "scallop" % "0.8.0",
"gov.nist.math" % "jama" % "1.0.2"
)
10 changes: 10 additions & 0 deletions data/cluster/countries/README.txt
@@ -0,0 +1,10 @@
Birth and Death Rates

The data set contains

birth rate (in percent),
death rate (in percent),

of 70 countries.

Data obtained from: http://www.uni-koeln.de/themen/statistik/data/cluster/
70 changes: 70 additions & 0 deletions data/cluster/countries/birth.dat
@@ -0,0 +1,70 @@
ALGERIA 36.4 14.6
CONGO 37.3 8.0
EGYPT 42.1 15.3
GHANA 55.8 25.6
IVORY COAST 56.1 33.1
MALAGASY 41.8 15.8
MOROCCO 46.1 18.7
TUNISIA 41.7 10.1
CAMBODIA 41.4 19.7
CEYLON 35.8 8.5
CHINA 34.0 11.0
TAIWAN 36.3 6.1
HONG KONG 32.1 5.5
INDIA 20.9 8.8
INDONESIA 27.7 10.2
IRAQ 20.5 3.9
FRANCE 25.0 6.2
JAPAN 17.3 7.0
JORDAN 46.3 6.4
KOREA 14.8 5.7
MALAYSIA 33.5 6.4
MONGOLIA 39.2 11.2
PHILLIPINES 28.4 7.1
SYRIA 26.2 4.3
THAILAND 34.8 7.9
VIETNAM 23.4 5.1
CANADA 24.8 7.8
COSTA RICA 49.9 8.5
DOMINICAN R 33.0 8.4
GUATEMALA 47.7 17.3
HONDURAS 46.6 9.7
MEXICO 45.1 10.5
NICARAGUA 42.9 7.1
PANAMA 40.1 8.0
UNITED STATES 21.7 9.6
ARGENTINA 21.8 8.1
BOLIVIA 17.4 5.8
BRAZIL 45.0 13.5
CHILE 33.6 11.8
COLOMBIA 44.0 11.7
ECUADOR 44.2 13.5
PERU 27.7 8.2
URUGUAY 22.5 7.8
VENEZUELA 42.8 6.7
AUSTRIA 18.8 12.8
BELGIUM 17.1 12.7
BRITAIN 18.2 12.2
BULGARIA 16.4 8.2
CZECHOSLOVAKIA 16.9 9.5
DENMARK 17.6 19.8
FINLAND 18.1 9.2
FRANCE 18.2 11.7
E.GERMANY 17.5 13.7
W.GERMANY 18.5 11.4
GREECE 17.4 7.8
HUNGARY 13.1 9.9
IRELAND 22.3 11.9
ITALY 19.0 10.2
NETHERLANDS 20.9 8.0
NORWAY 17.5 10.0
POLAND 19.0 7.5
PORTUGAL 23.5 10.8
ROMANIA 15.7 8.3
SPAIN 21.5 9.1
SWEDEN 14.8 10.1
SWITZERLAND 18.9 9.6
U.S.S.R. 21.2 7.2
YUGOSLAVIA 21.4 8.9
AUSTRALIA 21.6 8.7
NEW ZEALAND 25.5 8.8

0 comments on commit 0a473da

Please sign in to comment.