edu.mit.jmwe.detect
Interface IInflectionRule

All Known Implementing Classes:
InflectionRule

public interface IInflectionRule

Represents a pattern according to which the parts of a multi-word expression may be inflected.

Since:
jMWE 1.0.0
Version:
$Id: IInflectionRule.java 620 2011-05-08 21:13:58Z markaf $
Author:
N. Kulkarni

Method Summary
<T extends IToken>
boolean
isValid(IMWE<T> mwe)
          Returns true if this MWE follows the rule; false otherwise.
<T extends IToken>
boolean
matches(IMWE<T> mwe)
          Returns true if the given MWE has the same syntax as this rule.
 

Method Detail

isValid

<T extends IToken> boolean isValid(IMWE<T> mwe)
Returns true if this MWE follows the rule; false otherwise.

Type Parameters:
T - the type of tokens in the MWE
Parameters:
mwe - the MWE to which the rule may/may not be applied
Returns:
true if this MWE follows the rule; false otherwise.
Throws:
IllegalArgumentException - if this rule may not be applied to the given MWE. May only throw this exception if the matches(IMWE mwe) method returns false.
Since:
jMWE 1.0.0

matches

<T extends IToken> boolean matches(IMWE<T> mwe)
Returns 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.

Type Parameters:
T - the type of tokens in the MWE
Parameters:
mwe - the MWE to which the rule may/may not be applied
Returns:
returns true if this rule may be applied to the given MWE, false otherwise.
Since:
jMWE 1.0.0


Copyright © 2011 Massachusetts Institute of Technology. All Rights Reserved.