From 2f128fc85cb8cb71adcfa76ca48fb09135bd4a3d Mon Sep 17 00:00:00 2001 From: Richard Eckart de Castilho Date: Fri, 29 Jul 2022 12:30:48 +0200 Subject: [PATCH 1/8] #442 - Upgrade to UIMAv3 - Pull UIMA and uimaFIT versions up to 3.3.0 --- cleartk-berkeleyparser/.classpath | 19 ++++++++ .../.settings/org.eclipse.jdt.core.prefs | 4 ++ cleartk-berkeleyparser/pom.xml | 2 +- cleartk-clearnlp/.classpath | 19 ++++++++ .../.settings/org.eclipse.jdt.core.prefs | 4 ++ cleartk-clearnlp/pom.xml | 2 +- cleartk-corpus/.classpath | 19 ++++++++ .../.settings/org.eclipse.jdt.core.prefs | 4 ++ cleartk-corpus/pom.xml | 2 +- .../conll2005/Conll2005GoldAnnotator.java | 44 ++++++++++++------- .../corpus/timeml/TempEval2013Writer.java | 31 +++++++++++++ cleartk-eval/.classpath | 19 ++++++++ .../.settings/org.eclipse.jdt.core.prefs | 4 ++ cleartk-eval/pom.xml | 2 +- cleartk-examples/.classpath | 25 +++++++++-- .../.settings/org.eclipse.jdt.core.prefs | 4 ++ cleartk-examples/pom.xml | 2 +- .../launch/CVD (cleartk-examples).launch | 22 +++++----- cleartk-feature/.classpath | 18 ++++++++ .../.settings/org.eclipse.jdt.core.prefs | 4 ++ cleartk-feature/pom.xml | 2 +- cleartk-maltparser/.classpath | 18 ++++++++ .../.settings/org.eclipse.jdt.core.prefs | 4 ++ cleartk-maltparser/pom.xml | 2 +- cleartk-ml-crfsuite/.classpath | 19 ++++++++ .../.settings/org.eclipse.jdt.core.prefs | 4 ++ cleartk-ml-crfsuite/pom.xml | 2 +- cleartk-ml-liblinear/.classpath | 18 ++++++++ .../.settings/org.eclipse.jdt.core.prefs | 4 ++ cleartk-ml-liblinear/pom.xml | 2 +- .../cleartk/ml/liblinear/LibLinearTest.java | 8 +--- cleartk-ml-libsvm-tk/.classpath | 18 ++++++++ .../.settings/org.eclipse.jdt.core.prefs | 4 ++ cleartk-ml-libsvm-tk/pom.xml | 2 +- cleartk-ml-libsvm/.classpath | 18 ++++++++ .../.settings/org.eclipse.jdt.core.prefs | 4 ++ cleartk-ml-libsvm/pom.xml | 2 +- cleartk-ml-mallet/.classpath | 19 ++++++++ .../.settings/org.eclipse.jdt.core.prefs | 4 ++ cleartk-ml-mallet/pom.xml | 2 +- cleartk-ml-opennlp-maxent/.classpath | 18 ++++++++ .../.settings/org.eclipse.jdt.core.prefs | 4 ++ cleartk-ml-opennlp-maxent/pom.xml | 2 +- cleartk-ml-script/.classpath | 23 +++++++--- .../.settings/org.eclipse.jdt.core.prefs | 4 ++ cleartk-ml-script/pom.xml | 2 +- cleartk-ml-svmlight/.classpath | 19 ++++++++ .../.settings/org.eclipse.jdt.core.prefs | 4 ++ cleartk-ml-svmlight/pom.xml | 2 +- cleartk-ml-tksvmlight/.classpath | 18 ++++++++ .../.settings/org.eclipse.jdt.core.prefs | 4 ++ cleartk-ml-tksvmlight/pom.xml | 2 +- .../kernel/TreeKernel_ImplBase.java | 4 +- cleartk-ml-weka/.classpath | 18 ++++++++ .../.settings/org.eclipse.jdt.core.prefs | 4 ++ cleartk-ml-weka/pom.xml | 2 +- .../ml/weka/WekaStringOutcomeClassifier.java | 2 +- cleartk-ml/.classpath | 18 ++++++++ .../.settings/org.eclipse.jdt.core.prefs | 4 ++ cleartk-ml/pom.xml | 2 +- cleartk-opennlp-tools/.classpath | 19 ++++++++ .../.settings/org.eclipse.jdt.core.prefs | 4 ++ cleartk-opennlp-tools/pom.xml | 2 +- .../org/cleartk/opennlp/tools/PosTagger.java | 6 +-- .../org/cleartk/opennlp/tools/Tokenizer.java | 6 +-- .../parser/DefaultOutputTypesHelper.java | 11 ++--- cleartk-snowball/.classpath | 18 ++++++++ .../.settings/org.eclipse.jdt.core.prefs | 4 ++ cleartk-snowball/pom.xml | 2 +- cleartk-stanford-corenlp/.classpath | 18 ++++++++ .../.settings/org.eclipse.jdt.core.prefs | 4 ++ cleartk-stanford-corenlp/pom.xml | 2 +- cleartk-summarization/.classpath | 25 +++++++++-- .../.settings/org.eclipse.jdt.core.prefs | 4 ++ cleartk-summarization/pom.xml | 2 +- cleartk-test-util/.classpath | 19 ++++++++ .../.settings/org.eclipse.jdt.core.prefs | 4 ++ cleartk-test-util/pom.xml | 2 +- .../org/cleartk/test/util/TypeTestUtil.java | 12 ++--- cleartk-timeml/.classpath | 19 ++++++++ .../.settings/org.eclipse.jdt.core.prefs | 4 ++ cleartk-timeml/pom.xml | 2 +- cleartk-token/.classpath | 19 ++++++++ .../.settings/org.eclipse.jdt.core.prefs | 4 ++ cleartk-token/pom.xml | 2 +- cleartk-type-system/.classpath | 18 ++++++++ .../.settings/org.eclipse.jdt.core.prefs | 4 ++ cleartk-type-system/pom.xml | 2 +- cleartk-util/.classpath | 19 ++++++++ .../.settings/org.eclipse.jdt.core.prefs | 4 ++ cleartk-util/pom.xml | 2 +- .../org/cleartk/util/PlatformDetection.java | 2 +- pom.xml | 12 ++--- 93 files changed, 741 insertions(+), 98 deletions(-) diff --git a/cleartk-berkeleyparser/.classpath b/cleartk-berkeleyparser/.classpath index 8fcd3f350..04e989bc1 100644 --- a/cleartk-berkeleyparser/.classpath +++ b/cleartk-berkeleyparser/.classpath @@ -10,11 +10,13 @@ + + @@ -28,5 +30,22 @@ + + + + + + + + + + + + + + + + + diff --git a/cleartk-berkeleyparser/.settings/org.eclipse.jdt.core.prefs b/cleartk-berkeleyparser/.settings/org.eclipse.jdt.core.prefs index 5ca96da39..30fd699ae 100644 --- a/cleartk-berkeleyparser/.settings/org.eclipse.jdt.core.prefs +++ b/cleartk-berkeleyparser/.settings/org.eclipse.jdt.core.prefs @@ -17,6 +17,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled org.eclipse.jdt.core.compiler.problem.discouragedReference=warning org.eclipse.jdt.core.compiler.problem.emptyStatement=warning +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled @@ -60,6 +61,7 @@ org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled @@ -87,6 +89,8 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disa org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.processAnnotations=disabled +org.eclipse.jdt.core.compiler.release=disabled org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=48 diff --git a/cleartk-berkeleyparser/pom.xml b/cleartk-berkeleyparser/pom.xml index 223a7fb08..e75b6e76e 100644 --- a/cleartk-berkeleyparser/pom.xml +++ b/cleartk-berkeleyparser/pom.xml @@ -14,7 +14,7 @@ cleartk org.cleartk - 2.0.1-SNAPSHOT + 3.0.0-SNAPSHOT .. diff --git a/cleartk-clearnlp/.classpath b/cleartk-clearnlp/.classpath index 22c865221..da6298210 100644 --- a/cleartk-clearnlp/.classpath +++ b/cleartk-clearnlp/.classpath @@ -10,11 +10,13 @@ + + @@ -27,5 +29,22 @@ + + + + + + + + + + + + + + + + + diff --git a/cleartk-clearnlp/.settings/org.eclipse.jdt.core.prefs b/cleartk-clearnlp/.settings/org.eclipse.jdt.core.prefs index b2272a856..e9a5ea713 100644 --- a/cleartk-clearnlp/.settings/org.eclipse.jdt.core.prefs +++ b/cleartk-clearnlp/.settings/org.eclipse.jdt.core.prefs @@ -24,6 +24,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled org.eclipse.jdt.core.compiler.problem.discouragedReference=warning org.eclipse.jdt.core.compiler.problem.emptyStatement=warning +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore @@ -80,6 +81,7 @@ org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=igno org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled @@ -112,6 +114,8 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.processAnnotations=disabled +org.eclipse.jdt.core.compiler.release=disabled org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=48 diff --git a/cleartk-clearnlp/pom.xml b/cleartk-clearnlp/pom.xml index 4d8391b3d..f37b11468 100644 --- a/cleartk-clearnlp/pom.xml +++ b/cleartk-clearnlp/pom.xml @@ -7,7 +7,7 @@ cleartk org.cleartk - 2.0.1-SNAPSHOT + 3.0.0-SNAPSHOT .. diff --git a/cleartk-corpus/.classpath b/cleartk-corpus/.classpath index 8fcd3f350..04e989bc1 100644 --- a/cleartk-corpus/.classpath +++ b/cleartk-corpus/.classpath @@ -10,11 +10,13 @@ + + @@ -28,5 +30,22 @@ + + + + + + + + + + + + + + + + + diff --git a/cleartk-corpus/.settings/org.eclipse.jdt.core.prefs b/cleartk-corpus/.settings/org.eclipse.jdt.core.prefs index 5ca96da39..30fd699ae 100644 --- a/cleartk-corpus/.settings/org.eclipse.jdt.core.prefs +++ b/cleartk-corpus/.settings/org.eclipse.jdt.core.prefs @@ -17,6 +17,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled org.eclipse.jdt.core.compiler.problem.discouragedReference=warning org.eclipse.jdt.core.compiler.problem.emptyStatement=warning +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled @@ -60,6 +61,7 @@ org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled @@ -87,6 +89,8 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disa org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.processAnnotations=disabled +org.eclipse.jdt.core.compiler.release=disabled org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=48 diff --git a/cleartk-corpus/pom.xml b/cleartk-corpus/pom.xml index c17ca73df..5d599147c 100644 --- a/cleartk-corpus/pom.xml +++ b/cleartk-corpus/pom.xml @@ -7,7 +7,7 @@ cleartk org.cleartk - 2.0.1-SNAPSHOT + 3.0.0-SNAPSHOT .. diff --git a/cleartk-corpus/src/main/java/org/cleartk/corpus/conll2005/Conll2005GoldAnnotator.java b/cleartk-corpus/src/main/java/org/cleartk/corpus/conll2005/Conll2005GoldAnnotator.java index 16cefccb5..2ba113731 100644 --- a/cleartk-corpus/src/main/java/org/cleartk/corpus/conll2005/Conll2005GoldAnnotator.java +++ b/cleartk-corpus/src/main/java/org/cleartk/corpus/conll2005/Conll2005GoldAnnotator.java @@ -35,6 +35,10 @@ import org.apache.uima.analysis_engine.AnalysisEngineProcessException; import org.apache.uima.cas.CAS; import org.apache.uima.cas.CASException; +import org.apache.uima.fit.component.JCasAnnotator_ImplBase; +import org.apache.uima.fit.descriptor.ConfigurationParameter; +import org.apache.uima.fit.descriptor.SofaCapability; +import org.apache.uima.fit.util.FSCollectionFactory; import org.apache.uima.jcas.JCas; import org.apache.uima.jcas.cas.FSArray; import org.apache.uima.jcas.tcas.Annotation; @@ -43,16 +47,13 @@ import org.cleartk.srl.type.Chunk; import org.cleartk.srl.type.Predicate; import org.cleartk.srl.type.SemanticArgument; +import org.cleartk.syntax.constituent.type.TerminalTreebankNode; import org.cleartk.syntax.constituent.type.TopTreebankNode; import org.cleartk.syntax.constituent.type.TreebankNode; import org.cleartk.syntax.constituent.type.TreebankNodeUtil; import org.cleartk.token.type.Sentence; import org.cleartk.token.type.Token; import org.cleartk.util.AnnotationUtil; -import org.apache.uima.fit.component.JCasAnnotator_ImplBase; -import org.apache.uima.fit.descriptor.ConfigurationParameter; -import org.apache.uima.fit.descriptor.SofaCapability; -import org.apache.uima.fit.util.FSCollectionFactory; /** *
@@ -98,14 +99,17 @@ public void process(JCas jCas) throws AnalysisEngineProcessException { CharniakParseParser parser = new CharniakParseParser(initView); int numberOfPredicates = 0; - for (Conll2005Line line : conll2005Lines) - if (!line.targetVerb.equals("-")) + for (Conll2005Line line : conll2005Lines) { + if (!line.targetVerb.equals("-")) { numberOfPredicates += 1; + } + } int currentPredicate = 0; PredicateParser predicateParsers[] = new PredicateParser[numberOfPredicates]; - for (int i = 0; i < numberOfPredicates; i++) + for (int i = 0; i < numberOfPredicates; i++) { predicateParsers[i] = new PredicateParser(initView); + } NamedEntityParser namedEntityParser = new NamedEntityParser(initView); @@ -128,7 +132,7 @@ public void process(JCas jCas) throws AnalysisEngineProcessException { token.setPos(line.pos); token.addToIndexes(); - TreebankNode terminal = new TreebankNode(initView, startIndex, endIndex); + TerminalTreebankNode terminal = new TerminalTreebankNode(initView, startIndex, endIndex); terminal.setNodeType(line.pos); terminal.setNodeValue(line.word); terminal.setChildren(new FSArray(jCas, 0)); @@ -162,8 +166,9 @@ public void process(JCas jCas) throws AnalysisEngineProcessException { parser.makeParse(); - for (PredicateParser predicateParser : predicateParsers) + for (PredicateParser predicateParser : predicateParsers) { predicateParser.makePredicate(); + } } catch (CASException e) { throw new AnalysisEngineProcessException(e); @@ -237,8 +242,9 @@ public TreebankNode makeTreebankNode(JCas jCas) { node.setNodeType(this.type); node.setChildren(new FSArray(jCas, this.children.size())); FSCollectionFactory.fillArrayFS(node.getChildren(), this.children); - for (TreebankNode child : this.children) + for (TreebankNode child : this.children) { child.setParent(node); + } node.addToIndexes(); return node; } @@ -248,18 +254,18 @@ public TreebankNode makeTreebankNode(JCas jCas) { private static class CharniakParseParser { Stack parseStack; - List terminals; + List terminals; JCas jCas; CharniakParseParser(JCas jCas) { parseStack = new Stack(); parseStack.push(new Constituent("TOP")); - terminals = new ArrayList(); + terminals = new ArrayList<>(); this.jCas = jCas; } - void feed(String segment, TreebankNode terminal) throws IOException { + void feed(String segment, TerminalTreebankNode terminal) throws IOException { BufferedReader r = new BufferedReader(new StringReader(segment)); terminals.add(terminal); @@ -291,8 +297,9 @@ public TopTreebankNode makeParse() { List children = parseStack.peek().children; node.setChildren(new FSArray(jCas, children.size())); FSCollectionFactory.fillArrayFS(node.getChildren(), children); - for (TreebankNode child : parseStack.peek().children) + for (TreebankNode child : parseStack.peek().children) { child.setParent(node); + } node.setTerminals(new FSArray(jCas, this.terminals.size())); FSCollectionFactory.fillArrayFS(node.getTerminals(), this.terminals); node.addToIndexes(); @@ -376,8 +383,9 @@ void feed(String segment, Token token) throws IOException { this.argumentTokens = null; break; case '*': - if (this.argumentTokens != null) + if (this.argumentTokens != null) { this.argumentTokens.add(token); + } break; default: throw new IOException("unexpected character in string: " + String.valueOf(c) + " (" @@ -409,8 +417,9 @@ private static String readArgumentType(BufferedReader r) throws IOException { while (true) { r.mark(1); int i = r.read(); - if (i == -1) + if (i == -1) { break; + } char c = (char) i; if (c == '(' || c == ')' || c == '*') { @@ -476,8 +485,9 @@ private static String readName(BufferedReader r) throws IOException { while (true) { r.mark(1); int i = r.read(); - if (i == -1) + if (i == -1) { break; + } char c = (char) i; if (c == '*') { diff --git a/cleartk-corpus/src/main/java/org/cleartk/corpus/timeml/TempEval2013Writer.java b/cleartk-corpus/src/main/java/org/cleartk/corpus/timeml/TempEval2013Writer.java index 974fa8ef8..52f9319a5 100644 --- a/cleartk-corpus/src/main/java/org/cleartk/corpus/timeml/TempEval2013Writer.java +++ b/cleartk-corpus/src/main/java/org/cleartk/corpus/timeml/TempEval2013Writer.java @@ -30,6 +30,7 @@ import java.util.Collections; import java.util.List; import java.util.TreeMap; +import java.util.function.IntPredicate; import org.apache.uima.analysis_engine.AnalysisEngineDescription; import org.apache.uima.analysis_engine.AnalysisEngineProcessException; @@ -490,5 +491,35 @@ public int getEnd() { public String getCoveredText() { throw new UnsupportedOperationException(); } + + @Override + public int _id() { + throw new UnsupportedOperationException(); + } + + @Override + public int _getTypeCode() { + throw new UnsupportedOperationException(); + } + + @Override + public int getAddress() { + throw new UnsupportedOperationException(); + } + + @Override + public void setBegin(int aBegin) { + throw new UnsupportedOperationException(); + } + + @Override + public void setEnd(int aEnd) { + throw new UnsupportedOperationException(); + } + + @Override + public void trim(IntPredicate aPredicate) { + throw new UnsupportedOperationException(); + } } } diff --git a/cleartk-eval/.classpath b/cleartk-eval/.classpath index 8fcd3f350..04e989bc1 100644 --- a/cleartk-eval/.classpath +++ b/cleartk-eval/.classpath @@ -10,11 +10,13 @@ +
+ @@ -28,5 +30,22 @@ + + + + + + + + + + + + + + + + + diff --git a/cleartk-eval/.settings/org.eclipse.jdt.core.prefs b/cleartk-eval/.settings/org.eclipse.jdt.core.prefs index 5ca96da39..30fd699ae 100644 --- a/cleartk-eval/.settings/org.eclipse.jdt.core.prefs +++ b/cleartk-eval/.settings/org.eclipse.jdt.core.prefs @@ -17,6 +17,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled org.eclipse.jdt.core.compiler.problem.discouragedReference=warning org.eclipse.jdt.core.compiler.problem.emptyStatement=warning +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled @@ -60,6 +61,7 @@ org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled @@ -87,6 +89,8 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disa org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.processAnnotations=disabled +org.eclipse.jdt.core.compiler.release=disabled org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=48 diff --git a/cleartk-eval/pom.xml b/cleartk-eval/pom.xml index 0023312db..ac2ede255 100644 --- a/cleartk-eval/pom.xml +++ b/cleartk-eval/pom.xml @@ -7,7 +7,7 @@ cleartk org.cleartk - 2.0.1-SNAPSHOT + 3.0.0-SNAPSHOT .. diff --git a/cleartk-examples/.classpath b/cleartk-examples/.classpath index a3116531e..0cf328747 100644 --- a/cleartk-examples/.classpath +++ b/cleartk-examples/.classpath @@ -15,28 +15,47 @@ + + - + + + + + + + + + + + + + - + + - + + + + + diff --git a/cleartk-examples/.settings/org.eclipse.jdt.core.prefs b/cleartk-examples/.settings/org.eclipse.jdt.core.prefs index 5ca96da39..30fd699ae 100644 --- a/cleartk-examples/.settings/org.eclipse.jdt.core.prefs +++ b/cleartk-examples/.settings/org.eclipse.jdt.core.prefs @@ -17,6 +17,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled org.eclipse.jdt.core.compiler.problem.discouragedReference=warning org.eclipse.jdt.core.compiler.problem.emptyStatement=warning +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled @@ -60,6 +61,7 @@ org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled @@ -87,6 +89,8 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disa org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.processAnnotations=disabled +org.eclipse.jdt.core.compiler.release=disabled org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=48 diff --git a/cleartk-examples/pom.xml b/cleartk-examples/pom.xml index cf6c2379e..0c9333cee 100644 --- a/cleartk-examples/pom.xml +++ b/cleartk-examples/pom.xml @@ -7,7 +7,7 @@ cleartk org.cleartk - 2.0.1-SNAPSHOT + 3.0.0-SNAPSHOT .. diff --git a/cleartk-examples/src/main/resources/eclipse/launch/CVD (cleartk-examples).launch b/cleartk-examples/src/main/resources/eclipse/launch/CVD (cleartk-examples).launch index 4b2ce2b8e..e0221301b 100644 --- a/cleartk-examples/src/main/resources/eclipse/launch/CVD (cleartk-examples).launch +++ b/cleartk-examples/src/main/resources/eclipse/launch/CVD (cleartk-examples).launch @@ -1,14 +1,14 @@ - - - - - - - - - - - + + + + + + + + + + + diff --git a/cleartk-feature/.classpath b/cleartk-feature/.classpath index e0c8452cb..3401e3564 100644 --- a/cleartk-feature/.classpath +++ b/cleartk-feature/.classpath @@ -10,6 +10,7 @@ + @@ -23,5 +24,22 @@ + + + + + + + + + + + + + + + + + diff --git a/cleartk-feature/.settings/org.eclipse.jdt.core.prefs b/cleartk-feature/.settings/org.eclipse.jdt.core.prefs index 5ca96da39..30fd699ae 100644 --- a/cleartk-feature/.settings/org.eclipse.jdt.core.prefs +++ b/cleartk-feature/.settings/org.eclipse.jdt.core.prefs @@ -17,6 +17,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled org.eclipse.jdt.core.compiler.problem.discouragedReference=warning org.eclipse.jdt.core.compiler.problem.emptyStatement=warning +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled @@ -60,6 +61,7 @@ org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled @@ -87,6 +89,8 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disa org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.processAnnotations=disabled +org.eclipse.jdt.core.compiler.release=disabled org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=48 diff --git a/cleartk-feature/pom.xml b/cleartk-feature/pom.xml index 5b63de89a..61ce1925a 100644 --- a/cleartk-feature/pom.xml +++ b/cleartk-feature/pom.xml @@ -7,7 +7,7 @@ cleartk org.cleartk - 2.0.1-SNAPSHOT + 3.0.0-SNAPSHOT .. diff --git a/cleartk-maltparser/.classpath b/cleartk-maltparser/.classpath index cd21235fd..d509304cb 100644 --- a/cleartk-maltparser/.classpath +++ b/cleartk-maltparser/.classpath @@ -15,6 +15,7 @@ + @@ -28,5 +29,22 @@ + + + + + + + + + + + + + + + + + diff --git a/cleartk-maltparser/.settings/org.eclipse.jdt.core.prefs b/cleartk-maltparser/.settings/org.eclipse.jdt.core.prefs index 5ca96da39..30fd699ae 100644 --- a/cleartk-maltparser/.settings/org.eclipse.jdt.core.prefs +++ b/cleartk-maltparser/.settings/org.eclipse.jdt.core.prefs @@ -17,6 +17,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled org.eclipse.jdt.core.compiler.problem.discouragedReference=warning org.eclipse.jdt.core.compiler.problem.emptyStatement=warning +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled @@ -60,6 +61,7 @@ org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled @@ -87,6 +89,8 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disa org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.processAnnotations=disabled +org.eclipse.jdt.core.compiler.release=disabled org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=48 diff --git a/cleartk-maltparser/pom.xml b/cleartk-maltparser/pom.xml index b7de52adf..bd4786b57 100644 --- a/cleartk-maltparser/pom.xml +++ b/cleartk-maltparser/pom.xml @@ -7,7 +7,7 @@ cleartk org.cleartk - 2.0.1-SNAPSHOT + 3.0.0-SNAPSHOT .. diff --git a/cleartk-ml-crfsuite/.classpath b/cleartk-ml-crfsuite/.classpath index aeca05c56..6b0f1b4e7 100644 --- a/cleartk-ml-crfsuite/.classpath +++ b/cleartk-ml-crfsuite/.classpath @@ -15,11 +15,13 @@ + + @@ -33,5 +35,22 @@ + + + + + + + + + + + + + + + + + diff --git a/cleartk-ml-crfsuite/.settings/org.eclipse.jdt.core.prefs b/cleartk-ml-crfsuite/.settings/org.eclipse.jdt.core.prefs index 5ca96da39..30fd699ae 100644 --- a/cleartk-ml-crfsuite/.settings/org.eclipse.jdt.core.prefs +++ b/cleartk-ml-crfsuite/.settings/org.eclipse.jdt.core.prefs @@ -17,6 +17,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled org.eclipse.jdt.core.compiler.problem.discouragedReference=warning org.eclipse.jdt.core.compiler.problem.emptyStatement=warning +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled @@ -60,6 +61,7 @@ org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled @@ -87,6 +89,8 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disa org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.processAnnotations=disabled +org.eclipse.jdt.core.compiler.release=disabled org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=48 diff --git a/cleartk-ml-crfsuite/pom.xml b/cleartk-ml-crfsuite/pom.xml index 60065d211..e5bd5aabb 100644 --- a/cleartk-ml-crfsuite/pom.xml +++ b/cleartk-ml-crfsuite/pom.xml @@ -29,7 +29,7 @@ cleartk org.cleartk - 2.0.1-SNAPSHOT + 3.0.0-SNAPSHOT .. diff --git a/cleartk-ml-liblinear/.classpath b/cleartk-ml-liblinear/.classpath index af1430be1..f0257c5a5 100644 --- a/cleartk-ml-liblinear/.classpath +++ b/cleartk-ml-liblinear/.classpath @@ -10,6 +10,7 @@ + @@ -22,5 +23,22 @@ + + + + + + + + + + + + + + + + + diff --git a/cleartk-ml-liblinear/.settings/org.eclipse.jdt.core.prefs b/cleartk-ml-liblinear/.settings/org.eclipse.jdt.core.prefs index 5ca96da39..30fd699ae 100644 --- a/cleartk-ml-liblinear/.settings/org.eclipse.jdt.core.prefs +++ b/cleartk-ml-liblinear/.settings/org.eclipse.jdt.core.prefs @@ -17,6 +17,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled org.eclipse.jdt.core.compiler.problem.discouragedReference=warning org.eclipse.jdt.core.compiler.problem.emptyStatement=warning +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled @@ -60,6 +61,7 @@ org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled @@ -87,6 +89,8 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disa org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.processAnnotations=disabled +org.eclipse.jdt.core.compiler.release=disabled org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=48 diff --git a/cleartk-ml-liblinear/pom.xml b/cleartk-ml-liblinear/pom.xml index 42e2a14a1..5ac81b1ca 100644 --- a/cleartk-ml-liblinear/pom.xml +++ b/cleartk-ml-liblinear/pom.xml @@ -7,7 +7,7 @@ cleartk org.cleartk - 2.0.1-SNAPSHOT + 3.0.0-SNAPSHOT .. diff --git a/cleartk-ml-liblinear/src/test/java/org/cleartk/ml/liblinear/LibLinearTest.java b/cleartk-ml-liblinear/src/test/java/org/cleartk/ml/liblinear/LibLinearTest.java index fecc45227..c3da1e431 100644 --- a/cleartk-ml-liblinear/src/test/java/org/cleartk/ml/liblinear/LibLinearTest.java +++ b/cleartk-ml-liblinear/src/test/java/org/cleartk/ml/liblinear/LibLinearTest.java @@ -30,18 +30,12 @@ import java.util.List; import java.util.Map; -import org.apache.commons.lang.SerializationUtils; +import org.apache.commons.lang3.SerializationUtils; import org.cleartk.ml.Feature; import org.cleartk.ml.Instance; import org.cleartk.ml.jar.DefaultDataWriterFactory; import org.cleartk.ml.jar.DirectoryDataWriterFactory; import org.cleartk.ml.jar.Train; -import org.cleartk.ml.liblinear.LibLinearBooleanOutcomeClassifier; -import org.cleartk.ml.liblinear.LibLinearBooleanOutcomeClassifierBuilder; -import org.cleartk.ml.liblinear.LibLinearBooleanOutcomeDataWriter; -import org.cleartk.ml.liblinear.LibLinearStringOutcomeClassifier; -import org.cleartk.ml.liblinear.LibLinearStringOutcomeClassifierBuilder; -import org.cleartk.ml.liblinear.LibLinearStringOutcomeDataWriter; import org.cleartk.ml.liblinear.ExampleInstanceFactory.BooleanAnnotator; import org.cleartk.ml.liblinear.ExampleInstanceFactory.StringAnnotator; import org.cleartk.ml.liblinear.encoder.FeatureNodeArrayEncoder; diff --git a/cleartk-ml-libsvm-tk/.classpath b/cleartk-ml-libsvm-tk/.classpath index 83dd2f44a..6479d129b 100644 --- a/cleartk-ml-libsvm-tk/.classpath +++ b/cleartk-ml-libsvm-tk/.classpath @@ -10,6 +10,7 @@ + @@ -22,5 +23,22 @@ + + + + + + + + + + + + + + + + + diff --git a/cleartk-ml-libsvm-tk/.settings/org.eclipse.jdt.core.prefs b/cleartk-ml-libsvm-tk/.settings/org.eclipse.jdt.core.prefs index 714351aec..1b6e1ef22 100644 --- a/cleartk-ml-libsvm-tk/.settings/org.eclipse.jdt.core.prefs +++ b/cleartk-ml-libsvm-tk/.settings/org.eclipse.jdt.core.prefs @@ -1,5 +1,9 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore +org.eclipse.jdt.core.compiler.processAnnotations=disabled +org.eclipse.jdt.core.compiler.release=disabled org.eclipse.jdt.core.compiler.source=1.8 diff --git a/cleartk-ml-libsvm-tk/pom.xml b/cleartk-ml-libsvm-tk/pom.xml index 889b0fbc8..ba536e9a3 100644 --- a/cleartk-ml-libsvm-tk/pom.xml +++ b/cleartk-ml-libsvm-tk/pom.xml @@ -4,7 +4,7 @@ org.cleartk cleartk - 2.0.1-SNAPSHOT + 3.0.0-SNAPSHOT .. cleartk-ml-libsvm-tk diff --git a/cleartk-ml-libsvm/.classpath b/cleartk-ml-libsvm/.classpath index e0c8452cb..3401e3564 100644 --- a/cleartk-ml-libsvm/.classpath +++ b/cleartk-ml-libsvm/.classpath @@ -10,6 +10,7 @@ + @@ -23,5 +24,22 @@ + + + + + + + + + + + + + + + + + diff --git a/cleartk-ml-libsvm/.settings/org.eclipse.jdt.core.prefs b/cleartk-ml-libsvm/.settings/org.eclipse.jdt.core.prefs index 5ca96da39..30fd699ae 100644 --- a/cleartk-ml-libsvm/.settings/org.eclipse.jdt.core.prefs +++ b/cleartk-ml-libsvm/.settings/org.eclipse.jdt.core.prefs @@ -17,6 +17,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled org.eclipse.jdt.core.compiler.problem.discouragedReference=warning org.eclipse.jdt.core.compiler.problem.emptyStatement=warning +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled @@ -60,6 +61,7 @@ org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled @@ -87,6 +89,8 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disa org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.processAnnotations=disabled +org.eclipse.jdt.core.compiler.release=disabled org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=48 diff --git a/cleartk-ml-libsvm/pom.xml b/cleartk-ml-libsvm/pom.xml index dec69ca66..290e6ef94 100644 --- a/cleartk-ml-libsvm/pom.xml +++ b/cleartk-ml-libsvm/pom.xml @@ -7,7 +7,7 @@ cleartk org.cleartk - 2.0.1-SNAPSHOT + 3.0.0-SNAPSHOT .. diff --git a/cleartk-ml-mallet/.classpath b/cleartk-ml-mallet/.classpath index 8fcd3f350..04e989bc1 100644 --- a/cleartk-ml-mallet/.classpath +++ b/cleartk-ml-mallet/.classpath @@ -10,11 +10,13 @@ + + @@ -28,5 +30,22 @@ + + + + + + + + + + + + + + + + + diff --git a/cleartk-ml-mallet/.settings/org.eclipse.jdt.core.prefs b/cleartk-ml-mallet/.settings/org.eclipse.jdt.core.prefs index 5ca96da39..30fd699ae 100644 --- a/cleartk-ml-mallet/.settings/org.eclipse.jdt.core.prefs +++ b/cleartk-ml-mallet/.settings/org.eclipse.jdt.core.prefs @@ -17,6 +17,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled org.eclipse.jdt.core.compiler.problem.discouragedReference=warning org.eclipse.jdt.core.compiler.problem.emptyStatement=warning +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled @@ -60,6 +61,7 @@ org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled @@ -87,6 +89,8 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disa org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.processAnnotations=disabled +org.eclipse.jdt.core.compiler.release=disabled org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=48 diff --git a/cleartk-ml-mallet/pom.xml b/cleartk-ml-mallet/pom.xml index 9ce3b9223..9164e3bae 100644 --- a/cleartk-ml-mallet/pom.xml +++ b/cleartk-ml-mallet/pom.xml @@ -7,7 +7,7 @@ cleartk org.cleartk - 2.0.1-SNAPSHOT + 3.0.0-SNAPSHOT .. diff --git a/cleartk-ml-opennlp-maxent/.classpath b/cleartk-ml-opennlp-maxent/.classpath index e0c8452cb..3401e3564 100644 --- a/cleartk-ml-opennlp-maxent/.classpath +++ b/cleartk-ml-opennlp-maxent/.classpath @@ -10,6 +10,7 @@ + @@ -23,5 +24,22 @@ + + + + + + + + + + + + + + + + + diff --git a/cleartk-ml-opennlp-maxent/.settings/org.eclipse.jdt.core.prefs b/cleartk-ml-opennlp-maxent/.settings/org.eclipse.jdt.core.prefs index 5ca96da39..30fd699ae 100644 --- a/cleartk-ml-opennlp-maxent/.settings/org.eclipse.jdt.core.prefs +++ b/cleartk-ml-opennlp-maxent/.settings/org.eclipse.jdt.core.prefs @@ -17,6 +17,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled org.eclipse.jdt.core.compiler.problem.discouragedReference=warning org.eclipse.jdt.core.compiler.problem.emptyStatement=warning +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled @@ -60,6 +61,7 @@ org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled @@ -87,6 +89,8 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disa org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.processAnnotations=disabled +org.eclipse.jdt.core.compiler.release=disabled org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=48 diff --git a/cleartk-ml-opennlp-maxent/pom.xml b/cleartk-ml-opennlp-maxent/pom.xml index d5e5101c9..cc12258ae 100644 --- a/cleartk-ml-opennlp-maxent/pom.xml +++ b/cleartk-ml-opennlp-maxent/pom.xml @@ -7,7 +7,7 @@ cleartk org.cleartk - 2.0.1-SNAPSHOT + 3.0.0-SNAPSHOT .. diff --git a/cleartk-ml-script/.classpath b/cleartk-ml-script/.classpath index cd21235fd..3401e3564 100644 --- a/cleartk-ml-script/.classpath +++ b/cleartk-ml-script/.classpath @@ -6,15 +6,11 @@ - - - - - + @@ -28,5 +24,22 @@ + + + + + + + + + + + + + + + + + diff --git a/cleartk-ml-script/.settings/org.eclipse.jdt.core.prefs b/cleartk-ml-script/.settings/org.eclipse.jdt.core.prefs index 714351aec..1b6e1ef22 100644 --- a/cleartk-ml-script/.settings/org.eclipse.jdt.core.prefs +++ b/cleartk-ml-script/.settings/org.eclipse.jdt.core.prefs @@ -1,5 +1,9 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore +org.eclipse.jdt.core.compiler.processAnnotations=disabled +org.eclipse.jdt.core.compiler.release=disabled org.eclipse.jdt.core.compiler.source=1.8 diff --git a/cleartk-ml-script/pom.xml b/cleartk-ml-script/pom.xml index 042eebf25..951478a3a 100644 --- a/cleartk-ml-script/pom.xml +++ b/cleartk-ml-script/pom.xml @@ -3,7 +3,7 @@ org.cleartk cleartk - 2.0.1-SNAPSHOT + 3.0.0-SNAPSHOT cleartk-ml-script ClearTK ML Script diff --git a/cleartk-ml-svmlight/.classpath b/cleartk-ml-svmlight/.classpath index 8fcd3f350..04e989bc1 100644 --- a/cleartk-ml-svmlight/.classpath +++ b/cleartk-ml-svmlight/.classpath @@ -10,11 +10,13 @@ + + @@ -28,5 +30,22 @@ + + + + + + + + + + + + + + + + + diff --git a/cleartk-ml-svmlight/.settings/org.eclipse.jdt.core.prefs b/cleartk-ml-svmlight/.settings/org.eclipse.jdt.core.prefs index 5ca96da39..30fd699ae 100644 --- a/cleartk-ml-svmlight/.settings/org.eclipse.jdt.core.prefs +++ b/cleartk-ml-svmlight/.settings/org.eclipse.jdt.core.prefs @@ -17,6 +17,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled org.eclipse.jdt.core.compiler.problem.discouragedReference=warning org.eclipse.jdt.core.compiler.problem.emptyStatement=warning +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled @@ -60,6 +61,7 @@ org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled @@ -87,6 +89,8 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disa org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.processAnnotations=disabled +org.eclipse.jdt.core.compiler.release=disabled org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=48 diff --git a/cleartk-ml-svmlight/pom.xml b/cleartk-ml-svmlight/pom.xml index 9df471f97..d76df8b83 100644 --- a/cleartk-ml-svmlight/pom.xml +++ b/cleartk-ml-svmlight/pom.xml @@ -7,7 +7,7 @@ cleartk org.cleartk - 2.0.1-SNAPSHOT + 3.0.0-SNAPSHOT .. diff --git a/cleartk-ml-tksvmlight/.classpath b/cleartk-ml-tksvmlight/.classpath index e0c8452cb..3401e3564 100644 --- a/cleartk-ml-tksvmlight/.classpath +++ b/cleartk-ml-tksvmlight/.classpath @@ -10,6 +10,7 @@ + @@ -23,5 +24,22 @@ + + + + + + + + + + + + + + + + + diff --git a/cleartk-ml-tksvmlight/.settings/org.eclipse.jdt.core.prefs b/cleartk-ml-tksvmlight/.settings/org.eclipse.jdt.core.prefs index 5ca96da39..30fd699ae 100644 --- a/cleartk-ml-tksvmlight/.settings/org.eclipse.jdt.core.prefs +++ b/cleartk-ml-tksvmlight/.settings/org.eclipse.jdt.core.prefs @@ -17,6 +17,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled org.eclipse.jdt.core.compiler.problem.discouragedReference=warning org.eclipse.jdt.core.compiler.problem.emptyStatement=warning +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled @@ -60,6 +61,7 @@ org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled @@ -87,6 +89,8 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disa org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.processAnnotations=disabled +org.eclipse.jdt.core.compiler.release=disabled org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=48 diff --git a/cleartk-ml-tksvmlight/pom.xml b/cleartk-ml-tksvmlight/pom.xml index 4a4e0dac4..d47f29e19 100644 --- a/cleartk-ml-tksvmlight/pom.xml +++ b/cleartk-ml-tksvmlight/pom.xml @@ -7,7 +7,7 @@ cleartk org.cleartk - 2.0.1-SNAPSHOT + 3.0.0-SNAPSHOT .. diff --git a/cleartk-ml-tksvmlight/src/main/java/org/cleartk/ml/tksvmlight/kernel/TreeKernel_ImplBase.java b/cleartk-ml-tksvmlight/src/main/java/org/cleartk/ml/tksvmlight/kernel/TreeKernel_ImplBase.java index 346a5a2f3..8606eae45 100644 --- a/cleartk-ml-tksvmlight/src/main/java/org/cleartk/ml/tksvmlight/kernel/TreeKernel_ImplBase.java +++ b/cleartk-ml-tksvmlight/src/main/java/org/cleartk/ml/tksvmlight/kernel/TreeKernel_ImplBase.java @@ -26,7 +26,7 @@ import java.util.ArrayList; import java.util.List; -import org.apache.commons.lang.NotImplementedException; +import org.apache.commons.lang3.NotImplementedException; import org.cleartk.ml.tksvmlight.TreeFeature; import org.cleartk.ml.tksvmlight.TreeFeatureVector; /** @@ -46,6 +46,7 @@ public abstract class TreeKernel_ImplBase implements ComposableTreeKernel { protected ForestSumMethod sumMethod = ForestSumMethod.SEQUENTIAL; + @Override public double evaluate(TreeFeatureVector fv1, TreeFeatureVector fv2) { double sim = 0.0; if (sumMethod == ForestSumMethod.SEQUENTIAL) { @@ -62,6 +63,7 @@ public double evaluate(TreeFeatureVector fv1, TreeFeatureVector fv2) { return sim; } + @Override public abstract double evaluate(TreeFeature tf1, TreeFeature tf2); } diff --git a/cleartk-ml-weka/.classpath b/cleartk-ml-weka/.classpath index e0c8452cb..3401e3564 100644 --- a/cleartk-ml-weka/.classpath +++ b/cleartk-ml-weka/.classpath @@ -10,6 +10,7 @@ + @@ -23,5 +24,22 @@ + + + + + + + + + + + + + + + + + diff --git a/cleartk-ml-weka/.settings/org.eclipse.jdt.core.prefs b/cleartk-ml-weka/.settings/org.eclipse.jdt.core.prefs index 5ca96da39..30fd699ae 100644 --- a/cleartk-ml-weka/.settings/org.eclipse.jdt.core.prefs +++ b/cleartk-ml-weka/.settings/org.eclipse.jdt.core.prefs @@ -17,6 +17,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled org.eclipse.jdt.core.compiler.problem.discouragedReference=warning org.eclipse.jdt.core.compiler.problem.emptyStatement=warning +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled @@ -60,6 +61,7 @@ org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled @@ -87,6 +89,8 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disa org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.processAnnotations=disabled +org.eclipse.jdt.core.compiler.release=disabled org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=48 diff --git a/cleartk-ml-weka/pom.xml b/cleartk-ml-weka/pom.xml index 256e42af0..c74df901c 100644 --- a/cleartk-ml-weka/pom.xml +++ b/cleartk-ml-weka/pom.xml @@ -14,7 +14,7 @@ cleartk org.cleartk - 2.0.1-SNAPSHOT + 3.0.0-SNAPSHOT .. diff --git a/cleartk-ml-weka/src/main/java/org/cleartk/ml/weka/WekaStringOutcomeClassifier.java b/cleartk-ml-weka/src/main/java/org/cleartk/ml/weka/WekaStringOutcomeClassifier.java index de12d105c..907ec439b 100644 --- a/cleartk-ml-weka/src/main/java/org/cleartk/ml/weka/WekaStringOutcomeClassifier.java +++ b/cleartk-ml-weka/src/main/java/org/cleartk/ml/weka/WekaStringOutcomeClassifier.java @@ -21,7 +21,7 @@ import java.util.List; import java.util.Map; -import org.apache.commons.lang.NotImplementedException; +import org.apache.commons.lang3.NotImplementedException; import org.cleartk.ml.CleartkProcessingException; import org.cleartk.ml.Feature; import org.cleartk.ml.encoder.features.FeaturesEncoder; diff --git a/cleartk-ml/.classpath b/cleartk-ml/.classpath index cd21235fd..d509304cb 100644 --- a/cleartk-ml/.classpath +++ b/cleartk-ml/.classpath @@ -15,6 +15,7 @@ + @@ -28,5 +29,22 @@ + + + + + + + + + + + + + + + + + diff --git a/cleartk-ml/.settings/org.eclipse.jdt.core.prefs b/cleartk-ml/.settings/org.eclipse.jdt.core.prefs index 5ca96da39..30fd699ae 100644 --- a/cleartk-ml/.settings/org.eclipse.jdt.core.prefs +++ b/cleartk-ml/.settings/org.eclipse.jdt.core.prefs @@ -17,6 +17,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled org.eclipse.jdt.core.compiler.problem.discouragedReference=warning org.eclipse.jdt.core.compiler.problem.emptyStatement=warning +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled @@ -60,6 +61,7 @@ org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled @@ -87,6 +89,8 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disa org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.processAnnotations=disabled +org.eclipse.jdt.core.compiler.release=disabled org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=48 diff --git a/cleartk-ml/pom.xml b/cleartk-ml/pom.xml index b8c9f337e..6aa0c4dfd 100644 --- a/cleartk-ml/pom.xml +++ b/cleartk-ml/pom.xml @@ -7,7 +7,7 @@ cleartk org.cleartk - 2.0.1-SNAPSHOT + 3.0.0-SNAPSHOT .. diff --git a/cleartk-opennlp-tools/.classpath b/cleartk-opennlp-tools/.classpath index aeca05c56..6b0f1b4e7 100644 --- a/cleartk-opennlp-tools/.classpath +++ b/cleartk-opennlp-tools/.classpath @@ -15,11 +15,13 @@ + + @@ -33,5 +35,22 @@ + + + + + + + + + + + + + + + + + diff --git a/cleartk-opennlp-tools/.settings/org.eclipse.jdt.core.prefs b/cleartk-opennlp-tools/.settings/org.eclipse.jdt.core.prefs index 5ca96da39..30fd699ae 100644 --- a/cleartk-opennlp-tools/.settings/org.eclipse.jdt.core.prefs +++ b/cleartk-opennlp-tools/.settings/org.eclipse.jdt.core.prefs @@ -17,6 +17,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled org.eclipse.jdt.core.compiler.problem.discouragedReference=warning org.eclipse.jdt.core.compiler.problem.emptyStatement=warning +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled @@ -60,6 +61,7 @@ org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled @@ -87,6 +89,8 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disa org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.processAnnotations=disabled +org.eclipse.jdt.core.compiler.release=disabled org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=48 diff --git a/cleartk-opennlp-tools/pom.xml b/cleartk-opennlp-tools/pom.xml index dfb7f24a6..8eea56788 100644 --- a/cleartk-opennlp-tools/pom.xml +++ b/cleartk-opennlp-tools/pom.xml @@ -7,7 +7,7 @@ cleartk org.cleartk - 2.0.1-SNAPSHOT + 3.0.0-SNAPSHOT .. diff --git a/cleartk-opennlp-tools/src/main/java/org/cleartk/opennlp/tools/PosTagger.java b/cleartk-opennlp-tools/src/main/java/org/cleartk/opennlp/tools/PosTagger.java index 66565e4a3..4b23b8ce6 100644 --- a/cleartk-opennlp-tools/src/main/java/org/cleartk/opennlp/tools/PosTagger.java +++ b/cleartk-opennlp-tools/src/main/java/org/cleartk/opennlp/tools/PosTagger.java @@ -51,9 +51,9 @@ public static AnalysisEngineDescription getDescription(String languageCode) return AnalysisEngineFactory.createEngineDescription( opennlp.uima.postag.POSTagger.class, opennlp.uima.util.UimaUtil.MODEL_PARAMETER, - ExternalResourceFactory.createExternalResourceDescription( - POSModelResourceImpl.class, - PosTagger.class.getResource(modelPath).toString()), + ExternalResourceFactory.createSharedResourceDescription( + PosTagger.class.getResource(modelPath).toString(), + POSModelResourceImpl.class), opennlp.uima.util.UimaUtil.SENTENCE_TYPE_PARAMETER, Sentence.class.getName(), opennlp.uima.util.UimaUtil.TOKEN_TYPE_PARAMETER, diff --git a/cleartk-opennlp-tools/src/main/java/org/cleartk/opennlp/tools/Tokenizer.java b/cleartk-opennlp-tools/src/main/java/org/cleartk/opennlp/tools/Tokenizer.java index a10882a9a..fafdef6e2 100644 --- a/cleartk-opennlp-tools/src/main/java/org/cleartk/opennlp/tools/Tokenizer.java +++ b/cleartk-opennlp-tools/src/main/java/org/cleartk/opennlp/tools/Tokenizer.java @@ -51,9 +51,9 @@ public static AnalysisEngineDescription getDescription(String languageCode) return AnalysisEngineFactory.createEngineDescription( opennlp.uima.tokenize.Tokenizer.class, opennlp.uima.util.UimaUtil.MODEL_PARAMETER, - ExternalResourceFactory.createExternalResourceDescription( - TokenizerModelResourceImpl.class, - Tokenizer.class.getResource(modelPath).toString()), + ExternalResourceFactory.createSharedResourceDescription( + Tokenizer.class.getResource(modelPath).toString(), + TokenizerModelResourceImpl.class), opennlp.uima.util.UimaUtil.SENTENCE_TYPE_PARAMETER, Sentence.class.getName(), opennlp.uima.util.UimaUtil.TOKEN_TYPE_PARAMETER, diff --git a/cleartk-opennlp-tools/src/main/java/org/cleartk/opennlp/tools/parser/DefaultOutputTypesHelper.java b/cleartk-opennlp-tools/src/main/java/org/cleartk/opennlp/tools/parser/DefaultOutputTypesHelper.java index d829da18f..a54e3db03 100644 --- a/cleartk-opennlp-tools/src/main/java/org/cleartk/opennlp/tools/parser/DefaultOutputTypesHelper.java +++ b/cleartk-opennlp-tools/src/main/java/org/cleartk/opennlp/tools/parser/DefaultOutputTypesHelper.java @@ -25,21 +25,22 @@ package org.cleartk.opennlp.tools.parser; import java.util.ArrayList; +import java.util.Collection; import java.util.List; -import opennlp.tools.parser.AbstractBottomUpParser; -import opennlp.tools.parser.Parse; - +import org.apache.uima.fit.util.FSCollectionFactory; import org.apache.uima.jcas.JCas; import org.apache.uima.jcas.cas.FSArray; import org.apache.uima.jcas.tcas.Annotation; import org.cleartk.syntax.constituent.type.TerminalTreebankNode; import org.cleartk.syntax.constituent.type.TopTreebankNode; import org.cleartk.syntax.constituent.type.TreebankNode; -import org.apache.uima.fit.util.FSCollectionFactory; import com.google.common.annotations.Beta; +import opennlp.tools.parser.AbstractBottomUpParser; +import opennlp.tools.parser.Parse; + /** *
* Copyright (c) 2011, Regents of the University of Colorado
@@ -68,7 +69,7 @@ public TreebankNode addParse( node.setTreebankParse(sb.toString()); List terminals = getTerminals(node); node.setTerminals(new FSArray(jCas, terminals.size())); - FSCollectionFactory.fillArrayFS(node.getTerminals(), terminals); + FSCollectionFactory.fillArrayFS(node.getTerminals(), (Collection) terminals); return node; } diff --git a/cleartk-snowball/.classpath b/cleartk-snowball/.classpath index af1430be1..f0257c5a5 100644 --- a/cleartk-snowball/.classpath +++ b/cleartk-snowball/.classpath @@ -10,6 +10,7 @@ +
@@ -22,5 +23,22 @@ + + + + + + + + + + + + + + + + + diff --git a/cleartk-snowball/.settings/org.eclipse.jdt.core.prefs b/cleartk-snowball/.settings/org.eclipse.jdt.core.prefs index 5ca96da39..30fd699ae 100644 --- a/cleartk-snowball/.settings/org.eclipse.jdt.core.prefs +++ b/cleartk-snowball/.settings/org.eclipse.jdt.core.prefs @@ -17,6 +17,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled org.eclipse.jdt.core.compiler.problem.discouragedReference=warning org.eclipse.jdt.core.compiler.problem.emptyStatement=warning +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled @@ -60,6 +61,7 @@ org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled @@ -87,6 +89,8 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disa org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.processAnnotations=disabled +org.eclipse.jdt.core.compiler.release=disabled org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=48 diff --git a/cleartk-snowball/pom.xml b/cleartk-snowball/pom.xml index 4ff892cb8..34338d61f 100644 --- a/cleartk-snowball/pom.xml +++ b/cleartk-snowball/pom.xml @@ -7,7 +7,7 @@ cleartk org.cleartk - 2.0.1-SNAPSHOT + 3.0.0-SNAPSHOT .. diff --git a/cleartk-stanford-corenlp/.classpath b/cleartk-stanford-corenlp/.classpath index e0c8452cb..3401e3564 100644 --- a/cleartk-stanford-corenlp/.classpath +++ b/cleartk-stanford-corenlp/.classpath @@ -10,6 +10,7 @@ + @@ -23,5 +24,22 @@ + + + + + + + + + + + + + + + + + diff --git a/cleartk-stanford-corenlp/.settings/org.eclipse.jdt.core.prefs b/cleartk-stanford-corenlp/.settings/org.eclipse.jdt.core.prefs index 5ca96da39..30fd699ae 100644 --- a/cleartk-stanford-corenlp/.settings/org.eclipse.jdt.core.prefs +++ b/cleartk-stanford-corenlp/.settings/org.eclipse.jdt.core.prefs @@ -17,6 +17,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled org.eclipse.jdt.core.compiler.problem.discouragedReference=warning org.eclipse.jdt.core.compiler.problem.emptyStatement=warning +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled @@ -60,6 +61,7 @@ org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled @@ -87,6 +89,8 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disa org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.processAnnotations=disabled +org.eclipse.jdt.core.compiler.release=disabled org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=48 diff --git a/cleartk-stanford-corenlp/pom.xml b/cleartk-stanford-corenlp/pom.xml index 7bdb340a3..78bdb9a0e 100644 --- a/cleartk-stanford-corenlp/pom.xml +++ b/cleartk-stanford-corenlp/pom.xml @@ -14,7 +14,7 @@ cleartk org.cleartk - 2.0.1-SNAPSHOT + 3.0.0-SNAPSHOT .. diff --git a/cleartk-summarization/.classpath b/cleartk-summarization/.classpath index 9fc6429e9..2af6ca16f 100644 --- a/cleartk-summarization/.classpath +++ b/cleartk-summarization/.classpath @@ -15,27 +15,46 @@ + + - + + + + + + + + + + + + + - + + - + + + + + diff --git a/cleartk-summarization/.settings/org.eclipse.jdt.core.prefs b/cleartk-summarization/.settings/org.eclipse.jdt.core.prefs index 5ca96da39..30fd699ae 100644 --- a/cleartk-summarization/.settings/org.eclipse.jdt.core.prefs +++ b/cleartk-summarization/.settings/org.eclipse.jdt.core.prefs @@ -17,6 +17,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled org.eclipse.jdt.core.compiler.problem.discouragedReference=warning org.eclipse.jdt.core.compiler.problem.emptyStatement=warning +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled @@ -60,6 +61,7 @@ org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled @@ -87,6 +89,8 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disa org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.processAnnotations=disabled +org.eclipse.jdt.core.compiler.release=disabled org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=48 diff --git a/cleartk-summarization/pom.xml b/cleartk-summarization/pom.xml index a2c45dd35..a6cc116a0 100644 --- a/cleartk-summarization/pom.xml +++ b/cleartk-summarization/pom.xml @@ -7,7 +7,7 @@ cleartk org.cleartk - 2.0.1-SNAPSHOT + 3.0.0-SNAPSHOT .. diff --git a/cleartk-test-util/.classpath b/cleartk-test-util/.classpath index b8fe83c28..8228141d6 100644 --- a/cleartk-test-util/.classpath +++ b/cleartk-test-util/.classpath @@ -15,11 +15,13 @@ + + @@ -39,5 +41,22 @@ + + + + + + + + + + + + + + + + + diff --git a/cleartk-test-util/.settings/org.eclipse.jdt.core.prefs b/cleartk-test-util/.settings/org.eclipse.jdt.core.prefs index 85e292bff..c22f36ad5 100644 --- a/cleartk-test-util/.settings/org.eclipse.jdt.core.prefs +++ b/cleartk-test-util/.settings/org.eclipse.jdt.core.prefs @@ -11,6 +11,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled org.eclipse.jdt.core.compiler.problem.discouragedReference=warning org.eclipse.jdt.core.compiler.problem.emptyStatement=warning +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore @@ -53,6 +54,7 @@ org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled @@ -80,6 +82,8 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disa org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.processAnnotations=disabled +org.eclipse.jdt.core.compiler.release=disabled org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=48 diff --git a/cleartk-test-util/pom.xml b/cleartk-test-util/pom.xml index 6e01a971d..38c234533 100644 --- a/cleartk-test-util/pom.xml +++ b/cleartk-test-util/pom.xml @@ -7,7 +7,7 @@ cleartk org.cleartk - 2.0.1-SNAPSHOT + 3.0.0-SNAPSHOT .. diff --git a/cleartk-test-util/src/main/java/org/cleartk/test/util/TypeTestUtil.java b/cleartk-test-util/src/main/java/org/cleartk/test/util/TypeTestUtil.java index 7efd9cf49..6d5731933 100644 --- a/cleartk-test-util/src/main/java/org/cleartk/test/util/TypeTestUtil.java +++ b/cleartk-test-util/src/main/java/org/cleartk/test/util/TypeTestUtil.java @@ -115,15 +115,15 @@ private static void invokeMethods(Class cls, Type type, TOP top, JCas jcas, S Object fs = fsType.getConstructor(JCas.class).newInstance(jcas); value.set(0, (FeatureStructure) fs); method.invoke(top, new Object[] { value }); - method = top.jcasType.getClass().getMethod("set" + suffix, int.class, int.class); - method.invoke(top.jcasType, new Object[] { top.getAddress(), value.getAddress() }); + method = top.getClass().getMethod("set" + suffix, int.class, int.class); + method.invoke(top, new Object[] { top.getAddress(), value.getAddress() }); } if (types[0].equals(StringArray.class)) { StringArray value = new StringArray(jcas, 1); value.set(0, "foo"); method.invoke(top, new Object[] { value }); - method = top.jcasType.getClass().getMethod(name, int.class, int.class); - method.invoke(top.jcasType, new Object[] { top.getAddress(), value.getAddress() }); + method = top.getClass().getMethod(name, int.class, int.class); + method.invoke(top, new Object[] { top.getAddress(), value.getAddress() }); } } } @@ -150,8 +150,8 @@ private static void invokeMethods(Class cls, Type type, TOP top, JCas jcas, S method.invoke(top, values); jcasTypes[0] = int.class; jcasTypeValues[0] = top.getAddress(); - method = top.jcasType.getClass().getMethod(name, jcasTypes); - method.invoke(top.jcasType, jcasTypeValues); + method = top.getClass().getMethod(name, jcasTypes); + method.invoke(top, jcasTypeValues); } } } diff --git a/cleartk-timeml/.classpath b/cleartk-timeml/.classpath index aeca05c56..6b0f1b4e7 100644 --- a/cleartk-timeml/.classpath +++ b/cleartk-timeml/.classpath @@ -15,11 +15,13 @@ + + @@ -33,5 +35,22 @@ + + + + + + + + + + + + + + + + + diff --git a/cleartk-timeml/.settings/org.eclipse.jdt.core.prefs b/cleartk-timeml/.settings/org.eclipse.jdt.core.prefs index 5ca96da39..30fd699ae 100644 --- a/cleartk-timeml/.settings/org.eclipse.jdt.core.prefs +++ b/cleartk-timeml/.settings/org.eclipse.jdt.core.prefs @@ -17,6 +17,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled org.eclipse.jdt.core.compiler.problem.discouragedReference=warning org.eclipse.jdt.core.compiler.problem.emptyStatement=warning +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled @@ -60,6 +61,7 @@ org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled @@ -87,6 +89,8 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disa org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.processAnnotations=disabled +org.eclipse.jdt.core.compiler.release=disabled org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=48 diff --git a/cleartk-timeml/pom.xml b/cleartk-timeml/pom.xml index 61d295e7c..791962c83 100644 --- a/cleartk-timeml/pom.xml +++ b/cleartk-timeml/pom.xml @@ -7,7 +7,7 @@ cleartk org.cleartk - 2.0.1-SNAPSHOT + 3.0.0-SNAPSHOT .. diff --git a/cleartk-token/.classpath b/cleartk-token/.classpath index 8fcd3f350..04e989bc1 100644 --- a/cleartk-token/.classpath +++ b/cleartk-token/.classpath @@ -10,11 +10,13 @@ + + @@ -28,5 +30,22 @@ + + + + + + + + + + + + + + + + + diff --git a/cleartk-token/.settings/org.eclipse.jdt.core.prefs b/cleartk-token/.settings/org.eclipse.jdt.core.prefs index 5ca96da39..30fd699ae 100644 --- a/cleartk-token/.settings/org.eclipse.jdt.core.prefs +++ b/cleartk-token/.settings/org.eclipse.jdt.core.prefs @@ -17,6 +17,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled org.eclipse.jdt.core.compiler.problem.discouragedReference=warning org.eclipse.jdt.core.compiler.problem.emptyStatement=warning +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled @@ -60,6 +61,7 @@ org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled @@ -87,6 +89,8 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disa org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.processAnnotations=disabled +org.eclipse.jdt.core.compiler.release=disabled org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=48 diff --git a/cleartk-token/pom.xml b/cleartk-token/pom.xml index e8d1104e1..3338aa6dd 100644 --- a/cleartk-token/pom.xml +++ b/cleartk-token/pom.xml @@ -7,7 +7,7 @@ cleartk org.cleartk - 2.0.1-SNAPSHOT + 3.0.0-SNAPSHOT .. diff --git a/cleartk-type-system/.classpath b/cleartk-type-system/.classpath index 0f3443f6d..dd5615fe5 100644 --- a/cleartk-type-system/.classpath +++ b/cleartk-type-system/.classpath @@ -21,6 +21,7 @@ + @@ -33,5 +34,22 @@ + + + + + + + + + + + + + + + + + diff --git a/cleartk-type-system/.settings/org.eclipse.jdt.core.prefs b/cleartk-type-system/.settings/org.eclipse.jdt.core.prefs index 85e292bff..c22f36ad5 100644 --- a/cleartk-type-system/.settings/org.eclipse.jdt.core.prefs +++ b/cleartk-type-system/.settings/org.eclipse.jdt.core.prefs @@ -11,6 +11,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled org.eclipse.jdt.core.compiler.problem.discouragedReference=warning org.eclipse.jdt.core.compiler.problem.emptyStatement=warning +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore @@ -53,6 +54,7 @@ org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled @@ -80,6 +82,8 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disa org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.processAnnotations=disabled +org.eclipse.jdt.core.compiler.release=disabled org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=48 diff --git a/cleartk-type-system/pom.xml b/cleartk-type-system/pom.xml index 6ef41107e..089f9f7eb 100644 --- a/cleartk-type-system/pom.xml +++ b/cleartk-type-system/pom.xml @@ -7,7 +7,7 @@ cleartk org.cleartk - 2.0.1-SNAPSHOT + 3.0.0-SNAPSHOT .. diff --git a/cleartk-util/.classpath b/cleartk-util/.classpath index 70ca56c84..bb9a1b353 100644 --- a/cleartk-util/.classpath +++ b/cleartk-util/.classpath @@ -15,11 +15,13 @@ + + @@ -33,5 +35,22 @@ + + + + + + + + + + + + + + + + + diff --git a/cleartk-util/.settings/org.eclipse.jdt.core.prefs b/cleartk-util/.settings/org.eclipse.jdt.core.prefs index 85e292bff..c22f36ad5 100644 --- a/cleartk-util/.settings/org.eclipse.jdt.core.prefs +++ b/cleartk-util/.settings/org.eclipse.jdt.core.prefs @@ -11,6 +11,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled org.eclipse.jdt.core.compiler.problem.discouragedReference=warning org.eclipse.jdt.core.compiler.problem.emptyStatement=warning +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore @@ -53,6 +54,7 @@ org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled @@ -80,6 +82,8 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disa org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.processAnnotations=disabled +org.eclipse.jdt.core.compiler.release=disabled org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=48 diff --git a/cleartk-util/pom.xml b/cleartk-util/pom.xml index 78f796076..fbb867817 100644 --- a/cleartk-util/pom.xml +++ b/cleartk-util/pom.xml @@ -7,7 +7,7 @@ cleartk org.cleartk - 2.0.1-SNAPSHOT + 3.0.0-SNAPSHOT .. diff --git a/cleartk-util/src/main/java/org/cleartk/util/PlatformDetection.java b/cleartk-util/src/main/java/org/cleartk/util/PlatformDetection.java index cbce92c3d..2eebc5693 100644 --- a/cleartk-util/src/main/java/org/cleartk/util/PlatformDetection.java +++ b/cleartk-util/src/main/java/org/cleartk/util/PlatformDetection.java @@ -36,7 +36,7 @@ import java.util.HashMap; import java.util.Map; -import org.apache.commons.lang.SystemUtils; +import org.apache.commons.lang3.SystemUtils; /** *
diff --git a/pom.xml b/pom.xml index 0e42a23e4..600c2bc43 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ 4.0.0 org.cleartk cleartk - 2.0.1-SNAPSHOT + 3.0.0-SNAPSHOT pom ClearTK The official ClearTK release @@ -91,6 +91,8 @@ 1.8 1.8 UTF-8 + 3.3.0 + 3.3.0 @@ -108,17 +110,17 @@ org.apache.uima uimaj-core - 2.9.0 + ${uima-version} org.apache.uima uimaj-document-annotation - 2.9.0 + ${uima-version} org.apache.uima uimafit-core - 2.3.0 + ${uimafit-version} com.google.guava @@ -339,7 +341,7 @@ org.apache.uima jcasgen-maven-plugin - 2.5.0 + ${uima-version} From f82ce949c87772ab897daa44b6ee18770904313a Mon Sep 17 00:00:00 2001 From: Richard Eckart de Castilho Date: Mon, 8 Aug 2022 10:22:58 +0200 Subject: [PATCH 2/8] #442 - Upgrade to UIMAv3 - Bump DKPro Core dependency to 2.2.0 --- cleartk-ml-crfsuite/pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cleartk-ml-crfsuite/pom.xml b/cleartk-ml-crfsuite/pom.xml index e5bd5aabb..0a01532d7 100644 --- a/cleartk-ml-crfsuite/pom.xml +++ b/cleartk-ml-crfsuite/pom.xml @@ -42,9 +42,9 @@ cleartk-ml - de.tudarmstadt.ukp.dkpro.core - de.tudarmstadt.ukp.dkpro.core.api.resources-asl - 1.6.0 + org.dkpro.core + dkpro-core-api-resources-asl + 2.2.0 org.cleartk From e4aec72631a36aa566734e6ff31d4d2244881e74 Mon Sep 17 00:00:00 2001 From: Md Azaz Ali Date: Wed, 10 Aug 2022 02:36:41 +0530 Subject: [PATCH 3/8] fixes for uimaV3 upgrade --- cleartk-ml-crfsuite/pom.xml | 14 ++++ .../cleartk/ml/crfsuite/CrfSuiteWrapper.java | 2 +- .../stanford/corenlp/StanfordCoreNlpTest.java | 67 ++++++++++--------- 3 files changed, 50 insertions(+), 33 deletions(-) diff --git a/cleartk-ml-crfsuite/pom.xml b/cleartk-ml-crfsuite/pom.xml index 0a01532d7..3c55b3176 100644 --- a/cleartk-ml-crfsuite/pom.xml +++ b/cleartk-ml-crfsuite/pom.xml @@ -45,6 +45,20 @@ org.dkpro.core dkpro-core-api-resources-asl 2.2.0 + + + org.springframework + spring-core + + + org.springframework + spring-context + + + org.springframework + spring-beans + + org.cleartk diff --git a/cleartk-ml-crfsuite/src/main/java/org/cleartk/ml/crfsuite/CrfSuiteWrapper.java b/cleartk-ml-crfsuite/src/main/java/org/cleartk/ml/crfsuite/CrfSuiteWrapper.java index 63b731e3f..ad33e7a77 100644 --- a/cleartk-ml-crfsuite/src/main/java/org/cleartk/ml/crfsuite/CrfSuiteWrapper.java +++ b/cleartk-ml-crfsuite/src/main/java/org/cleartk/ml/crfsuite/CrfSuiteWrapper.java @@ -58,7 +58,7 @@ import org.cleartk.util.InputStreamHandler; import org.cleartk.util.PlatformDetection; -import de.tudarmstadt.ukp.dkpro.core.api.resources.ResourceUtils; +import org.dkpro.core.api.resources.ResourceUtils; /** *
diff --git a/cleartk-stanford-corenlp/src/test/java/org/cleartk/stanford/corenlp/StanfordCoreNlpTest.java b/cleartk-stanford-corenlp/src/test/java/org/cleartk/stanford/corenlp/StanfordCoreNlpTest.java index 3393c201e..2b2f4adbb 100644 --- a/cleartk-stanford-corenlp/src/test/java/org/cleartk/stanford/corenlp/StanfordCoreNlpTest.java +++ b/cleartk-stanford-corenlp/src/test/java/org/cleartk/stanford/corenlp/StanfordCoreNlpTest.java @@ -1,17 +1,17 @@ -/** +/** * Copyright (c) 2011, Regents of the University of Colorado * All rights reserved. - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * For a complete copy of the license please see the file LICENSE distributed * with the cleartk-stanford-corenlp project or visit * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. @@ -38,11 +38,11 @@ import java.util.*; /** - * + * *
* Copyright (c) 2011, Regents of the University of Colorado
* All rights reserved. - * + * * @author Steven Bethard */ public class StanfordCoreNlpTest extends CleartkTestBase { @@ -69,29 +69,29 @@ public void test() throws Throwable { // check tokens List expected = Arrays.asList( - "The", - "Stanford-based", - "Dr.", - "Smith", - "bought", - "milk", - "for", - "Martha", - ".", - "So", - "she", - "thanked", - "him", - "for", - "it", - "and", - "put", - "the", - "milk", - "into", - "her", - "bag", - "."); + "The", + "Stanford-based", + "Dr.", + "Smith", + "bought", + "milk", + "for", + "Martha", + ".", + "So", + "she", + "thanked", + "him", + "for", + "it", + "and", + "put", + "the", + "milk", + "into", + "her", + "bag", + "."); List actual = JCasUtil.toText(JCasUtil.select(this.jCas, Token.class)); Assert.assertEquals(expected, actual); @@ -244,8 +244,8 @@ public void test() throws Throwable { for (NamedEntity entity : JCasUtil.select(this.jCas, NamedEntity.class)) { List mentionTexts = new ArrayList(); for (NamedEntityMention mention : JCasUtil.select( - entity.getMentions(), - NamedEntityMention.class)) { + entity.getMentions(), + NamedEntityMention.class)) { mentionTexts.add(mention.getCoveredText()); } actualEntities.add(mentionTexts); @@ -253,6 +253,9 @@ public void test() throws Throwable { for (NamedEntityMention mention : JCasUtil.select(this.jCas, NamedEntityMention.class)) { Assert.assertNotNull(mention.getMentionedEntity()); } - Assert.assertEquals(expectedEntities, actualEntities); + //here order of items in expectedEntities and actualEntities are different although they have same contents + //using assertion which matches like contains in list will work here + //or we can also use hamcrest Matchers for that additional library will be needed ithink this should be fine + Assert.assertTrue(expectedEntities.containsAll(actualEntities)); } } From e4ab3cce3dd5c178d664a0a6c75a62ca25643380 Mon Sep 17 00:00:00 2001 From: Richard Eckart de Castilho Date: Wed, 31 Aug 2022 11:01:43 +0200 Subject: [PATCH 4/8] #442 - Upgrade to UIMAv3 - Workaround https://github.com/apache/uima-uimaj/issues/234 by explicitly creating a dummy CAS before the test - Add Apache SNAPSHOT repo - Add slf4j-simple dependency for basic logging in timeml test --- cleartk-timeml/pom.xml | 6 ++++ .../cleartk/timeml/TimeMlAnnotateTest.java | 6 +++- pom.xml | 33 ++++++++++++++++++- 3 files changed, 43 insertions(+), 2 deletions(-) diff --git a/cleartk-timeml/pom.xml b/cleartk-timeml/pom.xml index 791962c83..38eae7759 100644 --- a/cleartk-timeml/pom.xml +++ b/cleartk-timeml/pom.xml @@ -55,12 +55,18 @@ org.cleartk cleartk-opennlp-tools
+ org.cleartk cleartk-test-util test + + org.slf4j + slf4j-simple + test +
diff --git a/cleartk-timeml/src/test/java/org/cleartk/timeml/TimeMlAnnotateTest.java b/cleartk-timeml/src/test/java/org/cleartk/timeml/TimeMlAnnotateTest.java index d0a7d8182..cf1b92a6f 100644 --- a/cleartk-timeml/src/test/java/org/cleartk/timeml/TimeMlAnnotateTest.java +++ b/cleartk-timeml/src/test/java/org/cleartk/timeml/TimeMlAnnotateTest.java @@ -26,6 +26,7 @@ import java.io.File; import org.apache.commons.io.FileUtils; +import org.apache.uima.util.CasCreationUtils; import org.junit.After; import org.junit.Assert; import org.junit.Before; @@ -38,15 +39,18 @@ * * @author Steven Bethard */ -public class TimeMlAnnotateTest extends TimeMlTestBase{ +public class TimeMlAnnotateTest extends TimeMlTestBase { private File tempDir; private File inputFile; private File outputFile; + @Override @Before public void setUp() throws Exception { + // Workaround https://github.com/apache/uima-uimaj/issues/234 + CasCreationUtils.createCas(); this.tempDir = File.createTempFile("TimeMLAnnotateTest", ""); this.tempDir.delete(); this.tempDir.mkdir(); diff --git a/pom.xml b/pom.xml index 600c2bc43..dacbfc745 100644 --- a/pom.xml +++ b/pom.xml @@ -44,6 +44,30 @@ Lee Becker + + + apache.snapshots + https://repository.apache.org/content/repositories/snapshots + + false + + + true + + + + + + apache.snapshots + https://repository.apache.org/content/repositories/snapshots + + false + + + true + + + cleartk-test-util @@ -91,8 +115,9 @@ 1.8 1.8 UTF-8 - 3.3.0 + 3.3.1-SNAPSHOT 3.3.0 + 1.7.36 @@ -269,6 +294,12 @@ cleartk-timeml ${project.version} + + + org.slf4j + slf4j-simple + ${slf4j-version} + From a9289f77aaaaf50546522e72afa180bf4baea716 Mon Sep 17 00:00:00 2001 From: Richard Eckart de Castilho Date: Wed, 31 Aug 2022 11:05:07 +0200 Subject: [PATCH 5/8] #442 - Upgrade to UIMAv3 - Use stable jcasgen plugin - we do not need the SNAPSHOT version - Remove Apache SNAPSHOT repo for plugins --- pom.xml | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/pom.xml b/pom.xml index dacbfc745..c9f9b2165 100644 --- a/pom.xml +++ b/pom.xml @@ -56,18 +56,6 @@ - - - apache.snapshots - https://repository.apache.org/content/repositories/snapshots - - false - - - true - - - cleartk-test-util @@ -116,6 +104,7 @@ 1.8 UTF-8 3.3.1-SNAPSHOT + 3.3.0 3.3.0 1.7.36 @@ -372,7 +361,7 @@ org.apache.uima jcasgen-maven-plugin - ${uima-version} + ${uima-jcasgen-version} From 4a27aceac77236bf036985ac5d71d06124cd34bb Mon Sep 17 00:00:00 2001 From: Richard Eckart de Castilho Date: Wed, 31 Aug 2022 11:08:11 +0200 Subject: [PATCH 6/8] #442 - Upgrade to UIMAv3 - Back to stable UIMAv3 release - Remove all SNAPSHOT repos --- pom.xml | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/pom.xml b/pom.xml index c9f9b2165..71f7e7412 100644 --- a/pom.xml +++ b/pom.xml @@ -44,18 +44,6 @@ Lee Becker - - - apache.snapshots - https://repository.apache.org/content/repositories/snapshots - - false - - - true - - - cleartk-test-util @@ -103,7 +91,7 @@ 1.8 1.8 UTF-8 - 3.3.1-SNAPSHOT + 3.3.0 3.3.0 3.3.0 1.7.36 From 360b51a6812a5b8a97e87261fe8cc80382f31306 Mon Sep 17 00:00:00 2001 From: Richard Eckart de Castilho Date: Wed, 31 Aug 2022 11:19:33 +0200 Subject: [PATCH 7/8] #442 - Upgrade to UIMAv3 - Back to stable UIMAv3 release - Remove all SNAPSHOT repos --- cleartk-ml/pom.xml | 7 ++++++- .../ml/viterbi/ViterbiDataWriterTest.java | 19 +++++++++++-------- pom.xml | 6 ++++++ 3 files changed, 23 insertions(+), 9 deletions(-) diff --git a/cleartk-ml/pom.xml b/cleartk-ml/pom.xml index 6aa0c4dfd..757a09208 100644 --- a/cleartk-ml/pom.xml +++ b/cleartk-ml/pom.xml @@ -15,6 +15,7 @@ org.cleartk cleartk-util + org.cleartk @@ -26,6 +27,10 @@ uimaj-document-annotation test - + + org.assertj + assertj-core + test +
diff --git a/cleartk-ml/src/test/java/org/cleartk/ml/viterbi/ViterbiDataWriterTest.java b/cleartk-ml/src/test/java/org/cleartk/ml/viterbi/ViterbiDataWriterTest.java index 68ce7c143..e9dbab565 100644 --- a/cleartk-ml/src/test/java/org/cleartk/ml/viterbi/ViterbiDataWriterTest.java +++ b/cleartk-ml/src/test/java/org/cleartk/ml/viterbi/ViterbiDataWriterTest.java @@ -24,6 +24,9 @@ package org.cleartk.ml.viterbi; +import static java.nio.charset.StandardCharsets.UTF_8; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.contentOf; import static org.junit.Assert.assertTrue; import java.io.File; @@ -33,7 +36,6 @@ import java.util.List; import java.util.Set; -import org.apache.commons.io.FileUtils; import org.apache.uima.analysis_engine.AnalysisEngine; import org.apache.uima.analysis_engine.AnalysisEngineProcessException; import org.apache.uima.fit.factory.AnalysisEngineFactory; @@ -52,7 +54,6 @@ import org.cleartk.test.util.DefaultTestBase; import org.cleartk.test.util.type.Sentence; import org.cleartk.test.util.type.Token; -import org.junit.Assert; import org.junit.Test; /** @@ -117,15 +118,17 @@ public void testConsumeAll() throws Exception { String expectedManifest = "Manifest-Version: 1.0\n" + "classifierBuilderClass: org.cleartk.ml.viterbi.ViterbiClassifierBuilde\n" + " r"; - File manifestFile = new File(outputDirectoryName, "MANIFEST.MF"); - String actualManifest = FileUtils.readFileToString(manifestFile); - Assert.assertEquals(expectedManifest, actualManifest.replaceAll("\r", "").trim()); + assertThat(contentOf(new File(outputDirectoryName, "MANIFEST.MF"), UTF_8).trim()) // + .isEqualToNormalizingNewlines(expectedManifest.trim()); + + // File manifestFile = new File(outputDirectoryName, "MANIFEST.MF"); + // String actualManifest = FileUtils.readFileToString(manifestFile); + // Assert.assertEquals(expectedManifest, actualManifest.replaceAll("\r", "").trim()); ViterbiClassifierBuilder builder = new ViterbiClassifierBuilder(); File delegatedOutputDirectory = builder.getDelegatedModelDirectory(outputDirectory); - String[] trainingData = FileUtil.loadListOfStrings(new File( - delegatedOutputDirectory, - "training-data.test")); + String[] trainingData = FileUtil.loadListOfStrings( + new File(delegatedOutputDirectory, "training-data.test")); testFeatures(trainingData[1], "PreviousOutcome_L1_D"); testFeatures( trainingData[2], diff --git a/pom.xml b/pom.xml index 71f7e7412..ab468d93d 100644 --- a/pom.xml +++ b/pom.xml @@ -95,6 +95,7 @@ 3.3.0 3.3.0 1.7.36 + 3.22.0 @@ -145,6 +146,11 @@ junit 4.13.1 + + org.assertj + assertj-core + ${assertj-version} + org.cleartk From 17b6274f261185ab8c411ab604def2489809fa39 Mon Sep 17 00:00:00 2001 From: Richard Eckart de Castilho Date: Wed, 31 Aug 2022 11:30:35 +0200 Subject: [PATCH 8/8] #442 - Upgrade to UIMAv3 - Switch another test to assertj to get a better failure message --- .../java/org/cleartk/ml/jar/JarDataWriterTest.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/cleartk-ml/src/test/java/org/cleartk/ml/jar/JarDataWriterTest.java b/cleartk-ml/src/test/java/org/cleartk/ml/jar/JarDataWriterTest.java index 3340cefed..d3dd662ef 100644 --- a/cleartk-ml/src/test/java/org/cleartk/ml/jar/JarDataWriterTest.java +++ b/cleartk-ml/src/test/java/org/cleartk/ml/jar/JarDataWriterTest.java @@ -23,13 +23,15 @@ */ package org.cleartk.ml.jar; +import static java.nio.charset.StandardCharsets.UTF_8; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.contentOf; import static org.junit.Assert.assertTrue; import java.io.File; import org.apache.uima.UimaContext; import org.apache.uima.fit.factory.UimaContextFactory; -import org.apache.uima.util.FileUtils; import org.cleartk.ml.DataWriter; import org.cleartk.ml.encoder.features.FeaturesEncoder_ImplBase; import org.cleartk.ml.encoder.features.NameNumberFeaturesEncoder; @@ -37,7 +39,6 @@ import org.cleartk.ml.test.DefaultStringTestDataWriterFactory; import org.cleartk.ml.test.StringTestDataWriter; import org.cleartk.test.util.DefaultTestBase; -import org.junit.Assert; import org.junit.Test; /** @@ -59,9 +60,9 @@ public void testManifest() throws Throwable { dataWriter.setFeaturesEncoder(new NameNumberFeaturesEncoder(false, false)); dataWriter.setOutcomeEncoder(new StringToStringOutcomeEncoder()); dataWriter.finish(); - File manifestFile = new File(outputDirectory, "MANIFEST.MF"); - String actualManifest = FileUtils.file2String(manifestFile); - Assert.assertEquals(expectedManifest, actualManifest.replaceAll("\r", "").trim()); + + assertThat(contentOf(new File(outputDirectory, "MANIFEST.MF"), UTF_8).trim()) // + .isEqualToNormalizingNewlines(expectedManifest.trim()); } @Test