Skip to content
Snippets Groups Projects
Commit d01ebd76 authored by Michael White's avatar Michael White
Browse files

Merge branch 'master' of https://github.com/OpenCCG/openccg

parents 5a9da1d3 8b6c4d3f
No related branches found
No related tags found
No related merge requests found
......@@ -495,6 +495,7 @@
<arg value="${novel.file}.dir/tb.xml"/>
<arg value="-nbestListSize"/> <arg value="${nbest.list.size}"/>
<arg value="-includederivs"/>
<arg value="-includescores"/>
</java>
</target>
......
......@@ -61,6 +61,7 @@ public class Parse {
" -supertagger <supertaggerclass> | -stconfig <configfile> \n" +
" (-nbestListSize <nbestListSize>) \n" +
" (-includederivs) \n" +
" (-includescores) \n" +
" <inputfile> <outputfile>";
if (args.length == 0 || args[0].equals("-h")) {
......@@ -75,6 +76,7 @@ public class Parse {
String parseScorerClass = null;
String supertaggerClass = null, stconfig = null;
boolean includederivs = false;
boolean includescores = false;
int nbestListSize = 1;
for (int i = 0; i < args.length; i++) {
......@@ -84,6 +86,7 @@ public class Parse {
if (args[i].equals("-stconfig")) { stconfig = args[++i]; continue; }
if (args[i].equals("-nbestListSize")) { nbestListSize = Integer.parseInt(args[++i]); continue; }
if (args[i].equals("-includederivs")) { includederivs = true; continue; }
if (args[i].equals("-includescores")) { includescores = true; continue; }
if (inputfile == null) { inputfile = args[i]; continue; }
outputfile = args[i];
}
......@@ -189,6 +192,10 @@ public class Parse {
derivElt.addContent(DerivMaker.makeDeriv(thisParse));
item.addContent(derivElt);
}
if (includescores) {
String score = parser.getScores().get(i).toString();
item.setAttribute("score", score);
}
}
} catch (ParseException e) {
System.out.println("Unable to parse!");
......
......@@ -391,7 +391,7 @@ public final class Slash implements Unifiable, Mutable, Serializable {
sb.append(sup).append("{").append("+").append("} ");
if (_ability == INERT)
sb.append(sup).append("{").append("-").append("} ");
if ((modTeX != "") && ((_ability == ACTIVE) || (_ability == ACTIVE))) {
if ((modTeX != "") && (_ability == ACTIVE)) {
if ((_dir == R))
sb.append("\\hspace{-1.45mm} ");
else if (_dir == L)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment