A ULInflectionRule object stores one of the rules stored in a ULLanguageDataSource and used by ULDissector and ULInflector to perform morphological analyses and syntheses.
More...
#include <ulinflectionrule.h>
A ULInflectionRule object stores one of the rules stored in a ULLanguageDataSource and used by ULDissector and ULInflector to perform morphological analyses and syntheses.
ULInflectionRule::ULInflectionRule |
( |
| ) |
|
ULInflectionRule::~ULInflectionRule |
( |
| ) |
|
void ULInflectionRule::addConstraint |
( |
const ULFeatureType & |
featureType, |
|
|
int |
value |
|
) |
| |
Inserts the specified integer-valued feature into this rule's constraint list. If an identical feature already exists, this method does nothing.
- Parameters
-
[in] | featureType | The type of the desired constraint. |
[in] | value | The value to associate with the specified feature type. |
void ULInflectionRule::addConstraint |
( |
const ULFeature & |
constraint | ) |
|
Inserts the specified feature into this rule's constraint list. If an identical constraint already exists, this method does nothing.
- Parameters
-
[in] | feature | the desired feature. |
void ULInflectionRule::addStringConstraint |
( |
const ULFeatureType & |
featureType, |
|
|
const ULString & |
stringValue |
|
) |
| |
Inserts the specified feature into this rule's constraint list. If an identical constraint already exists, this method does nothing.
- Parameters
-
[in] | featureType | The type of the desired constraint. |
[in] | value | The value to associate with the specified feature type. |
bool ULInflectionRule::affixesMatchForDissection |
( |
const ULDerivation & |
derivation | ) |
const |
bool ULInflectionRule::affixesMatchForInflection |
( |
const ULDerivation & |
derivation | ) |
const |
bool ULInflectionRule::affixMatches |
( |
const ULString & |
affix, |
|
|
const ULString & |
s, |
|
|
const ULLanguage & |
language, |
|
|
bool |
ignoreCase = false , |
|
|
bool |
ignoreAccents = false |
|
) |
| |
|
static |
bool ULInflectionRule::applyForDissection |
( |
ULDerivation & |
derivation | ) |
const |
If this rule can be applied to the front of the given derivation, modifying the root, root part of speech, and inflection rule list accordingly, then this method does so. Otherwise, it leaves the derivation unchanged. For example, suppose we have a derivation whose root is "baker" and whose derived form is "bakers". Consider the rule that takes a verb ending in "-e" and transforms it into a noun (representing a person who performs the verb) by replacing the "-e" with "-er". Then this rule can be applied to the "baker -> bakers" derivation to give us the derivation "bake -> baker -> bakers".
- Returns
- true if this rule has been applied to the derivation, false otherwise.
- Parameters
-
[in,out] | derivation | the derivation to be modified. |
bool ULInflectionRule::applyForInflection |
( |
ULDerivation & |
derivation | ) |
const |
If this rule can be applied to the end of the given derivation, modifying the derivation's inflection rule list accordingly, then this method does so. Otherwise, it leaves the derivation unchanged. For example, suppose we have a derivation whose root is "bake" and whose derived form is "baker". Consider the rule that takes a singular noun and and transforms it into a plural noun by appending "-s". Then this rule can be applied to the "bake -> baker" derivation to give us the new derivation "bake -> baker -> bakers".
- Returns
- true if this rule has been applied to the derivation, false if the extension of the derivation was unsuccessful.
- Parameters
-
[in,out] | derivation | the derivation to be modified. |
void ULInflectionRule::clear |
( |
| ) |
|
Sets this rule to its default state.
bool ULInflectionRule::constraintsMatchForInflection |
( |
const ULDerivation & |
derivation | ) |
const |
- Returns
- a reference to this rule's constraint list.
Gets the constraint associated with the specified feature type, if any such value exists in this rule's feature list.
- Returns
- true if this ULInflectionRule has a feature with the specified feature type.
- Parameters
-
[in] | featureType | the type of the desired constraint. |
[out] | constraint | the desired constraint. |
uluint32 ULInflectionRule::getGroup |
( |
| ) |
const |
const ULList< uluint32 > & ULInflectionRule::getPredecessorOffsets |
( |
| ) |
const |
uluint32 ULInflectionRule::getPriority |
( |
| ) |
const |
const ULString & ULInflectionRule::getSourceAffix |
( |
| ) |
const |
const ULPartOfSpeech & ULInflectionRule::getSourcePartOfSpeech |
( |
| ) |
const |
const ULList< uluint32 > & ULInflectionRule::getSuccessorOffsets |
( |
| ) |
const |
const ULString & ULInflectionRule::getTargetAffix |
( |
| ) |
const |
const ULPartOfSpeech & ULInflectionRule::getTargetPartOfSpeech |
( |
| ) |
const |
bool ULInflectionRule::hasConstraint |
( |
const ULFeatureType & |
featureType | ) |
const |
- Returns
- true if this ULInflectionRule has a feature with the specified feature type.
bool ULInflectionRule::isFullWordRule |
( |
| ) |
const |
- Returns
- true if this rule transforms a complete word to a different complete word. For example, a rule might transform the infinitive "think" to the irregular past tense "thought".
bool ULInflectionRule::isInitial |
( |
| ) |
const |
bool ULInflectionRule::isLookupRequired |
( |
| ) |
const |
bool ULInflectionRule::isTerminal |
( |
| ) |
const |
bool ULInflectionRule::partsOfSpeechMatchForDissection |
( |
const ULDerivation & |
derivation | ) |
const |
bool ULInflectionRule::partsOfSpeechMatchForInflection |
( |
const ULDerivation & |
derivation | ) |
const |
void ULInflectionRule::setGroup |
( |
uluint32 |
newGroup | ) |
|
void ULInflectionRule::setInitial |
( |
bool |
newIsInitial | ) |
|
void ULInflectionRule::setLookupRequired |
( |
bool |
required | ) |
|
void ULInflectionRule::setPriority |
( |
uluint32 |
newPriority | ) |
|
void ULInflectionRule::setSourceAffix |
( |
const ULString & |
newAffix | ) |
|
void ULInflectionRule::setSourcePartOfSpeech |
( |
const ULPartOfSpeech & |
newPartOfSpeech | ) |
|
void ULInflectionRule::setTargetAffix |
( |
const ULString & |
newAffix | ) |
|
void ULInflectionRule::setTargetPartOfSpeech |
( |
const ULPartOfSpeech & |
newPartOfSpeech | ) |
|
void ULInflectionRule::setTerminal |
( |
bool |
newIsTerminal | ) |
|
ULString ULInflectionRule::toString |
( |
| ) |
const |
friend class ULCFileLanguageDataSource |
|
friend |
The documentation for this class was generated from the following files: