ULAPI  8.0
ullanguagedatasource.h
1 
7 #ifndef ULLANGUAGEDATASOURCE_H
8 #define ULLANGUAGEDATASOURCE_H
9 
10 #include "uldatasource.h"
11 #include "ulverbmodel.h"
12 #include "ulinflectionrule.h"
13 #include "ultaggingrule.h"
14 #include "ulfrequency.h"
15 
29 {
30 public:
31  virtual ~ULLanguageDataSource() {}
32 
33  // Required ULDataSource interfaces.
34  virtual ULError attach(const ULString& dataSourceIdentifier) = 0;
35  virtual ULError detach() = 0;
36  virtual ULError load() = 0;
37  virtual ULError close() = 0;
38  virtual ULString getDataSourceIdentifier() = 0;
39  virtual ULDataSourceVersion getVersion() = 0;
40 
41  // Extracting data from the language data source.
42 
46  virtual const ULLanguage& getLanguage() = 0;
47 
58  virtual ULError getWords(const ULString& root, ULList<ULDerivation>& wordList, bool filterResults=false) = 0;
59 
69  virtual ULError getVerbs(const ULString& infinitive, ULList<ULDerivation>& verbList, bool filterResults=false) = 0;
70 
80  virtual ULError getNouns(const ULString& text, ULList<ULDerivation>& nounList) = 0;
81 
91  virtual ULError getVerbModel(uluint32 verbClassID, ULVerbModel& model) = 0;
92 
110  virtual ULError getMatchingRoots(const ULString& prefix, uluint32 maxMatches, ULList<ULString>& rootList) = 0;
111 
123  virtual ULError getMatchingNouns(const ULString& prefix, uluint32 maxMatches, ULList<ULString>& nounList) = 0;
124 
138  virtual ULError getMatchingInfinitives(const ULString& prefix, uluint32 maxMatches, ULList<ULString>& infinitiveList) = 0;
139 
140  virtual ULError getMatchingInfinitives(const ULString& prefix, uluint32 maxMatches, ULList<ULDerivation>& infinitiveList) = 0;
141 
162  virtual ULError getVerbFormTypes(const ULDerivation& verb, ULList<ULPartOfSpeech>& verbFormTypes) = 0;
163 
176  virtual ULError getTenses(const ULDerivation& v, ULList<ULTense>& tenseList, bool includeParticiples=false) = 0;
177 
191  virtual ULError getTensesForClass(uluint32 classID, ULList<ULTense>& tenseList, bool includeParticiples=false) = 0;
192 
201  virtual ULError getAllTenses(ULList<ULTense>& tenseList, bool includeParticiples=false) = 0;
202 
216  virtual ULError getPersons(const ULDerivation& v, ULTense tense, ULList<ULPerson>& personList) = 0;
217 
240  virtual ULError getPersonsForClass(const ULDerivation& v, uluint32 classID, ULTense tense, ULList<ULPerson>& personList) = 0;
241 
249  virtual ULError getAllTaggingRules(ULList<ULTaggingRule>& ruleList) = 0;
250 
259  virtual ULError getFeatureNameList(ULList<ULString>& featureNameList) = 0;
260 
273  virtual ULError getInflectionRules(const ULDerivation& derivation,
274  const ULPartOfSpeech& targetPartOfSpeech,
275  ULList<ULInflectionRule>& ruleList) = 0;
276 
289  virtual ULError getInflectionRulesForDissection(const ULDerivation& derivation, ULList<ULInflectionRule>& ruleList) = 0;
290 
299  virtual ULError getSuccessors(const ULInflectionRule& rule, ULList<ULInflectionRule>& successorList) = 0;
300 
309  virtual ULError getPredecessors(const ULInflectionRule& rule, ULList<ULInflectionRule>& predecessorList) = 0;
310 
319  virtual bool hasStopWord(const ULString& word) = 0;
320 
332  virtual ULError getClosedClassWordForPartOfSpeech(const ULPartOfSpeech& partOfSpeech, ULList<ULDerivation>& wordList) = 0;
333 
350  virtual ULError getFrequencies(const ULString& word, ULList<ULFrequency>& frequencyList) = 0;
351 };
352 
353 #endif