本文整理汇总了Java中edu.stanford.nlp.util.ArrayMap类的典型用法代码示例。如果您正苦于以下问题:Java ArrayMap类的具体用法?Java ArrayMap怎么用?Java ArrayMap使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ArrayMap类属于edu.stanford.nlp.util包,在下文中一共展示了ArrayMap类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: CoreMapWordPattern
import edu.stanford.nlp.util.ArrayMap; //导入依赖的package包/类
final public NodePattern CoreMapWordPattern(Env env) throws ParseException {
Map<String, String> attributes = new ArrayMap<String,String>();
CoreMapNodePattern pat;
Token value = null;
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case STR:
value = jj_consume_token(STR);
break;
case REGEX:
value = jj_consume_token(REGEX);
break;
case IDENTIFIER:
value = jj_consume_token(IDENTIFIER);
break;
default:
jj_la1[53] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
attributes.put("word", value.image);
pat = CoreMapNodePattern.valueOf(env, attributes);
{if (true) return pat;}
throw new Error("Missing return statement in function");
}
示例2: CompositeFieldValue
import edu.stanford.nlp.util.ArrayMap; //导入依赖的package包/类
final public Expressions.CompositeValue CompositeFieldValue(Env env) throws ParseException {
Map<String, Expression> attributes = new ArrayMap<String,Expression>();
jj_consume_token(21);
FieldValue(env, attributes);
label_3:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case 29:
case 32:
;
break;
default:
jj_la1[5] = jj_gen;
break label_3;
}
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case 32:
jj_consume_token(32);
break;
case 29:
jj_consume_token(29);
break;
default:
jj_la1[6] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
FieldValue(env, attributes);
}
jj_consume_token(23);
{if (true) return new Expressions.CompositeValue(/*"COMPOSITE", */ attributes, false);}
throw new Error("Missing return statement in function");
}
示例3: SetAttrValues
import edu.stanford.nlp.util.ArrayMap; //导入依赖的package包/类
final public Map<String,String> SetAttrValues(Env env) throws ParseException {
Map<String, String> attributes = new ArrayMap<String,String>();
jj_consume_token(21);
SetAttrValue(env, attributes);
label_17:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case 29:
case 32:
;
break;
default:
jj_la1[57] = jj_gen;
break label_17;
}
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case 32:
jj_consume_token(32);
break;
case 29:
jj_consume_token(29);
break;
default:
jj_la1[58] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
SetAttrValue(env, attributes);
}
jj_consume_token(23);
{if (true) return attributes;}
throw new Error("Missing return statement in function");
}
示例4: valueOf
import edu.stanford.nlp.util.ArrayMap; //导入依赖的package包/类
public static CoreMapNodePattern valueOf(Env env, String textAnnotationPattern) {
CoreMapNodePattern p = new CoreMapNodePattern(new ArrayMap<Class, NodePattern>(1));
p.annotationPatterns.put(CoreAnnotations.TextAnnotation.class,
new StringAnnotationRegexPattern(textAnnotationPattern, (env != null)? env.defaultStringPatternFlags: 0));
return p;
}