summaryrefslogtreecommitdiff
path: root/src/runtime/java/org
diff options
context:
space:
mode:
authorKrasimir Angelov <kr.angelov@gmail.com>2017-09-06 14:37:51 +0200
committerKrasimir Angelov <kr.angelov@gmail.com>2017-09-06 14:37:51 +0200
commit301b1009887440a76cd7022dbb53bda4211d49db (patch)
treea16b95e4970df59571cbc23b730f443e4a1d47e6 /src/runtime/java/org
parentef071d9157deec9af1f2ac63dae63599affea031 (diff)
word completion in the C parser now returns information about the function which generates the token
Diffstat (limited to 'src/runtime/java/org')
-rw-r--r--src/runtime/java/org/grammaticalframework/pgf/TokenProb.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/runtime/java/org/grammaticalframework/pgf/TokenProb.java b/src/runtime/java/org/grammaticalframework/pgf/TokenProb.java
index 2c4ce4447..36db54273 100644
--- a/src/runtime/java/org/grammaticalframework/pgf/TokenProb.java
+++ b/src/runtime/java/org/grammaticalframework/pgf/TokenProb.java
@@ -4,12 +4,14 @@ package org.grammaticalframework.pgf;
public class TokenProb {
private String tok;
private String cat;
+ private String fun;
private double prob;
- public TokenProb(double prob, String tok, String cat) {
+ public TokenProb(double prob, String tok, String cat, String fun) {
this.prob = prob;
this.tok = tok;
- this.cat = cat;
+ this.cat = cat;
+ this.fun = fun;
}
/** Returns the negative logarithmic probability. */
@@ -26,4 +28,9 @@ public class TokenProb {
public String getCategory() {
return cat;
}
+
+ /** Returns the function from which this word was predicted. */
+ public String getFunction() {
+ return fun;
+ }
}