This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cc.mallet.types.InstanceList.CrossValidationIterator crossValidationIt = trainingInstanceList.crossValidationIterator(folds, new Random().nextInt()); | |
while (crossValidationIt.hasNext()) { | |
InstanceList[] il = crossValidationIt.nextSplit(); | |
CRF crf = new CRF(trainingInstanceList.getPipe(), null); | |
CRFTrainerByThreadedLabelLikelihood trainer = new CRFTrainerByThreadedLabelLikelihood(crf, threads); | |
// CRFTrainerByLabelLikelihood trainer = new CRFTrainerByLabelLikelihood(crf); | |
MultiSegmentationEvaluator eval = new MyMultiSegmentationEvaluator(// | |
new InstanceList[] { testingSet }, new String[] { "TTesting" }, tags, continueTags); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.apache.uima.ruta.engine; | |
import static org.junit.Assert.assertEquals; | |
import java.util.Collection; | |
import org.apache.uima.fit.factory.JCasFactory; | |
import org.apache.uima.fit.util.JCasUtil; | |
import org.apache.uima.jcas.JCas; | |
import org.junit.Test; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import pandas as pd | |
df1 = pd.DataFrame([(1,2),(2,4),(5,6)], columns=['a','b']) | |
df1 | |
df2 = pd.DataFrame([(100,200),(300,400),(500,600)], columns=['a','b']) | |
df2 | |
df_add = df1.add(df2, fill_value=0) | |
df_add |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#http://techoverflow.net/blog/2013/11/18/a-geneontology-obo-v1.2-parser-in-python/ | |
import go_obo_parser | |
for p in go_obo_parser.parseGOOBO('....../pro.obo'): | |
if 'is_a' in p and p['is_a'] == 'PR:000000001 ! protein': | |
print p['name'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package cc.mallet.fst; | |
import java.text.DecimalFormat; | |
import java.util.LinkedList; | |
import java.util.List; | |
import cc.mallet.types.FeatureVector; | |
import cc.mallet.types.Instance; | |
import cc.mallet.types.InstanceList; | |
import cc.mallet.types.Sequence; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/uima-addons-2.3.1/Lucas$ st | |
M src/main/java/org/apache/uima/lucas/indexer/analysis/SplitterFilter.java | |
M pom.xml | |
/uima-addons-2.3.1/Lucas$ svn diff | |
Index: src/main/java/org/apache/uima/lucas/indexer/analysis/SplitterFilter.java | |
=================================================================== | |
--- src/main/java/org/apache/uima/lucas/indexer/analysis/SplitterFilter.java (revision 1347596) | |
+++ src/main/java/org/apache/uima/lucas/indexer/analysis/SplitterFilter.java (working copy) | |
@@ -20,6 +20,7 @@ | |
package org.apache.uima.lucas.indexer.analysis; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Modifies $httpProvider for correct server communication (POST variable format) | |
angular.module('http-post-fix', [], function($httpProvider) { | |
// This code is taken from http://victorblog.com/2012/12/20/make-angularjs-http-service-behave-like-jquery-ajax/ | |
// Use x-www-form-urlencoded Content-Type | |
$httpProvider.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=utf-8'; | |
// Override $http service's default transformRequest | |
$httpProvider.defaults.transformRequest = [function(data) { | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cause" : { | |
"arguments" : [ "org.apache.uima.ruta.engine.RutaEngine", "<unknown>" ], | |
"cause" : { | |
"arguments" : [ "file:/Volumes/HDD2/ren_data/dev_hdd/uima/sherlok/sherlok_core/config/resources/.engines/TokenAnnotator___0_1.xml" ], | |
"cause" : { | |
"arguments" : [ "file:/Volumes/HDD2/ren_data/dev_hdd/uima/sherlok/sherlok_core/config/resources/.engines/TokenAnnotator___0_1.xml" ], | |
"cause" : { | |
"arguments" : [ "file:/Volumes/HDD2/ren_data/dev_hdd/uima/sherlok/sherlok_core/config/resources/.engines/TokenAnnotator___0_1.xml" ], | |
"cause" : { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/main/java/org/sherlok/PipelineLoader.java b/src/main/java/org/sherlok/PipelineLoader.java | |
index 74a42cf..c057421 100644 | |
--- a/src/main/java/org/sherlok/PipelineLoader.java | |
+++ b/src/main/java/org/sherlok/PipelineLoader.java | |
@@ -263,6 +263,14 @@ public class PipelineLoader { | |
resolvedArtifact); | |
} | |
} | |
+ if (LOG.isTraceEnabled()) { | |
+ LOG.trace("CLASSPATH at end of solveDependencies():"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/main/resources/fakePom.ftl b/src/main/resources/fakePom.ftl | |
index 8885fd6..12ca17e 100644 | |
--- a/src/main/resources/fakePom.ftl | |
+++ b/src/main/resources/fakePom.ftl | |
@@ -16,6 +16,13 @@ | |
<version>2.6.1-json</version> | |
<scope>provided</scope> | |
</dependency> | |
+ <!-- TODO workaround https://gist.githubusercontent.com/mantognini/2fbeec6fb86aa5290b89/raw/651009b68e72163141f24e982d0bf3bfaddce3ea/stack1 --> | |
+ <dependency> |
OlderNewer