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


Java ArraySet类代码示例

本文整理汇总了Java中edu.stanford.nlp.util.ArraySet的典型用法代码示例。如果您正苦于以下问题:Java ArraySet类的具体用法?Java ArraySet怎么用?Java ArraySet使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ArraySet类属于edu.stanford.nlp.util包,在下文中一共展示了ArraySet类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getRelatedNodes

import edu.stanford.nlp.util.ArraySet; //导入依赖的package包/类
/** Given a {@code Tree} node {@code t}, attempts to
 *  return a list of nodes to which node {@code t} has this
 *  grammatical relation, with {@code t} as the governor.
 *
 *  @param t Target for finding dependents of t related by this GR
 *  @param root The root of the Tree
 *  @return A Collection of dependent nodes to which t bears this GR
 */
public Collection<Tree> getRelatedNodes(Tree t, Tree root) {
  Set<Tree> nodeList = new ArraySet<Tree>();
  for (TregexPattern p : targetPatterns) {    // cdm: I deleted: && nodeList.isEmpty()
    TregexMatcher m = p.matcher(root);
    while (m.findAt(t)) {
      nodeList.add(m.getNode("target"));
      if (DEBUG) {
        System.err.println("found " + this + "(" + t + ", " + m.getNode("target") + ") using pattern " + p);
        for (String nodeName : m.getNodeNames()) {
          if (nodeName.equals("target"))
            continue;
          System.err.println("  node " + nodeName + ": " + m.getNode(nodeName));
        }
      }
    }
  }
  return nodeList;
}
 
开发者ID:paulirwin,项目名称:Stanford.NER.Net,代码行数:27,代码来源:GrammaticalRelation.java

示例2: requires

import edu.stanford.nlp.util.ArraySet; //导入依赖的package包/类
/**
 * Returns the set of tasks which this annotator requires in order
 * to perform.  For example, the POS annotator will return
 * "tokenize", "ssplit".
 */
@Override
public Set<Class<? extends CoreAnnotation>> requires() {
    return Collections.unmodifiableSet(new ArraySet<>(Arrays.asList(
            CoreAnnotations.PartOfSpeechAnnotation.class,
            DigiMorphAnnotations.MorphoAnnotation.class,
            CoreAnnotations.TokensAnnotation.class,
            CoreAnnotations.SentencesAnnotation.class
    )));
}
 
开发者ID:dhfbk,项目名称:tint,代码行数:15,代码来源:DigiLemmaAnnotator.java

示例3: requires

import edu.stanford.nlp.util.ArraySet; //导入依赖的package包/类
/**
 * Returns the set of tasks which this annotator requires in order
 * to perform.  For example, the POS annotator will return
 * "tokenize", "ssplit".
 */
@Override public Set<Class<? extends CoreAnnotation>> requires() {
    return Collections.unmodifiableSet(new ArraySet<>(Arrays.asList(
            CoreAnnotations.LemmaAnnotation.class,
            DigiMorphAnnotations.MorphoAnnotation.class
    )));
}
 
开发者ID:dhfbk,项目名称:tint,代码行数:12,代码来源:DigiCompMorphAnnotator.java

示例4: requires

import edu.stanford.nlp.util.ArraySet; //导入依赖的package包/类
/**
 * Returns the set of tasks which this annotator requires in order
 * to perform.  For example, the POS annotator will return
 * "tokenize", "ssplit".
 */
@Override public Set<Class<? extends CoreAnnotation>> requires() {
    return Collections.unmodifiableSet(new ArraySet<>(Arrays.asList(
            CoreAnnotations.TokensAnnotation.class,
            CoreAnnotations.SentencesAnnotation.class
    )));
}
 
开发者ID:dhfbk,项目名称:tint,代码行数:12,代码来源:DigiMorphAnnotator.java

示例5: requires

import edu.stanford.nlp.util.ArraySet; //导入依赖的package包/类
/**
 * Returns the set of tasks which this annotator requires in order
 * to perform.  For example, the POS annotator will return
 * "tokenize", "ssplit".
 */
@Override public Set<Class<? extends CoreAnnotation>> requires() {
    return Collections.unmodifiableSet(new ArraySet<>(Arrays.asList(
            CoreAnnotations.PartOfSpeechAnnotation.class,
            CoreAnnotations.LemmaAnnotation.class,
            CoreAnnotations.TokensAnnotation.class,
            CoreAnnotations.SentencesAnnotation.class
    )));
}
 
开发者ID:dhfbk,项目名称:tint,代码行数:14,代码来源:VerbAnnotator.java

示例6: requires

import edu.stanford.nlp.util.ArraySet; //导入依赖的package包/类
/**
 * Returns the set of tasks which this annotator requires in order
 * to perform.  For example, the POS annotator will return
 * "tokenize", "ssplit".
 */
