ULAPI  8.0
uldissector.h
1 
7 #ifndef ULDISSECTOR_H
8 #define ULDISSECTOR_H
9 
10 #include "ulworker.h"
11 #include "ullanguagedatasource.h"
12 #include "uldictionarydatasource.h"
13 #include "ulderivation.h"
14 #include "ulinflector.h"
15 
25 class ULDissector : public ULWorker
26 {
27 public:
28  ULDissector();
29  ULDissector(const ULDissector& other);
30  virtual ~ULDissector();
31 
32  ULDissector& operator=(const ULDissector& other);
33  void clear();
34 
35  // Accessors.
36  const ULLanguage& getLanguage() const;
39  void setDictionaryDataSource(ULDictionaryDataSource *dictionaryDataSource);
41  void setInflector(ULInflector *newInflector);
43 
44  // ULWorker interfaces.
45  virtual bool isServiceAvailable(const ULServiceDescriptor& service);
46  virtual void getAvailableServices(ULList<ULServiceDescriptor>& services);
47 
48  // The dissector's core services.
49  ULError dissect(const ULString& surfaceForm,
50  ULList<ULDerivation>& dissectionList);
51 
52  ULError dissect(const ULString& surfaceForm,
53  const ULPartOfSpeechCategory& category,
54  ULList<ULDerivation>& dissectionList);
55 
56  ULError dissect(const ULString& surfaceForm,
57  uluint32 maxDerivationLength,
58  ULList<ULDerivation>& derivationList);
59 
60  ULError dissect(const ULString& surfaceForm,
61  const ULPartOfSpeechCategory& category,
62  uluint32 maxDerivationLength,
63  ULList<ULDerivation>& derivationList);
64 
65 private:
66  ULLanguageDataSource *languageDataSource;
67  ULDictionaryDataSource *dictionaryDataSource;
68  ULInflector *inflector;
69 
70  // Support methods.
71  ULError getDerivations(const ULString& originalSearchString,
72  ULDerivation& derivation,
73  uluint32 maxDerivationLength,
74  ULList<ULDerivation>& derivationList);
75 
77 
78  ULError getMatchingTerms(ULForester *forester,
79  const ULString& searchString,
80  ULList<ULDictionaryIterator>& iteratorList);
81 
82  ULError getMatchingTerms(ULForester *forester,
83  const ULString& searchString,
84  const ULString& sortkeyString,
85  ULList<ULDictionaryIterator>& iteratorList);
86 };
87 
88 #endif
89