Revision: 18958
http://sourceforge.net/p/gate/code/18958
Author: johann_p
Date: 2015-10-25 14:45:28 +0000 (Sun, 25 Oct 2015)
Log Message:
-----------
Upgrade to version 3.5.2. Replace use of deprecated methods and adapt
to changed return type of TypedDependency.gov() and TypedDependency.dep()
which now is a IndexedWord and not a TreeGraphNode any more.
Modified Paths:
--------------
gate/trunk/plugins/Stanford_CoreNLP/creole.xml
gate/trunk/plugins/Stanford_CoreNLP/resources/english.all.3class.distsim.crf.ser.gz
gate/trunk/plugins/Stanford_CoreNLP/src/gate/stanford/DependencyMode.java
gate/trunk/plugins/Stanford_CoreNLP/src/gate/stanford/Parser.java
Added Paths:
-----------
gate/trunk/plugins/Stanford_CoreNLP/lib/stanford-ner-3.5.2.jar
gate/trunk/plugins/Stanford_CoreNLP/lib/stanford-parser-3.5.2.jar
gate/trunk/plugins/Stanford_CoreNLP/lib/stanford-postagger-3.5.2.jar
Removed Paths:
-------------
gate/trunk/plugins/Stanford_CoreNLP/lib/stanford-ner-3.4.jar
gate/trunk/plugins/Stanford_CoreNLP/lib/stanford-parser-3.4.jar
gate/trunk/plugins/Stanford_CoreNLP/lib/stanford-postagger-3.4.jar
Modified: gate/trunk/plugins/Stanford_CoreNLP/creole.xml
===================================================================
--- gate/trunk/plugins/Stanford_CoreNLP/creole.xml 2015-10-25 02:21:28 UTC
(rev 18957)
+++ gate/trunk/plugins/Stanford_CoreNLP/creole.xml 2015-10-25 14:45:28 UTC
(rev 18958)
@@ -1,8 +1,8 @@
<?xml version="1.0"?>
-<CREOLE-DIRECTORY ID="Stanford CoreNLP tools" VERSION="2014.0613"
DESCRIPTION="Stanford CoreNLP" GATE-MIN="8.0">
+<CREOLE-DIRECTORY ID="Stanford CoreNLP tools" VERSION="2015.1025"
DESCRIPTION="Stanford CoreNLP" GATE-MIN="8.0">
<JAR SCAN="true">gate-stanford.jar</JAR>
- <JAR>lib/stanford-ner-3.4.jar</JAR>
- <JAR>lib/stanford-parser-3.4.jar</JAR>
+ <JAR>lib/stanford-ner-3.5.2.jar</JAR>
+ <JAR>lib/stanford-parser-3.5.2.jar</JAR>
<JAR>lib/ejml-0.23.jar</JAR>
- <JAR>lib/stanford-postagger-3.4.jar</JAR>
+ <JAR>lib/stanford-postagger-3.5.2.jar</JAR>
</CREOLE-DIRECTORY>
Deleted: gate/trunk/plugins/Stanford_CoreNLP/lib/stanford-ner-3.4.jar
===================================================================
(Binary files differ)
Added: gate/trunk/plugins/Stanford_CoreNLP/lib/stanford-ner-3.5.2.jar
===================================================================
(Binary files differ)
Index: gate/trunk/plugins/Stanford_CoreNLP/lib/stanford-ner-3.5.2.jar
===================================================================
--- gate/trunk/plugins/Stanford_CoreNLP/lib/stanford-ner-3.5.2.jar
2015-10-25 02:21:28 UTC (rev 18957)
+++ gate/trunk/plugins/Stanford_CoreNLP/lib/stanford-ner-3.5.2.jar
2015-10-25 14:45:28 UTC (rev 18958)
Property changes on:
gate/trunk/plugins/Stanford_CoreNLP/lib/stanford-ner-3.5.2.jar
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Deleted: gate/trunk/plugins/Stanford_CoreNLP/lib/stanford-parser-3.4.jar
===================================================================
(Binary files differ)
Added: gate/trunk/plugins/Stanford_CoreNLP/lib/stanford-parser-3.5.2.jar
===================================================================
(Binary files differ)
Index: gate/trunk/plugins/Stanford_CoreNLP/lib/stanford-parser-3.5.2.jar
===================================================================
--- gate/trunk/plugins/Stanford_CoreNLP/lib/stanford-parser-3.5.2.jar
2015-10-25 02:21:28 UTC (rev 18957)
+++ gate/trunk/plugins/Stanford_CoreNLP/lib/stanford-parser-3.5.2.jar
2015-10-25 14:45:28 UTC (rev 18958)
Property changes on:
gate/trunk/plugins/Stanford_CoreNLP/lib/stanford-parser-3.5.2.jar
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Deleted: gate/trunk/plugins/Stanford_CoreNLP/lib/stanford-postagger-3.4.jar
===================================================================
(Binary files differ)
Added: gate/trunk/plugins/Stanford_CoreNLP/lib/stanford-postagger-3.5.2.jar
===================================================================
(Binary files differ)
Index: gate/trunk/plugins/Stanford_CoreNLP/lib/stanford-postagger-3.5.2.jar
===================================================================
--- gate/trunk/plugins/Stanford_CoreNLP/lib/stanford-postagger-3.5.2.jar
2015-10-25 02:21:28 UTC (rev 18957)
+++ gate/trunk/plugins/Stanford_CoreNLP/lib/stanford-postagger-3.5.2.jar
2015-10-25 14:45:28 UTC (rev 18958)
Property changes on:
gate/trunk/plugins/Stanford_CoreNLP/lib/stanford-postagger-3.5.2.jar
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Modified:
gate/trunk/plugins/Stanford_CoreNLP/resources/english.all.3class.distsim.crf.ser.gz
===================================================================
(Binary files differ)
Modified:
gate/trunk/plugins/Stanford_CoreNLP/src/gate/stanford/DependencyMode.java
===================================================================
--- gate/trunk/plugins/Stanford_CoreNLP/src/gate/stanford/DependencyMode.java
2015-10-25 02:21:28 UTC (rev 18957)
+++ gate/trunk/plugins/Stanford_CoreNLP/src/gate/stanford/DependencyMode.java
2015-10-25 14:45:28 UTC (rev 18958)
@@ -14,6 +14,7 @@
import java.util.Collection;
import edu.stanford.nlp.trees.GrammaticalStructure;
+import edu.stanford.nlp.trees.GrammaticalStructure.Extras;
import edu.stanford.nlp.trees.TypedDependency;
public enum DependencyMode {
@@ -27,17 +28,22 @@
DependencyMode mode, boolean includeExtras) {
Collection<TypedDependency> result = null;
+ Extras incl = Extras.NONE;
+ if(includeExtras) {
+ incl = Extras.MAXIMAL;
+ }
+
if (mode.equals(Typed)) {
- result = gs.typedDependencies(includeExtras);
+ result = gs.typedDependencies(incl);
}
else if (mode.equals(AllTyped)) {
result = gs.allTypedDependencies();
}
else if (mode.equals(TypedCollapsed)) {
- result = gs.typedDependenciesCollapsed(includeExtras);
+ result = gs.typedDependenciesCollapsed(incl);
}
else if (mode.equals(TypedCCprocessed)) {
- result = gs.typedDependenciesCCprocessed(includeExtras);
+ result = gs.typedDependenciesCCprocessed(incl);
}
return result;
Modified: gate/trunk/plugins/Stanford_CoreNLP/src/gate/stanford/Parser.java
===================================================================
--- gate/trunk/plugins/Stanford_CoreNLP/src/gate/stanford/Parser.java
2015-10-25 02:21:28 UTC (rev 18957)
+++ gate/trunk/plugins/Stanford_CoreNLP/src/gate/stanford/Parser.java
2015-10-25 14:45:28 UTC (rev 18958)
@@ -23,7 +23,6 @@
import gate.AnnotationSet;
import gate.Factory;
import gate.FeatureMap;
-import gate.Gate;
import gate.ProcessingResource;
import gate.Resource;
import gate.creole.ANNIEConstants;
@@ -448,11 +447,14 @@
if(debugMode) {
System.out.println(dependency);
}
-
- int governorIndex = dependency.gov().label().index() - 1;
+
+ // Does not work in version 3.5.2 any more
+ //int governorIndex = dependency.gov().label().index() - 1;
+ int governorIndex = dependency.gov().index()-1;
governor = stanfordSentence.startPos2token(governorIndex);
- int dependentIndex = dependency.dep().label().index() - 1;
+ //int dependentIndex = dependency.dep().label().index() - 1;
+ int dependentIndex = dependency.dep().index()-1;
dependent = stanfordSentence.startPos2token(dependentIndex);
dependencyKind = dependency.reln().toString();
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs