当前位置: 首页>>代码示例>>Java>>正文


Java ArrayMap类代码示例

本文整理汇总了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");
}
 
开发者ID:benblamey,项目名称:stanford-nlp,代码行数:25,代码来源:TokenSequenceParser.java

示例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");
}
 
开发者ID:benblamey,项目名称:stanford-nlp,代码行数:34,代码来源:TokenSequenceParser.java

示例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");
}
 
开发者ID:benblamey,项目名称:stanford-nlp,代码行数:34,代码来源:TokenSequenceParser.java

示例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;
}
 
开发者ID:benblamey,项目名称:stanford-nlp,代码行数:7,代码来源:CoreMapNodePattern.java


注:本文中的edu.stanford.nlp.util.ArrayMap类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。