public class DependencyRegex extends Object
Modifier and Type | Field and Description |
---|---|
static String |
ANY_ADJECTIVE |
static String |
ANY_DEPREL |
static String |
ANY_NOUN |
static String |
ANY_POS |
static String |
ANY_TOKEN
Static identifiers used to build Regex expressions
|
static String |
ANY_VERB |
Constructor and Description |
---|
DependencyRegex(ConllDependencyNode[] regnodes,
int commonNodeIndex) |
DependencyRegex(DependencyPath path,
String name) |
DependencyRegex(com.googlecode.clearnlp.dependency.DEPNode[] regnodes,
int commonNodeIndex) |
DependencyRegex(com.googlecode.clearnlp.dependency.DEPNode[] regnodes,
int commonNodeIndex,
String name) |
DependencyRegex(String str) |
DependencyRegex(String name,
String dummy) |
public static String ANY_TOKEN
public static String ANY_DEPREL
public static String ANY_POS
public static String ANY_NOUN
public static String ANY_VERB
public static String ANY_ADJECTIVE
public DependencyRegex(DependencyPath path, String name)
path
- a DependencyPath from which to make and/or modify a regexpublic DependencyRegex(String str)
str
- a string containing the Java-format regular expression to setpublic DependencyRegex(com.googlecode.clearnlp.dependency.DEPNode[] regnodes, int commonNodeIndex)
regnodes
- commonNodeIndex
- The index (starting from 1) of the lowest common node in the dependency treepublic DependencyRegex(com.googlecode.clearnlp.dependency.DEPNode[] regnodes, int commonNodeIndex, String name)
public DependencyRegex(ConllDependencyNode[] regnodes, int commonNodeIndex)
regnodes
- commonNodeIndex
- The index (starting from 1) of the lowest common node in the dependency treepublic String getName()
public String get()
public Matcher matcher(CharSequence input)
public boolean matches(String str)
public boolean find(String str)
public String[] split(CharSequence input)
public DependencyRegex append(DependencyRegex dregex)
public DependencyRegex appendOptional(DependencyRegex dregex)
public DependencyRegex prepend(DependencyRegex dregex)
public DependencyRegex prependOptional(DependencyRegex dregex)
public DependencyRegex append(com.googlecode.clearnlp.dependency.DEPNode[] dnodes)
public DependencyRegex appendOptional(com.googlecode.clearnlp.dependency.DEPNode[] dnodes)
public DependencyRegex prepend(com.googlecode.clearnlp.dependency.DEPNode[] dnodes)
public DependencyRegex prependOptional(com.googlecode.clearnlp.dependency.DEPNode[] dnodes)
public DependencyRegex append(ConllDependencyNode[] dnodes)
public DependencyRegex appendOptional(ConllDependencyNode[] dnodes)
public DependencyRegex prepend(ConllDependencyNode[] dnodes)
public DependencyRegex prependOptional(ConllDependencyNode[] dnodes)
Copyright © 2012-2017 The Apache Software Foundation. All Rights Reserved.