13 const QString
DB_PATH =
"../../en_db.sqlite";
14 const QString ONT_PATH=
"../../Granular-Extractor/ont_db.sqlite";
19 adjective , adverb , conjunction , dative ,
20 noun , interjections , imperfect ,
21 particple , preposition , pronoun , plural , singular ,
22 verb , transitive , intransitive , interrogative , object ,
23 determiner , question , auxiliary , negation ,
28 static map<string, WordType> WordTypeMap = {
31 {
"conj." , conjunction } ,
33 {
"interj." , interjections } ,
34 {
"imp." , imperfect } ,
36 {
"prep." , preposition } ,
38 {
"interrog." , interrogative } ,
41 {
"pron." , pronoun } ,
46 {
"sing." , singular } ,
48 {
"aux." , auxiliary } ,
49 {
"neg." , negation } ,
52 {
"object." , pronoun } ,
53 {
"t." , transitive } ,
54 {
"i." , intransitive } ,
56 {
"det." , determiner } ,
66 static map<WordType, string> WordStringMap = {
70 {conjunction ,
"conj." } ,
72 {interjections ,
"interj." } ,
73 {imperfect ,
"imp." } ,
75 {preposition ,
"prep." } ,
77 {singular ,
"sing." } ,
78 {pronoun ,
"pron." } ,
80 {object ,
"object." } ,
81 {transitive ,
"t." } ,
82 {intransitive ,
"i." } ,
84 {interrogative ,
"interrog." } ,
85 {determiner ,
"det." } ,
87 {auxiliary ,
"aux." } ,
88 {negation ,
"neg." } ,
90 {IGNORETHIS ,
"IGNORE" }
123 static const GrammarPhrase gpList[] ={
145 static std::map<GrammarPhrase,std::string> phraseLookUp = {
146 { G_INVALID,
"Invalid" },
148 { SENTENCE,
"Sentence" },
149 { NOUNPHRASE,
"Noun Phrase" },
150 { VERBPHRASE,
"Verb Phrase" },
151 { PREPPHRASE,
"Prep. Phrase" },
152 { NOMINAL,
"Nominal" },
155 { PREP,
"Preposition" },
156 { DETERMINER,
"Determiner" },
157 { INTPHRASE ,
"Inter. Phrase" },
158 { WHPHRASE,
"Wh. Phrase" },
159 { WHWORD,
"Wh. Word" },
160 { AUXILARY,
"Auxilary" },
161 { ADJECTIVE,
"Adjective" },
162 { NEGATION,
"Negation" },
163 {ADJPHRASE,
"Adj. Phrase"}
179 static std::map<SyntaxObject, std::string> syntaxStrEncoding = {
191 static std::map<SyntaxObject,std::string> syntaxLookUp = {
192 { S_INVALID,
"Invalid" },
194 { SUBJECT,
"Subject" },
195 { MAINVERB,
"Main Verb" },
196 { DIRECTOBJ,
"Direct Object" },
198 {
AUX,
"Auxilary Verb" },
199 { QWORD,
"Question Word" },
206 static std::map<SyntaxObject,std::string> syntaxDBLookUp = {
207 { S_INVALID,
"invalid" },
210 { MAINVERB,
"pred" },
211 { DIRECTOBJ,
"obj" },
215 { QWORD,
"question" }
246 static const SentenceType sentenceList[] = {
253 static std::map<SentenceType,std::string> sentenceLookUp = {
254 {ST_INVALID,
"Invalid" },
255 {DECLARATIVE,
"Declarative"},
256 {IMPERATIVE,
"Imperative" },
257 {INTERROGATIVE,
"Interrogative"}
265 typedef std::vector<GrammarPhrase>
GPlist;
269 typedef std::multimap<GrammarPhrase,GPlist>
mmap;
273 typedef std::pair<GrammarPhrase,GPlist>
GPpair;
282 static const GPpair cfgzInit[] = {
283 GPpair(SENTENCE,{NOUNPHRASE,VERBPHRASE}),
284 GPpair(NOUNPHRASE,{NOUN}),
285 GPpair(NOUNPHRASE,{DETERMINER,NOUN}),
286 GPpair(VERBPHRASE,{VERB}),
287 GPpair(VERBPHRASE,{VERB,NOUNPHRASE}),
288 GPpair(VERBPHRASE,{VERB,NOUNPHRASE,PREPPHRASE}),
289 GPpair(VERBPHRASE,{VERB,PREPPHRASE}),
290 GPpair(PREPPHRASE,{PREP,NOUNPHRASE})
293 static const GPpair cfgqInit[] = {
294 GPpair(SENTENCE,{INTPHRASE,NOUNPHRASE,VERBPHRASE}),
297 GPpair(SENTENCE,{INTPHRASE,VERBPHRASE}),
298 GPpair(SENTENCE,{INTPHRASE,NOUNPHRASE}),
299 GPpair(SENTENCE,{NOUNPHRASE,VERBPHRASE}),
302 GPpair(NOUNPHRASE,{DETERMINER,NOUN}),
303 GPpair(NOUNPHRASE,{NOUN}),
304 GPpair(VERBPHRASE,{VERB,NOUNPHRASE,PREPPHRASE}),
305 GPpair(VERBPHRASE,{VERB,NOUNPHRASE}),
306 GPpair(VERBPHRASE,{VERB,PREPPHRASE}),
307 GPpair(VERBPHRASE,{VERB}),
309 GPpair(PREPPHRASE,{PREP,NOUNPHRASE}),
310 GPpair(PREPPHRASE,{PREP}),
311 GPpair(INTPHRASE,{WHPHRASE,AUXILARY}),
312 GPpair(INTPHRASE,{AUXILARY}),
313 GPpair(INTPHRASE,{WHPHRASE}),
314 GPpair(WHPHRASE,{WHWORD}),
329 static std::map<WordType,GrammarPhrase> WTtoGP = {
333 {determiner,DETERMINER},
336 {auxiliary,AUXILARY},
343 static std::map<GrammarPhrase,WordType> GPtoWT = {
347 {DETERMINER,determiner},
349 {AUXILARY,auxiliary},
std::pair< GrammarPhrase, GPlist > GPpair
GPpair typedef for pair<GrammarPhrase, vector<GrammarPhrase> >
Definition: config.h:273
SyntaxObject
Definition: config.h:167
const QString DB_PATH
Relative path of where Dictionary database is Note : Path is relative to where "build" folder is gene...
Definition: config.h:13
this stores information such as adjective, noun describing objects ,etc
Definition: config.h:176
std::multimap< GrammarPhrase, GPlist > mmap
mmap typedef for multimpa<GrammarPhrase, vector<GrammarPhrase> >
Definition: config.h:269
He kicks the ball to "him".
Definition: config.h:174
std::vector< GrammarPhrase > GPlist
GPlist typedef for vector<GrammarPhrase>
Definition: config.h:265
He eats "apple".
Definition: config.h:173
GrammarPhrase
The GrammarPhrase enum Denotes the Grammar Phrase.
Definition: config.h:99