Commits

muzny committed a88f50a

Some build and reconfiguration action

  • Participants
  • Parent commits 8864553

Comments (0)

Files changed (4)

File WiktionaryIdioms/build.xml

         <property name="dist" location="dist" />
         <property name="lib" location="lib" />
 	  	<property name="src" location="src" />
+		<property name="bin" location="bin" />
 
         <path id="classpath">
                 <fileset dir="${lib}">
                 
                 <delete file="MANIFEST.MF" />
         </target>
+	
+
+    	<target name="runnables" description="create runnable experiment jars">
+        	<jar destfile="${dist}/RunClassifierExperimentFromFiles-${version}.jar" filesetmanifest="mergewithoutmain">
+            <manifest>
+                <attribute name="Main-Class" value="classifier.experiments.RunClassifierExperimentFromFiles"/>
+                <attribute name="Class-Path" value="."/>
+            </manifest>
+            <fileset dir="${bin}"/>
+                <zipgroupfileset dir="${lib}" includes="*.jar" />
+
+        	</jar>
+    		
+    		<jar destfile="${dist}/RunDetectorExperimentFromFiles-${version}.jar" filesetmanifest="mergewithoutmain">
+    		<manifest>
+    		     <attribute name="Main-Class" value="detector.experiments.RunDetectorExperimentFromFiles"/>
+    		     <attribute name="Class-Path" value="."/>
+    		</manifest>
+    		<fileset dir="${bin}"/>
+                <zipgroupfileset dir="${lib}" includes="*.jar" />
+    		</jar>
+    </target>
 
         <target name="clean" description="clean up">
                 <!-- Delete the ${build} and ${dist} directory trees -->

File WiktionaryIdioms/config/classifierconfig.xml

 	</MySQL>
 
 	<default>
-		<trainPath></trainPath>
-		<testPath></testPath>
+		<trainPath>./data/train.txt</trainPath>
+		<testPath>./data/dev_annotated.txt</testPath>
 	    <equalDist>false</equalDist>
 	    <percents></percents>
 		<verbose>true</verbose>
-		<features>1, 2, 3, 4, 6, 7, 8, 10, 11</features>
+		<features>1, 2, 4, 6, 8, 9, 10, 14</features>
 		<errorBound>.000001</errorBound>
 		<specificsPath>./specifics/specifics.txt</specificsPath>
 		<classifierType>perceptron</classifierType>
 			<randomErrorAnalysis>100</randomErrorAnalysis>
 		</output>
 		<outputModel>
-			<file>./paperOutputModels/</file>
+			<file>test</file>
 		</outputModel>
 	</default>
 	
     
     <BasicApply>
-    	<learningRate></learningRate>
-		<iterations></iterations>
-		<modelFile>./paperOutputModels/devUncorrectedUncleanedAll.model</modelFile>
+    	<learningRate>1</learningRate>
+		<iterations>93</iterations>
+		<modelFile></modelFile>
 		
 		<shouldOutputGeneral>true</shouldOutputGeneral>
-		<shouldOutputModel>false</shouldOutputModel>
+		<shouldOutputModel>true</shouldOutputModel>
     </BasicApply>
     
      <Bootstrapping>

File WiktionaryIdioms/src/classifier/experiments/BasicApply.java

 		System.out.println("verbose: " + verbose);
 		
 		String modelFile = configs.getSString("modelFile");
+		System.out.println("Model file: " + modelFile);
 		Classifier classy = null;
 		ClassifierModel resultModel = null;
-		if (modelFile.length() > 0) {
+		if (modelFile != null && modelFile.length() > 0) {
 			System.out.println("Loading from model file: " + modelFile);
 			resultModel = new ClassifierModel(new File(modelFile));
 			classy = configs.getClassifier(resultModel);

File WiktionaryIdioms/src/detector/experiments/RunDetectorExperimentFromFiles.java

 			System.out.println("Test results for corrected classifier model: ");
 			testClassifierModel(modelPath, senses, testData, result, false);
 			
-			System.out.println("Test results for augmented corrected classifier model: ");
-			testClassifierModel(modelPath, senses, testData, result, true);
+			//System.out.println("Test results for augmented corrected classifier model: ");
+			//testClassifierModel(modelPath, senses, testData, result, true);
 		}
 
 	}