An object of type ULPartOfSpeech represents a single part of speech, including the base category (e.g. noun) and additional features (e.g. gender, case, number, etc.).
More...
#include <ulpartofspeech.h>
An object of type ULPartOfSpeech represents a single part of speech, including the base category (e.g. noun) and additional features (e.g. gender, case, number, etc.).
ULPartOfSpeech::ULPartOfSpeech |
( |
| ) |
|
ULPartOfSpeech::~ULPartOfSpeech |
( |
| ) |
|
|
virtual |
void ULPartOfSpeech::addFeature |
( |
const ULFeatureType & |
featureType, |
|
|
int |
featureValue |
|
) |
| |
Inserts the specified feature into this ULPartOfSpeech's feature list. If an identical feature already exists, this method does nothing.
- Parameters
-
[in] | featureType | The type of the desired feature. |
[in] | value | The value to associate with the specified feature type. |
void ULPartOfSpeech::addFeature |
( |
const ULFeature & |
feature | ) |
|
Inserts the specified feature into this ULPartOfSpeech's feature list. If an identical feature already exists, this method does nothing.
- Parameters
-
void ULPartOfSpeech::addStringFeature |
( |
const ULFeatureType & |
featureType, |
|
|
const ULString & |
stringValue |
|
) |
| |
Inserts the specified feature into this ULPartOfSpeech's feature list. If an identical feature already exists, this method does nothing.
- Parameters
-
[in] | featureType | The type of the desired feature. |
[in] | value | The value to associate with the specified feature type. |
void ULPartOfSpeech::clear |
( |
| ) |
|
bool ULPartOfSpeech::findFeature |
( |
const ULFeatureType & |
featureType, |
|
|
int & |
featureValue |
|
) |
| const |
|
protected |
Private method that supports several of the public methods (getCase, getGender, etc.).
- Returns
- true if this ULPartOfSpeech object has a feature of the specified type, false if not.
- Parameters
-
[in] | featureType | the desired feature |
[out] | featureValue | the integer feature value |
ULAspect ULPartOfSpeech::getAspect |
( |
| ) |
const |
ULCase ULPartOfSpeech::getCase |
( |
| ) |
const |
Gets the feature associated with the specified feature type, if any such feature exists in this ULPartOfSpeech's feature list.
- Returns
- true if this ULPartOfSpeech has a feature with the specified type.
- Parameters
-
[in] | featureType | the type of the desired feature. |
[out] | feature | the desired feature. |
ULGender ULPartOfSpeech::getGender |
( |
| ) |
const |
ULMood ULPartOfSpeech::getMood |
( |
| ) |
const |
ULNumber ULPartOfSpeech::getNumber |
( |
| ) |
const |
ULPerson ULPartOfSpeech::getPerson |
( |
| ) |
const |
ULTense ULPartOfSpeech::getTense |
( |
| ) |
const |
ULTransitivity ULPartOfSpeech::getTransitivity |
( |
| ) |
const |
- Returns
- the ULTransitivity feature for this ULPartOfSpeech if one exists, or ULTransitivity::None if one does not.
bool ULPartOfSpeech::hasFeature |
( |
const ULFeatureType & |
featureType | ) |
const |
- Returns
- true if this ULPartOfSpeech has a feature with the specified feature type.
uluint32 ULPartOfSpeech::hash |
( |
uluint32 |
tableSize | ) |
const |
bool ULPartOfSpeech::isRootPartOfSpeech |
( |
| ) |
const |
- Returns
- true if this part of speech represents a root word (e.g. a verb infinitive, a noun singular, etc.)
Comparison operator. Parts of speech do not have a natural ordering, but sometimes we want to store them in sorted lists or hash tables, so comparison operators are convenient.
void ULPartOfSpeech::setFeature |
( |
const ULFeatureType & |
featureType, |
|
|
int |
value |
|
) |
| |
If this ULPartOfSpeech's feature list already has a feature with the specified ID, change that feature's value to the specified value. Otherwise, add a new feature to the list. If more than one feature with the specified ID already exists, change the value for all of the matching features.
- Parameters
-
[in] | featureType | the type of the desired feature. |
[in] | value | the integer value to associate with the specified feature type. |
ULString ULPartOfSpeech::toString |
( |
| ) |
const |
- Returns
- a human-readable representation of this ULPartOfSpeech. TODO: include features
The documentation for this class was generated from the following files: