01 package gate.creole.morph;
02
03 public class RHS {
04 private short methodIndex;
05 private String[] parameters;
06 private boolean verb = false;
07 private boolean noun = false;
08 public static short patIndex = 0;
09 private short patternIndex = 0;
10
11 public RHS(String function, String category) {
12 methodIndex = ParsingFunctions.getMethodIndex(function.trim());
13 parameters = ParsingFunctions.getParameterValues(function.trim());
14 if(category.equals("verb"))
15 verb = true;
16 else if(category.equals("noun"))
17 noun = true;
18 else if(category.equals("*")) {
19 verb = true;
20 noun = true;
21 }
22 patternIndex = patIndex;
23 patIndex++;
24 }
25
26 public short getMethodIndex() {
27 return methodIndex;
28 }
29
30 public String[] getParameters() {
31 return parameters;
32 }
33
34 public void setParameters(String[] parameters) {
35 this.parameters = parameters;
36 }
37
38 public boolean isNoun() {
39 return noun;
40 }
41
42 public boolean isVerb() {
43 return verb;
44 }
45
46 public short getPatternIndex() {
47 return patternIndex;
48 }
49 }
|