|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<InflectionRule>
edu.mit.jmwe.detect.InflectionRule
public enum InflectionRule
Enumerates the ways in which MWEs with certain parts of speech are allowed to inflect. All but the last two rules are specified in Arranz, Asterias and Castillo 2005.
Enum Constant Summary | |
---|---|
R1
|
|
R10
|
|
R11
|
|
R12
|
|
R13
|
|
R14
|
|
R15
|
|
R16
|
|
R17
|
|
R18
|
|
R19
|
|
R2
|
|
R20
|
|
R21
|
|
R3
|
|
R4
|
|
R5
|
|
R6
|
|
R7
|
|
R8
|
|
R9
|
Method Summary | ||
---|---|---|
|
getTagPattern(IMWE<T> mwe)
Concatenates the tags of each token in the MWE, separating each by underscores. |
|
static
|
inflects(T token,
IMWE<T> mwe)
Returns true if a the text of a token from an MWE does not equal the corresponding part lemma. |
|
static boolean |
isInflectedByPattern(IMWE<?> mwe)
Returns true if and only if (1) the given multi-word
expressions syntactically matches a rule listed in the enumeration
InflectionRule and (2) parts inflect according to that rule |
|
static boolean |
isInflectedByPattern(IMWE<?> mwe,
Collection<? extends IInflectionRule> rules)
Returns true if the specified MWE inflects according to some
rule in the specified collection; false otherwise. |
|
|
isValid(IMWE<T> mwe)
Returns true if this MWE follows the rule;
false otherwise. |
|
|
matches(IMWE<T> mwe)
Returns true if the given MWE has the same syntax as this
rule. |
|
String |
toString()
|
|
static InflectionRule |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
|
static InflectionRule[] |
values()
Returns an array containing the constants of this enum type, in the order they're declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, valueOf |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final InflectionRule R1
public static final InflectionRule R2
public static final InflectionRule R3
public static final InflectionRule R4
public static final InflectionRule R5
public static final InflectionRule R6
public static final InflectionRule R7
public static final InflectionRule R8
public static final InflectionRule R9
public static final InflectionRule R10
public static final InflectionRule R11
public static final InflectionRule R12
public static final InflectionRule R13
public static final InflectionRule R14
public static final InflectionRule R15
public static final InflectionRule R16
public static final InflectionRule R17
public static final InflectionRule R18
public static final InflectionRule R19
public static final InflectionRule R20
public static final InflectionRule R21
Method Detail |
---|
public static final InflectionRule[] values()
for(InflectionRule c : InflectionRule.values()) System.out.println(c);
public static InflectionRule valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified namepublic <T extends IToken> boolean isValid(IMWE<T> mwe)
IInflectionRule
true
if this MWE follows the rule;
false
otherwise.
isValid
in interface IInflectionRule
T
- the type of tokens in the MWEmwe
- the MWE to which the rule may/may not be applied
true
if this MWE follows the rule;
false
otherwise.public <T extends IToken> boolean matches(IMWE<T> mwe)
IInflectionRule
true
if the given MWE has the same syntax as this
rule. In other words, returns true
if this rule may be
applied to the given MWE; false
otherwise.
matches
in interface IInflectionRule
T
- the type of tokens in the MWEmwe
- the MWE to which the rule may/may not be applied
true
if this rule may be applied to the
given MWE, false
otherwise.public <T extends IToken> String getTagPattern(IMWE<T> mwe)
T
- the type of tokens in the MWEmwe
- the MWE whose tags are being concatenated
public String toString()
toString
in class Enum<InflectionRule>
public static <T extends IToken> boolean inflects(T token, IMWE<T> mwe)
T
- the type of tokens in the MWEtoken
- the token being checkedmwe
- the MWE from which the token is drawn
public static boolean isInflectedByPattern(IMWE<?> mwe)
true
if and only if (1) the given multi-word
expressions syntactically matches a rule listed in the enumeration
InflectionRule
and (2) parts inflect according to that rule
mwe
- the multi-word expression to be tested
true
if the given multi-word expression inflects
according to the rule it matches or if it does not match any
rule; false
otherwise.public static boolean isInflectedByPattern(IMWE<?> mwe, Collection<? extends IInflectionRule> rules)
true
if the specified MWE inflects according to some
rule in the specified collection; false
otherwise.
mwe
- the mwe to checkrules
- the set of rules to use; may not be null
, but may
be empty
true
if the specified MWE inflects according to some
rule in the specified collection; false
otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |