ULAPI  8.0
Public Member Functions | List of all members
ULDissector Class Reference

A ULDissector is a worker that performs morphological analysis of words in a particular language. Each ULDissector contains a pointer to a language data source and a dictionary data source. The language data source provides information about the general morphological structure of the language in question, while the dictionary data source provides a list of words in the language along with their parts of speech. More...

#include <uldissector.h>

Public Member Functions

 ULDissector ()
 
 ULDissector (const ULDissector &other)
 
virtual ~ULDissector ()
 
ULDissectoroperator= (const ULDissector &other)
 
void clear ()
 
const ULLanguagegetLanguage () const
 
void setLanguageDataSource (ULLanguageDataSource *dataSource)
 
ULLanguageDataSourcegetLanguageDataSource ()
 
void setDictionaryDataSource (ULDictionaryDataSource *dictionaryDataSource)
 
ULDictionaryDataSourcegetDictionaryDataSource ()
 
void setInflector (ULInflector *newInflector)
 
ULInflectorgetInflector ()
 
virtual bool isServiceAvailable (const ULServiceDescriptor &service)
 
virtual void getAvailableServices (ULList< ULServiceDescriptor > &services)
 
ULError dissect (const ULString &surfaceForm, ULList< ULDerivation > &dissectionList)
 
ULError dissect (const ULString &surfaceForm, const ULPartOfSpeechCategory &category, ULList< ULDerivation > &dissectionList)
 
ULError dissect (const ULString &surfaceForm, uluint32 maxDerivationLength, ULList< ULDerivation > &derivationList)
 
ULError dissect (const ULString &surfaceForm, const ULPartOfSpeechCategory &category, uluint32 maxDerivationLength, ULList< ULDerivation > &derivationList)
 
- Public Member Functions inherited from ULWorker
 ULWorker ()
 
virtual ~ULWorker ()
 
virtual void setCancelOperation (bool shouldCancel)
 
virtual bool shouldCancelOperation () const
 

Detailed Description

A ULDissector is a worker that performs morphological analysis of words in a particular language. Each ULDissector contains a pointer to a language data source and a dictionary data source. The language data source provides information about the general morphological structure of the language in question, while the dictionary data source provides a list of words in the language along with their parts of speech.

Constructor & Destructor Documentation

ULDissector::ULDissector ( )

Default constructor.

ULDissector::ULDissector ( const ULDissector other)

Copy constructor.

ULDissector::~ULDissector ( )
virtual

Destructor.

Member Function Documentation

void ULDissector::clear ( )

Sets this dissector to its default state.

ULError ULDissector::dissect ( const ULString surfaceForm,
ULList< ULDerivation > &  dissectionList 
)

Performs a morphological analysis of the specified surface form.

Returns
ULError::NoError or ULError::ObjectUninitialized (if one or both of the required data sources is undefined),
Parameters
[in]surfaceFormThe word to be analyzed.
[out]dissectionListThe list of separate analyses of the surface form. For example, if surfaceForm is "rakes" and the language is English, then dissectionList will include one ULDerivation representing the plural of the noun "rake", and another ULDerivation representing the third person singular present tense of the verb "to rake".
ULError ULDissector::dissect ( const ULString surfaceForm,
const ULPartOfSpeechCategory category,
ULList< ULDerivation > &  dissectionList 
)
ULError ULDissector::dissect ( const ULString surfaceForm,
uluint32  maxDerivationLength,
ULList< ULDerivation > &  derivationList 
)

Performs a morphological analysis of the specified surface form.

Returns
ULError::NoError or ULError::ObjectUninitialized (if one or both of the required data sources is undefined),
Parameters
[in]surfaceFormThe word to be analyzed.
[in]maxDerivationLengththe longest rule sequence we're willing to allow in a derivation.
[out]derivationListThe list of separate analyses of the surface form. For example, if surfaceForm is "rakes" and the language is English, then derivationList will include one ULDerivation representing the plural of the noun "rake", and another ULDerivation representing the third person singular present tense of the verb "to rake".
ULError ULDissector::dissect ( const ULString surfaceForm,
const ULPartOfSpeechCategory category,
uluint32  maxDerivationLength,
ULList< ULDerivation > &  derivationList 
)

Performs a morphological analysis of the specified surface form under the assumption that the surface form has the specified part of speech.

Returns
ULError::NoError or ULError::ObjectUninitialized (if one or both of the required data sources is undefined),
Parameters
[in]surfaceFormThe word to be analyzed.
[in]categoryThe word to be analyzed.
[in]maxDerivationLengththe longest rule sequence we're willing to allow in a derivation.
[out]derivationListThe list of separate analyses of the surface form.
void ULDissector::getAvailableServices ( ULList< ULServiceDescriptor > &  serviceList)
virtual
Parameters
[out]serviceListUsed to return a list of all the services this ULWorker can provide.

Implements ULWorker.

ULDictionaryDataSource * ULDissector::getDictionaryDataSource ( )
Returns
a pointer to the dictionary data source used by this dissector.
ULInflector * ULDissector::getInflector ( )
Returns
a pointer to the inflector used by this dissector.
const ULLanguage & ULDissector::getLanguage ( ) const
Returns
the language for which this dissector performs morphological analysis.
ULLanguageDataSource * ULDissector::getLanguageDataSource ( )
Returns
a pointer to the language data source used by this dissector.
bool ULDissector::isServiceAvailable ( const ULServiceDescriptor service)
virtual
Returns
true if the specified service can be performed by this ULWorker, and false otherwise.
Parameters
serviceThe desired service.

Implements ULWorker.

ULDissector & ULDissector::operator= ( const ULDissector other)

Assignment operator.

void ULDissector::setDictionaryDataSource ( ULDictionaryDataSource dataSource)

Assigns the dictionary data source to be used by this dissector. The ULDissector does not take responsibility for deleting the data source. That will need to happen elsewhere (typically the ULFactory will take care of it if your application uses ULFactory to instantiate data sources and workers).

Parameters
[in]dataSourceA pointer to the desired dictionary data source.
void ULDissector::setInflector ( ULInflector newInflector)

Assigns the inflector to be used by this dissector. The ULDissector does not take responsibility for deleting the inflector. That will need to happen elsewhere (typically the ULFactory will take care of it if your application uses ULFactory to instantiate data sources and workers).

Parameters
[in]newInflectorA pointer to the desired inflector.
void ULDissector::setLanguageDataSource ( ULLanguageDataSource dataSource)

Assigns the language data source to be used by this dissector. The ULDissector does not take responsibility for deleting the data source. That will need to happen elsewhere (typically the ULFactory will take care of it if your application uses ULFactory to instantiate data sources and workers).

Parameters
[in]dataSourceA pointer to the desired language data source.

The documentation for this class was generated from the following files: