本文整理汇总了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;
}
示例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
)));
}
示例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
)));
}
示例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
)));
}
示例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
)));
}
示例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
)));
}
示例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
)));
}
示例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);
}
示例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}));
}
示例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));
}
示例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));
}
示例12: requirementsSatisfied
import edu.stanford.nlp.util.ArraySet; //导入依赖的package包/类
@Override
public Set<Requirement> requirementsSatisfied() {
return Collections.unmodifiableSet(new ArraySet<Requirement>(CYBER_ENTITY_REQUIREMENT));
}
示例13: requirementsSatisfied
import edu.stanford.nlp.util.ArraySet; //导入依赖的package包/类
@Override
public Set<Requirement> requirementsSatisfied() {
return Collections.unmodifiableSet(new ArraySet<Requirement>(CYBER_HEURISTICS_REQUIREMENT));
}
示例14: requires
import edu.stanford.nlp.util.ArraySet; //导入依赖的package包/类
@Override
public Set<Requirement> requires() {
return Collections.unmodifiableSet(new ArraySet<Requirement>());
}
示例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);
}