ULAPI  8.0
ulstemmer.h
1 
7 #ifndef ULSTEMMER_H
8 #define ULSTEMMER_H
9 
10 #include "ulworker.h"
11 #include "uldissector.h"
12 #include "ulfrequency.h"
13 
21 class ULStemmer : public ULWorker
22 {
23 public:
24  ULStemmer();
25  ULStemmer(const ULStemmer& other);
26  virtual ~ULStemmer();
27 
28  ULStemmer& operator=(const ULStemmer& other);
29  void clear();
30 
31  // Accessors
33  void setDissector(ULDissector *newDissector);
34  const ULLanguage& getLanguage() const;
35 
36  // ULWorker interfaces.
37  virtual bool isServiceAvailable(const ULServiceDescriptor& service);
38  virtual void getAvailableServices(ULList<ULServiceDescriptor>& services);
39  virtual void setCancelOperation(bool shouldCancel);
40 
41  // The stemmer's core services.
42  ULError getAllStems(const ULString& surfaceForm, ULList<ULDerivation>& stemList);
43 
44  ULError getStems(const ULString& surfaceForm, ULList<ULDerivation>& stemList);
45 
46  ULError getStems(const ULString& surfaceForm,
47  const ULPartOfSpeechCategory& category,
48  ULList<ULDerivation>& stemList);
49 
50  ULError getFrequencies(const ULString& surfaceForm, ULList<ULFrequency>& frequencyList);
51 
52 private:
53  ULDissector *dissector;
54 
55  void removeDuplicateRootWords(ULList<ULDerivation>& stemList);
56 };
57 
58 #endif
59