Skip to content

Commit

Permalink
Update intellij config
Browse files Browse the repository at this point in the history
  • Loading branch information
manning authored and Stanford NLP committed Jun 11, 2014
1 parent 893f0ee commit 80260fb
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 36 deletions.
5 changes: 0 additions & 5 deletions JavaNLP-core.eml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@
<relative-module-src project-related="jar:https://$PROJECT_DIR$/projects/core/libsrc/tomcat/apache-tomcat-7.0.12-src.zip!/"/>
<relative-module-cls project-related="jar:https://$PROJECT_DIR$/projects/core/lib/tomcat/jasper.jar!/"/>
</lib>
<lib name="servlet-api.jar" scope="COMPILE">
<srcroot url="jar:https://$MODULE_DIR$/libsrc/tomcat/apache-tomcat-7.0.12-src.zip!/"/>
<relative-module-src project-related="jar:https://$PROJECT_DIR$/projects/core/libsrc/tomcat/apache-tomcat-7.0.12-src.zip!/"/>
<relative-module-cls project-related="jar:https://$PROJECT_DIR$/projects/core/lib/tomcat/servlet-api.jar!/"/>
</lib>
<lib name="tomcat-juli.jar" scope="COMPILE">
<srcroot url="jar:https://$MODULE_DIR$/libsrc/tomcat/apache-tomcat-7.0.12-src.zip!/"/>
<relative-module-src project-related="jar:https://$PROJECT_DIR$/projects/core/libsrc/tomcat/apache-tomcat-7.0.12-src.zip!/"/>
Expand Down
1 change: 0 additions & 1 deletion commonbuildjsp.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
</fileset>
<pathelement location="${build.path}"/>
<pathelement location="${project.core}/lib/commons-logging.jar"/>
<pathelement location="${project.core}/lib/javax.servlet.jar"/>
</path>

<target name="jsp" depends="classpath,compile">
Expand Down
18 changes: 1 addition & 17 deletions src/edu/stanford/nlp/ie/machinereading/structure/Span.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,23 +53,7 @@ public static Span fromValues(int val1, int val2) {
return new Span(val2, val1);
}
}

public static Span fromValues(Object... values) {
if (values.length == 1) {
return fromValues(values[0], values[0] instanceof Number ? ((Number) values[0]).intValue() + 1 : Integer.parseInt(values[0].toString()) + 1);
}
if (values.length != 2) { throw new IllegalArgumentException("fromValues() must take an array with 2 elements"); }
int val1;
if (values[0] instanceof Number) { val1 = ((Number) values[0]).intValue(); }
else if (values[0] instanceof String) { val1 = Integer.parseInt((String) values[0]); }
else { throw new IllegalArgumentException("Unknown value for span: " + values[0]); }
int val2;
if (values[1] instanceof Number) { val2 = ((Number) values[1]).intValue(); }
else if (values[0] instanceof String) { val2 = Integer.parseInt((String) values[1]); }
else { throw new IllegalArgumentException("Unknown value for span: " + values[1]); }
return fromValues(val1, val2);
}


public int start() { return start; }
public int end() { return end; }

Expand Down
4 changes: 2 additions & 2 deletions src/edu/stanford/nlp/trees/EnglishGrammaticalRelations.java
Original file line number Diff line number Diff line change
Expand Up @@ -1037,8 +1037,8 @@ public static class NounCompoundModifierGRAnnotation extends GrammaticalRelation
// which is the normal case for such a pattern.
"WHNP|WHNP-TMP|WHNP-ADV|NP|NP-TMP|NP-ADV < (NP=target !<: CD $- /^,$/ $-- /^(?:WH)?NP/ !$ CC|CONJP)",
"WHNP|WHNP-TMP|WHNP-ADV|NP|NP-TMP|NP-ADV < (PRN=target < (NP < /^(?:NN|CD)/ $-- /^-LRB-$/ $+ /^-RRB-$/))",
// NP-ADV is a npadvmod, NP-TMP is a tmod
"@WHNP|NP < (NP=target !<: CD <, /^-LRB-$/ <` /^-RRB-$/ $-- /^(?:WH)?NP/ !$ CC|CONJP)",
// Maybe delete '@' in next pattern, since not clearly appositional when NP-ADV or NP-TMP. But then what is it?
"@WHNP|NP < (@NP=target !<: CD <, /^-LRB-$/ <` /^-RRB-$/ $-- /^(?:WH)?NP/ !$ CC|CONJP)",
// TODO: next pattern with NNP doesn't work because leftmost NNP is deemed head in a
// structure like (NP (NNP Norway) (, ,) (NNP Verdens_Gang) (, ,))
"NP|NP-TMP|NP-ADV < (NNP $+ (/^,$/ $+ NNP=target)) !< CC|CONJP",
Expand Down
11 changes: 0 additions & 11 deletions src/edu/stanford/nlp/util/Characters.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,4 @@ public static boolean isPunctuation(char c) {
cType == Character.INITIAL_QUOTE_PUNCTUATION ||
cType == Character.FINAL_QUOTE_PUNCTUATION);
}

/**
* Returns true if a character is a control character, and
* false otherwise.
*
* @param c
* @return
*/
public static boolean isControl(char c) {
return Character.getType(c) == Character.CONTROL;
}
}

0 comments on commit 80260fb

Please sign in to comment.