@Override public Set<Class<? extends CoreAnnotation>> requires() {
    return Collections.unmodifiableSet(new ArraySet<>(Arrays.asList(
            CoreAnnotations.PartOfSpeechAnnotation.class,
            CoreAnnotations.TokensAnnotation.class,
            CoreAnnotations.LemmaAnnotation.class,
            CoreAnnotations.SentencesAnnotation.class
    )));
}
 
开发者ID:dhfbk,项目名称:tint,代码行数:14,代码来源:ReadabilityAnnotator.java

示例7: requires

import edu.stanford.nlp.util.ArraySet; //导入依赖的package包/类
@Override
public Set<Class<? extends CoreAnnotation>> requires() {
    return Collections.unmodifiableSet(new ArraySet<>(Arrays.asList(
            CoreAnnotations.PartOfSpeechAnnotation.class,
            CoreAnnotations.TokensAnnotation.class
    )));
}
 
开发者ID:dhfbk,项目名称:tint,代码行数:8,代码来源:UPosAnnotator.java

示例8: requires

import edu.stanford.nlp.util.ArraySet; //导入依赖的package包/类
@Override
	public Set<Requirement> requires() {
		Set<Requirement> prerequisites = new ArraySet<Requirement>();
//		prerequisites.addAll(Annotator.TOKENIZE_SSPLIT_POS);
		prerequisites.add(CyberHeuristicAnnotator.CYBER_HEURISTICS_REQUIREMENT);
		return Collections.unmodifiableSet(prerequisites);
	}
 
开发者ID:stucco,项目名称:entity-extractor,代码行数:8,代码来源:CyberEntityAnnotator.java

示例9: requires

import edu.stanford.nlp.util.ArraySet; //导入依赖的package包/类
@Override
public Set<Requirement> requires() {
    return Collections.unmodifiableSet(new ArraySet(new Annotator.Requirement[]{TOKENIZE_REQUIREMENT, SSPLIT_REQUIREMENT, LEMMA_REQUIREMENT, PARSE_REQUIREMENT}));
}
 
开发者ID:dkmfbk,项目名称:pikes,代码行数:5,代码来源:FakeAnnaParserAnnotator.java

示例10: requires

import edu.stanford.nlp.util.ArraySet; //导入依赖的package包/类
@Override
public Set<Requirement> requires() {
	return Collections.unmodifiableSet(new ArraySet<Requirement>(TOKENIZE_REQUIREMENT, SSPLIT_REQUIREMENT, LEMMA_REQUIREMENT, PikesAnnotations.SIMPLEPOS_REQUIREMENT));
}
 
开发者ID:dkmfbk,项目名称:pikes,代码行数:5,代码来源:UKBAnnotator.java

示例11: requirementsSatisfied

import edu.stanford.nlp.util.ArraySet; //导入依赖的package包/类
@Override
public Set<Requirement> requirementsSatisfied() {
    return Collections.unmodifiableSet(
            new ArraySet<Requirement>(TWMAnnotations.DBPS_REQUIREMENT, TWMAnnotations.LINKING_REQUIREMENT));
}
 
开发者ID:dkmfbk,项目名称:pikes,代码行数:6,代码来源:LinkingAnnotator.java

示例12: requirementsSatisfied

import edu.stanford.nlp.util.ArraySet; //导入依赖的package包/类
@Override
public Set<Requirement> requirementsSatisfied() {
	return Collections.unmodifiableSet(new ArraySet<Requirement>(CYBER_ENTITY_REQUIREMENT));
}
 
开发者ID:stucco,项目名称:entity-extractor,代码行数:5,代码来源:CyberEntityAnnotator.java

示例13: requirementsSatisfied

import edu.stanford.nlp.util.ArraySet; //导入依赖的package包/类
@Override
public Set<Requirement> requirementsSatisfied() {
	return Collections.unmodifiableSet(new ArraySet<Requirement>(CYBER_HEURISTICS_REQUIREMENT));
}
 
开发者ID:stucco,项目名称:entity-extractor,代码行数:5,代码来源:CyberHeuristicAnnotator.java

示例14: requires

import edu.stanford.nlp.util.ArraySet; //导入依赖的package包/类
@Override
public Set<Requirement> requires() {
  return Collections.unmodifiableSet(new ArraySet<Requirement>());
}
 
开发者ID:begab,项目名称:kpe,代码行数:5,代码来源:HunTokenizerAnnotator.java

示例15: requires

import edu.stanford.nlp.util.ArraySet; //导入依赖的package包/类
@Override
public Set<Requirement> requires() {
  return new ArraySet<Requirement>(TOKENIZE_REQUIREMENT, SSPLIT_REQUIREMENT, POS_REQUIREMENT, NER_REQUIREMENT, PARSE_REQUIREMENT);
}
 
开发者ID:benblamey,项目名称:stanford-nlp,代码行数:5,代码来源:DeterministicCorefAnnotator.java


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