{
	"pluginname": "Biblios",
	"systemplugin": "0",
	"iswebsite":1,
	"version": "1.0",
	"icon": "mif-delicious",
	"table_def": [
		{
			"name":"biblios_source",
			"saveid":"1sv",
			"getid":"1gt",			
			"delid":"1dt",			
			"form":{
				"1":{"title":"Book","icon":"mif-delicious","type":"Inline","fields":"author,recordtype,title,publicationyear,publicationplace,publisher,isbn_issn,journalname"}
			},
			"list":{
				"1lt":{
					"tbl":"biblios_source","getform":"biblios_source 1","includeeditdelete":true,
					"fld":"author,recordtype,title,publicationyear,publicationplace,publisher,journalname",
					"whr":"recordstatus=1",
					"header":"Author,Recordtype,Title,Year,Place,Publisher,Journal"					
				}
			},
			"fields":[
				{"name":"author varchar(50)","label":"Author/Editor"},
				{"name":"recordtype enum('Book','Journal','Website')","label":"Record Type"},
				{"name":"title varchar(200)","label":"Source Title"},
				{"name":"publicationyear year","label":"Publication Year"},
				{"name":"publicationplace varchar(20)","label":"Publication Place"},
				{"name":"publisher varchar(20)","label":"Publisher"},
				{"name":"journalname varchar(100)","label":"Journal Name"},				
				{"name":"journalvol tinyint","label":"Journal Volume"},				
				{"name":"journalissue tinyint","label":"Journal Issue"},			
				{"name":"isbn_issn varchar(15)","label":"ISBN/ISSN"},
				{"name":"tags varchar(100)","datarole":"taginput","datatagtrigger":"Comma","label":"Tag (seperated by ,)"}
			]
		},{
			"name":"biblios_sourcechapters",
			"saveid":"2sv","getid":"2gt","delid":"2dt",
			"form":{
				"1":{"title":"Chapter/Article Title","type":"Inline","icon":"mif-delicious","fields":"author,chapterno,title,pagerange,tags,linkedsource"}
			},
			"list":{
				"2lt":{
					"tbl":"biblios_sourcechapters a","getform":"biblios_sourcechapters 1",
					"includeeditdelete":true,
					"join":"inner join biblios_source b on a.linkedsource=b.id",
					"fld":"a.author,a.title,a.pagerange,b.title as book,a.tags",
					"header":"Author,Title,Page Range,Source,Tags",
					"whr":"a.recordstatus=1"
				}
			},
			"fields":[
				{"name":"author","type":"varchar(50)","label":"Author"},
				{"name":"chapterno","type":"tinyint","label":"Chapter/Article No"},
				{"name":"title","type":"varchar(200)","label":"Chapter/Article Title"},
				{"name":"pagerange","type":"varchar(15)","label":"Page Range"},
				{"name":"tags","datarole":"taginput","datatagtrigger":"Comma","type":"varchar(200)","label":"Tag (seperated by ,)"},
				{"name":"linkedsource","type":"varchar(36)","fieldtype":"lookup","label":"Source Link","lookup":{"sqlid":"0lkup","tbl":"biblios_source","fld":"title"}}
			]
		},{
			"name":"biblios_journal",
			"saveid":"3sv","getid":"3gt","delid":"3dt",
			"form":{
				"1":{"title":"Entries","type":"Inline","icon":"mif-delicious","fields":"*"}
			},
			"list":{
				"3lt":{
					"tbl":"biblios_journal a","getform":"biblios_journal 1",
					"includeeditdelete":true,"filter":"tags",
					"join":[
						"left join biblios_sourcechapters b ON a.linkedchapter=b.id",
						"left join biblios_source c ON b.linkedsource=c.id"
					],
					"fld":"a.journal,a.tags",
					"limit":"300",
					"whr":[
						"a.recordstatus=1",
						{"if":"||tags|| != BLANK","then":" and a.tags like'%||tags||%'"},
						{"if":"||journal|| != BLANK","then":" and a.journal like'%||journal||%'"}						
					]
				}
			},
			"fields":[
				{"name":"linkedchapter","type":"varchar(36)","label":"Linked Chapter","fieldtype":"lookup","lookup":{"sqlid":"1lkup","tbl":"biblios_sourcechapters a","join":"inner join biblios_source b on a.linkedsource=b.id","fld":"CONCAT(a.title,'-',b.title) as ctitle","whr":"a.title like '%||searchtext||%'"}},
				{"name":"journal","type":"varchar(3900)","label":"Journal", "onblur":"$(this).val($(this).val().replace(&forwardslash&(&backwardslash&r&backwardslash&n|&backwardslash&n|&backwardslash&r)&forwardslash&gm, ' '));"},
				{"name":"tags","datarole":"taginput","datatagtrigger":"Comma","type":"varchar(200)","label":"Tag (seperated by ,)"},
				{"name":"pagerange","type":"varchar(15)","label":"Page Range"}
			]
			
		},{
			"name":"biblios_questions",
			"saveid":"4sv","getid":"4gt","delid":"4dt",
			"form":{
				"0":{"title":"Questions","type":"Inline","icon":"mif-delicious","fields":"*"}
			},
			"list":{
				"4lt":{
					"getform":"biblios_questions 0",
					"tbl":"biblios_questions","fld":"questionword,meaning,action",
					"whr":"recordstatus=1",
					"header":"Word,Meaning,Action",
					"includeeditdelete":true
				}
			},
			"fields":[
				{"name":"questionword","type":"varchar(30)","other":"unique","label":"Question Word"},
				{"name":"meaning","type":"varchar(200)","label":"Meaning"},
				{"name":"action","type":"varchar(30)","label":"Action"}
				
			]
		},{
			"name":"biblios_paraphrases",
			"saveid":"5sv","getid":"5gt","delid":"5dt",
			"form":{
				"0":{"title":"Paraphrases","icon":"mif-delicious","type":"Inline","fields":"*"}
			},
			"list":{
				"5lt":{
					"getform":"biblios_paraphrases 0",
					"tbl":"biblios_paraphrases","fld":"word,alternativeword",
					"includeeditdelete":true,
					"whr":[
						"recordstatus=1",
						{"if":"||word|| != BLANK","then":" and word like '%||word||%'"},
						{"if":"||alternativeword|| != BLANK","then":" and alternativeword like '%||alternativeword||%'"}
					]
				}
			},
			"fields":[
				{"name":"word","type":"varchar(50)","label":"Word/Phrase"},
				{"name":"alternativeword","type":"varchar(100)","label":"Paraphrased Word/Phrase"}
			]
		},{
			"name":"biblios_userqueries",
			"saveid":"6sv","getid":"6gt","delid":"6dt",
			"form":{
				"0":{"title":"User Queries","icon":"mif-delicious","type":"Inline","fields":"*"}
			},
			"list":{
				"6lt":{
					"getform":"biblios_userqueries 0",
					"includeeditdelete":true,
					"tbl":"biblios_userqueries",
					"fld":"query,keyword,keyword1,adminchecked",
					"header":"Query,Keyword1,Keyword2,Admin Checked",
					"whr":"recordstatus=1","srt":"adminchecked"
				}
			},
			"fields":[
				{"name":"query","type":"varchar(300)","other":"unique","label":"Query"},
				{"name":"keyword","type":"varchar(100)","label":"Keyword (Primary)"},
				{"name":"keyword1","type":"varchar(100)","label":"Keyword (Secondary)"},
				{"name":"mask","type":"varchar(300)","label":"Mask (Assign % for keyword identified)"},
				{"name":"adminchecked","type":"tinyint","option":"0:Not Checked,1:Checked","label":"Admin Checked"}
			]
		},{
			"name":"biblios_sentencetype",
			"saveid":"7sv","getid":"7gt","delpermanentid":"7dt",
			"form":{
				"0":{"title":"Sentence Type","icon":"mif-delicious","type":"Inline","fields":"*"}
			},
			"list":{
				"7lt":{
					"tbl":"||thistbl||","fields":"*","getform":"biblios_sentencetype 0",
					"includeeditdelete":true,
					"whr":[
						"recordstatus=1"						
					]
				}
			},
			"fields":[
				{"name":"startswith","type":"varchar(200)","label":"Sentence Starts With"},
				{"name":"hasword","type":"varchar(10)","label":"Sentence Has Word"},
				{"name":"endswith","type":"varchar(10)","label":"Sentence Ends With"},
				{"name":"sentencetype","type":"enum('Declarative','Interrogative','Exclamatory','Imperative','Conditional')","label":"Sentence Type"}
			]
		},{
			"name":"biblios_wordpairs",
			"saveid":[
				{"id":"8sv","whr":"word='||word||' and pairword='||pairword||' and recordstatus=1"}
			],
			"getid":"8gt","delid":"8dt",			
			"form":{
				"0":{"title":"Word Pairs","icon":"mif-delicious","type":"Inline","fields":"*"}
			},
			"list":{
				"8lt":{
					"tbl":"||thistbl||","fields":"*","getform":"biblios_wordpairs 0",
					"includeeditdelete":true,
					"whr":[
						"recordstatus=1"						
					]
				}
			},
			"fields":[
				{"name":"word","type":"varchar(50)","label":"Word"},
				{"name":"pairword","type":"varchar(50)","label":"Word Pair"},
				{"name":"pairtype","type":"enum('Adjective-Noun','Verb-Adverb','Adjective-Adjective','Verb-Object','Preposition-Noun')","label":"Word Pair"}
			]
		},{
			"name":"biblios_sentencesequence",
			"saveid":"9sv","getid":"9gt","delid":"9dt",			
			"form":{
				"0":{"title":"Sentence Sequence","icon":"mif-delicious","type":"Inline",
					"fields":[
						"sentencesequence",						
						{"name":"9ltdiv","id":"9ltdiv","fieldtype":"div","value":""}						
					]
				}
			},
			"list":{
				"9lt":{
					"tbl":"||thistbl||","fields":"*",
					"whr":[
						"recordstatus=1"						
					],
					"prepend":[
						{"elem":{
							"elem":[
								{"name":"9ltelem","id":"9ltelem","type":"panel","title":"POS Tagging",
								"content":[							
										"<div style='width:100%' id='9ltpanel'><textarea id='9ltsentences' style='width:100%;border-radius:3px;border:1px solid gray'></textarea>",
										"<button type='button' onclick='Eirene.runStmt(&apos;1splse&apos;,{sentence:$(&apos;#9ltsentences&apos;).val(),output:&apos;#9ltdiv&apos;})'>OK</button>",
										"<button type='button' onclick='$(&apos;9ltunknownwordsparent&apos;).toggle()'>Unknown Words</button>",										
										"</div>",
										"<div><b>Dictionary Entry</b><br>",
											"<input id='9ltwordparse' placeholder='Word' onblur='applyGrammarRulesForWords($(this).val(),$(&apos;#9ltwordparsetype&apos;).val(),&apos;#9ltsecondform&apos;,&apos;#9ltthirdform&apos;,&apos;#9ltfourthform&apos;,&apos;#9ltfifthform&apos;,&apos;#9ltcategory&apos;)'>",
											"<select id='9ltwordparsetype' onchange='applyGrammarRulesForWords($(&apos;#9ltwordparse&apos;).val(),$(this).val(),&apos;#9ltsecondform&apos;,&apos;#9ltthirdform&apos;,&apos;#9ltfourthform&apos;,&apos;#9ltfifthform&apos;,&apos;#9ltcategory&apos;)' class='select0' >",
												"<option value='$n'>Noun</option>",
												"<option value='$np'>Noun Proper</option>",
												"<option value='$v'>Verb</option>",
												"<option value='$hv'>Helping Verb</option>",
												"<option value='$adj'>Adjective</option>",
												"<option value='$pn'>Pronoun</option>",
												"<option value='$inf'>Infinitive</option>",
												"<option value='$num'>Number</option>",
												"<option value='$adv'>Adverb</option>",
												"<option value='$advdir'>Adverb of Direction</option>",
												"<option value='$advp'>Adverb of Place</option>",
												"<option value='$advt'>Adverb of Time</option>",
												"<option value='$advf'>Adverb of Frequency</option>",
												"<option value='$con'>Conjuction</option>",
												"<option value='$prp'>Preposition</option>",
												"<option value='$int'>Interjection</option>",
												"<option value='$det'>Determiner</option>",
												"<option value='$exc'>Exclamation</option>",											
											"</select>",
											"<input id='9ltsecondform' placeholder='Second Form'>",
											"<input id='9ltthirdform' placeholder='Third Form'>",
											"<input id='9ltfourthform' placeholder='Third Person Singular Form'>",
											"<input id='9ltfifthform' placeholder='Participle'>",
											"<input id='9ltcategory' placeholder='Category'>",
											"<button class='ml-2' type='button' onclick='Eirene.runStmt(&apos;10sv&apos;,{word:$(&apos;#9ltwordparse&apos;).val().trim().replaceAll(&apos;&nbsp;&apos;,&apos; &apos;),wordtype:$(&apos;#9ltwordparsetype&apos;).val(),secondform:$(&apos;#9ltsecondform&apos;).val().trim(),thirdform:$(&apos;#9ltthirdform&apos;).val().trim(),fourthform:$(&apos;#9ltfourthform&apos;).val().trim(),fifthform:$(&apos;#9ltfifthform&apos;).val().trim(),category:$(&apos;#9ltcategory&apos;).val().trim()})'>Save</button>",
										"</div>",
										"<div  id='9ltunknownwordsparent'><div><b>Unknown Word List</b><div id='9ltunknownwords'></div></div></div>",
										"<div><b>Word Pair Entry</b><br>",											
											"<input id='9ltwordpairword' placeholder='Word'>",
											"<input id='9ltwordpairword1' placeholder='Pair Word'>",
											"<select id='9ltwordpairtype' class='select0' values='Adjective-Noun,Verb-Adverb,Verb-Object'></select>",
											"<button class='ml-2' type='button' onclick='Eirene.runStmt(&apos;8sv&apos;,{word:$(&apos;#9ltwordpairword&apos;).val(),pairtype:$(&apos;#9ltwordpairtype&apos;).val(),pairword:$(&apos;#9ltwordpairword1&apos;).val()})'>Save</button>",
										"</div>",
										"<div id='9ltdiv'><div>"										
									]
								}
							]
							}						
						}
					]					
				}
			},
			"fields":[
				{"name":"sentencesequence","type":"varchar(300)","other":"unique","label":"Sentence Sequence. use abbrivations ||verb||, ||noun|| etc"}				
			]
		},
		{
			"name":"biblios_dictionary",
			"saveid":[
				{"id":"10sv","whr":"word='||word||' and pos='||pos||'"}
			],
			"getid":"10gt","delid":"10dt",			
			"form":{
				"0":{"title":"Dictionary","icon":"mif-delicious","type":"Inline",
					"fields":[
						"word,pos,secondform,thirdform,fourthform,fifthform,category"	
					]
				}
			},
			"list":{
				"10lt":{
					"tbl":"||thistbl||","fields":"word,pos,poscategory,secondform,thirdform,fourthform,fifthform,category",
					"getform":"||thistbl|| 0",
					"filter":"word,pos,poscategory,category",					
					"includeeditdelete":true,"editablefields":"poscategory,category"										
				}
			},			
			"fields":[
				{"name":"word varchar(30)","label":"Word"},
				{"name":"pos varchar(30)","fieldtype":"select","option":"select distinct pos from biblios_dictionary order by pos","label":"POS"},
				{"name":"poscategory varchar(30)","fieldtype":"select","option":",Proper Noun (Name),Proper Noun (Place),Common Noun (Name),Common Noun (Place),Place,Animal,Thing,Event,Abstract","label":"POS Category"},
				{"name":"secondform varchar(30)","label":"Second Form (Noun s-p/Verb 3forms/Adjective 3 degrees) Leave blank for normal forms"},
				{"name":"thirdform varchar(30)","label":"Third Form (Noun s-p/Verb 3forms/Adjective 3 degrees) Leave blank for normal forms"},
				{"name":"fourthform varchar(30)","label":"Fourth Form (Verb Third Person Singular)"},
				{"name":"fifthform varchar(30)","label":"Fifth Form (Verb Gerund/Present Participle)"},
				{"name":"category varchar(30)","fieldtype":"text","label":"Category"}
			]
		},{
			"name":"biblios_postaggingrules",
			"saveid":[
				{"id":"11sv","whr":"word='||word||' and wordtype='||wordtype||'"}
			],
			"getid":"11gt","delid":"11dt",			
			"form":{
				"0":{"title":"POS Tag Rules","icon":"mif-delicious","type":"Inline",
					"fields":"*"
				}
			},
			"list":{
				"11lt":{
					"tbl":"||thistbl||",
					"fields":"word,previousword,previouswordtype,nextword,nextwordtype,wordtypes,recommendedwordtype,recommendedpreviouswordtype",
					"getform":"||thistbl|| 0",
					"filter":"previouswordtype,nextwordtype",
					"header":"Word,Previous Word,PreviousWord Type,NextWord,NextWord Type,Word Types,Recommended WordType,Rec. Previous WordType",
					"includeeditdelete":true,
					"limit":"10",
					"whr":[
						"recordstatus=1",
						{"if":"||previouswordtype|| != BLANK","then":" and previouswordtype ='||previouswordtype||'"},
						{"if":"||nextwordtype|| != BLANK","then":" and nextwordtype ='||nextwordtype||'"}
					]
				}
			},
			"fields":[
				{"name":"word","type":"varchar(40)","label":"Word"},
				{"name":"previousword","type":"varchar(40)","label":"Previous Word"},
				{"name":"previouswordtype","type":"varchar(40)","label":"PreviousWord Type"},
				{"name":"nextword","type":"varchar(40)","label":"NextWord"},
				{"name":"nextwordtype","type":"varchar(40)","label":"NextWord Type"},
				{"name":"wordtypes","type":"varchar(40)","label":"Selection From Word Type"},
				{"name":"recommendedwordtype","type":"varchar(40)","label":"Recommended Word Type"},				
				{"name":"recommendedpreviouswordtype","type":"varchar(40)","label":"Recommended Previous WordType"}				
			]
		},{
			"name":"biblios_synonymn",
			"saveid":"12sv","getid":"12gt","delpermanentid":"12dt",			
			"customsave":[						
				"$synonymn=&quot;||synonymn||&quot;;",								
				"$synonymn1=explode(',',$synonymn);",				
				"$db=$GLOBALS['db'];",
				"$value=array();",
				"$error=false;",
				"$sqlJson=json_decode('{}');",
				"$sqlJson->validate='none';",
				"$sqlJson->tbl='biblios_synonymn';",
				"$sqlJson->fld='synonymn,wordtype,word,example,senseword,opposite';",
				"$sqlJson->fldtype='s,s,s,s,s,s';",				
				"$sqlJson->wordtype1='||wordtype||';",				
				"$sqlJson->word1=&quot;||word||&quot;;",				
				"$sqlJson->example1=&quot;||example||&quot;;",				
				"$sqlJson->senseword1=&quot;||senseword||&quot;;",				
				"$sqlJson->opposite1=&quot;||opposite||&quot;;",				
				"$sqlJson->value=&apos;||synonymn1||,||wordtype1||,||word1||,||example1||,||senseword1||,||opposite1||&apos;;",				
				"/*Find if any word exists in db*/",
				"foreach($synonymn1 as $k=>$synword){",
					"$synword=str_replace('  ',' ',$synword);",
					"$synonymn1[$k]=trim($synword);",
					"if(empty($value)){",
						"$sql=&apos;SELECT id,synonymn from biblios_synonymn where synonymn like &quot;%,$synword,%&quot; and wordtype=&quot;||wordtype||&quot; and senseword=&quot;||senseword||&quot;&apos;;",											
						"$value=$db->FetchRecord($sql,false);",
						"if(!empty($value)) break;",
					"}",
				"}",
				"if(!empty($value)){",
					"$sqlJson->command='update';",					
					"$sqlJson->whr=&quot;id='$value[0]'&quot;;",					
					"$existingsynonymn=explode(',',$value[1]);",					
					"foreach($synonymn1 as $n){if(!in_array($n,$existingsynonymn)) $existingsynonymn[]=trim($n);}",										
					"$existingsynonymn=str_replace(',,',',',implode(',',$existingsynonymn)).',';",
					"$GLOBALS['value']['synonymn1']=$existingsynonymn;",					
				"}else{",
					"$sqlJson->command='insert';",
					"$synonymn=implode(',',$synonymn1);",
					"$GLOBALS['value']['synonymn1']=$synonymn;",					
				"}",
				"$api=new EireneApi();",
				"$res=$api->SaveRow($sqlJson,$GLOBALS['value'],$GLOBALS['result']);",
				"$j=json_decode('{}');",
				"$j->action='dom';",
				"if($res==true){",					
					"$j->fun='showtoast;success;Saving Successful';",						
					"setOutput('dom',$GLOBALS['result'],'',$j,true);",
				"}else{",
					"$j->fun='showtoast;alert;Saving Failed';",						
					"setOutput('dom',$GLOBALS['result'],'',$j,true);",
				"}"
			],
			"form":{
				"0":{"title":"Synonymns","icon":"mif-delicious","type":"Inline","fields":"*"}
			},
			"list":{
				"12lt":{
					"tbl":"||thistbl||","fields":"*","getform":"biblios_synonymn 0",
					"includeeditdelete":true,
					"whr":[
						"recordstatus=1"						
					],
					"header":"Synonymns",
					"limit":"10"
				}
			},
			"fields":[
				{"name":"word","type":"varchar(40)","label":"Word","required":true,"onchange":"$('input[name=example]').val('');$('input[name=opposite]').val('');","onfocus":"this.select();"},
				{"name":"wordtype","type":"varchar(6)","label":"Word Type","fieldtype":"select","option":"$n:Noun,$np:Noun Proper,$v:Verb,$hv:Helping Verb,$adj:Adjective,$pn:Pronoun,$inf:Infinitive,$num:Number,$adv:Adverb,$con:Conjuction,$prp:Preposition,$art:Article,$int:Interjection,$det:Determiner,$exc:Exclamation","required":true},
				{"name":"senseword","type":"varchar(30)","label":"In the sense of (Word)","required":true},
				{"name":"synonymn","type":"varchar(400)","label":"Synonymn (seperated by comma)","required":true,"onblur":"$(this).val($(this).val().replaceAll('  ',',').trim().replaceAll(' (formal)','').replaceAll(' (informal)','').replaceAll(' (slang)',''));item=$(this).val().split(',');$('input[name=senseword]').val(item[0]);","onfocus":"this.select();"},
				{"name":"opposite","type":"varchar(400)","label":"Opposite (seperated by comma)","onblur":"$(this).val($(this).val().replaceAll('  ',',').trim().replaceAll(' (formal)','').replaceAll(' (informal)','').replaceAll(' (slang)',''));item=$(this).val().split(',');","onfocus":"this.select();"},
				{"name":"example","type":"varchar(400)","label":"Example Sentence","onfocus":"this.select();"}
			]
		},{
			"name":"biblios_prompt",
			"saveid":"13sv","getid":"13gt","delid":"13dt",
			"form":{
				"0":{"title":"AI Learning","icon":"mif-delicious","fields":"*","type":"Inline"}
			},
			"list":{
				"13lt":{
					"fields":"*","getform":"||thistbl|| 0","filter":"prompt",
					"includeeditdelete":true,
					"whr":[
						"recordstatus=1",
						{"if":"||phrase|| != BLANK","then":" and phrase like '%||phrase||%'"}
					]
				}
			},
			"fields":[
				{"name":"prompt varchar(100)","label":"Prompt"},
				{"name":"algorithm varchar(3000)","label":"Algorithm (seperated by semicolon)"}
			]
		}
	],	
	"form":[],	
	"formbuttons": [{
			"name": "biblios",
			"caption": "Biblios",
			"icon": "mif-delicious fg-red",
			"onclick": "Eirene.runStmt('0dashb-0dash1')"
		}
	],
	"sqlstatement": [
		{
			"id":"0dashb",
			"name":"Biblios Dashboard",
			"sql":{
				"action":"Return","outputto":"html","output":"#workareaFilter1",
				"value":[
					{"sqlstatement":{
						"a":"select count(*) from biblios_source where recordstatus=1 and recordtype='Book'",
						"b":"select count(*) from biblios_source where recordstatus=1 and recordtype='Journal'",
						"c":"select count(*) from biblios_source where recordstatus=1 and recordtype='Website'",
						"d":"select count(*) from biblios_journal where recordstatus=1",
						"e":"select count(*) from biblios_sourcechapters where recordstatus=1",
						"f":"select count(*) from biblios_questions where recordstatus=1",
						"g":"select count(*) from biblios_paraphrases where recordstatus=1",
						"h":"select count(*) from biblios_userqueries where recordstatus=1",
						"i":"select count(*) from biblios_dictionary where recordstatus=1",
						"j":"select count(*) from biblios_wordpairs where recordstatus=1",
						"k":"select count(*) from biblios_prompt where recordstatus=1"
					}},
					{
						"elem":{							
							"parent":"div class='row'",
							"elem":[
								{"name":"dash1","parent":"div class='cell-md-4' onclick='Eirene.runStmt(&apos;1lt&apos;)'","type":"iconbox","value":"||GET_a||","icon":"mif-books","valueexplaination":"Books"},
								{"name":"dash2","parent":"div class='cell-md-4' onclick='Eirene.runStmt(&apos;1lt&apos;)'","type":"iconbox","value":"||GET_b||","icon":"mif-file-text","valueexplaination":"Journals"},
								{"name":"dash3","parent":"div class='cell-md-4' onclick='Eirene.runStmt(&apos;1lt&apos;)'","type":"iconbox","value":"||GET_c||","icon":"mif-star-empty","valueexplaination":"Websites"},
								{"name":"dash4","parent":"div class='cell-md-4' onclick='Eirene.runStmt(&apos;3lt&apos;)'","type":"iconbox","value":"||GET_d||","icon":"mif-star-full","valueexplaination":"Entries"},
								{"name":"dash5","parent":"div class='cell-md-4' onclick='Eirene.runStmt(&apos;2lt&apos;)'","type":"iconbox","value":"||GET_e||","icon":"mif-star-full","valueexplaination":"Chapters"},
								{"name":"dash6","parent":"div class='cell-md-4' onclick='Eirene.runStmt(&apos;4lt&apos;,{var4lt_output:&apos;#workareaTablebox&apos;})'","type":"iconbox","value":"||GET_f||","icon":"mif-star-full","valueexplaination":"Questions"},
								{"name":"dash7","parent":"div class='cell-md-4' onclick='Eirene.runStmt(&apos;5lt&apos;,{var5lt_output:&apos;#workareaTablebox&apos;})'","type":"iconbox","value":"||GET_g||","icon":"mif-star-full","valueexplaination":"Paraphrases"},
								{"name":"dash8","parent":"div class='cell-md-4' onclick='Eirene.runStmt(&apos;6lt&apos;,{var6lt_output:&apos;#workareaTablebox&apos;})'","type":"iconbox","value":"||GET_h||","icon":"mif-star-full","valueexplaination":"User Queries"},
								{"name":"dash9","parent":"div class='cell-md-4' onclick='Eirene.runStmt(&apos;10lt&apos;,{var10lt_output:&apos;#workareaTablebox&apos;})'","type":"iconbox","value":"||GET_i||","icon":"mif-star-full","valueexplaination":"Dictionary Words"},
								{"name":"dash10","parent":"div class='cell-md-4' onclick='Eirene.runStmt(&apos;8lt&apos;,{var8lt_output:&apos;#workareaTablebox&apos;})'","type":"iconbox","value":"||GET_j||","icon":"mif-star-full","valueexplaination":"Word Pairs"},
								{"name":"dash11","parent":"div class='cell-md-4' onclick='Eirene.runStmt(&apos;13lt&apos;,{var13lt_output:&apos;#workareaTablebox&apos;})'","type":"iconbox","value":"||GET_k||","icon":"mif-star-full","valueexplaination":"Prompts"}
							]
						}
					},{
						"elem":{
							"parent":"div","outputto":"html","output":"#workareaFilter",
							"elem":[
								{"name":"hmenu1","type":"hmenu",
									"menu":[
										{
											"File":{
												"Question":"Eirene.runStmt('4lt',{var4lt_output:'#workareaTablebox'})",
												"Paraphrases":"Eirene.runStmt('5lt',{var5lt_output:'#workareaTablebox'})",
												"User_Queries":"Eirene.runStmt('6lt',{var6lt_output:'#workareaTablebox'})",
												"Sentence_Type":"Eirene.runStmt('7lt',{var7lt_output:'#workareaTablebox'})",
												"Word_Pair":"Eirene.runStmt('8lt',{var8lt_output:'#workareaTablebox'})",
												"POSTagging":"Eirene.runStmt('9lt',{var9lt_output:'#workareaTablebox'})",
												"Dictionary":"Eirene.runStmt('10lt',{var10lt_output:'#workareaTablebox'})",
												"POSTagging Rules":"Eirene.runStmt('11lt',{var11lt_output:'#workareaTablebox'})",
												"Synonymns":"Eirene.runStmt('12lt',{var12lt_output:'#workareaTablebox'})"
											}
										}
									]
								}
							]
						}
					}
				],
				"onsuccess":"cmd:dom,fun:show;#workareaFilter-cmd:dom,fun:show;#workareaFilter1-cmd:dom,fun:show;#workareaTablebox-cmd:dom,fun:show;#workareaAppendix"
			}
		},{
			"id":"0dash1",
			"name":"Search Button",
			"sql":{
				"action":"Return","output":"#workareaAppendix",
				"value":[					
					{"elem":
						{
							"parent":"div",
							"elem":[
								{"name":"biblios_searchtxt","type":"text","id":"biblios_searchtxt"},
								{"name":"biblios_searchbtn","type":"span","class":"mif-search p-2","onclick":"Eirene.runStmt('1src',{searchtext:$('#biblios_searchtxt').val()})"}
							]
						}
					}
				]
			}
		},{
			"id":"1src",
			"name":"Search user query",
			"sql":{
				"action":"Return","outputto":"php","output":"res",
				"value":[
					{"phpfunction":{"fun":"GetAnswerToUserQueryBiblios","param1":"||searchtext||"}}
				],
				"onsuccess":"cmd:dom,fun:function;typeWriter;workareaTablebox;||queryresponse||"
			}
		},{
			"id":"1prsen",
			"name":"POSTagging Sentence",
			"sql":{
				"action":"Return","outputto":"php","output":"res",
				"value":[
					{"phpfunction":{"fun":"POSTagging","param1":"||sentence||","param2":"||outputevaluate||","param3":"||outputwordpair||"}}				
				]
			}
		},{
			"id":"1unwrd",
			"name":"Find Unknown Words",
			"sql":{
				"action":"Return","outputto":"php","output":"res",
				"value":[
					{"phpfunction":{"fun":"GetUnKnownWords","param1":"||sentence||","param2":"||outputevaluate||"}}				
				]
			}
		},{
			"id":"1splse",
			"name":"Split Sentence",
			"sql":{
				"action":"Return","outputto":"php","output":"res",
				"value":[
					{"phpfunction":{"fun":"SplitSentence","param1":"||sentence||","param2":"||output||"}}				
				]
			}
		},{
			"id":"1wrdfd",
			"name":"Find Word if exists",
			"sql":{
				"action":"Get Row","outputto":"php","output":"dictrow",
				"tbl":"biblios_dictionary",
				"whr":"word='||word||' or secondform='||word||' or thirdform='||word||' or fourthform='||word||' or fifthform='||word||'",
				"fld":"word,pos,secondform,thirdform,fourthform,fifthform,category",				
				"onsuccess":[
					"cmd:dom,fun:val;#9ltwordparse;||GET_dictrow_word||",
					"cmd:dom,fun:val;#9ltsecondform;||GET_dictrow_secondform||",
					"cmd:dom,fun:val;#9ltthirdform;||GET_dictrow_thirdform||",
					"cmd:dom,fun:val;#9ltfourthform;||GET_dictrow_fourthform||",
					"cmd:dom,fun:val;#9ltfifthform;||GET_dictrow_fifthform||",
					"cmd:dom,fun:val;#9ltwordparsetype;||GET_dictrow_wordtype||",
					"cmd:dom,fun:val;#9ltcategory;||GET_dictrow_category||"
				]
			}
		}
	]
}