Nils Diewald | 4af3f0b | 2014-06-25 01:43:17 +0000 | [diff] [blame] | 1 | %= javascript begin |
| 2 | |
| 3 | new Hint({ |
| 4 | "ref" : "q-field", |
| 5 | "qlRef" : "ql-field", |
| 6 | "hintSize" : 10, |
| 7 | "hints" : { |
| 8 | "-foundries" : { |
| 9 | "corenlp" : ["corenlp/", "CoreNLP"], |
| 10 | "cnx" : ["cnx/", "Connexor"], |
| 11 | "opennlp" : ["opennlp/", "OpenNLP"], |
| 12 | "xip" : ["xip/", "Xerox"], |
| 13 | "tt" : ["tt/", "TreeTagger"], |
| 14 | "mate" : ["mate/", "Mate"] |
| 15 | }, |
| 16 | "corenlp" : { |
| 17 | "ne_dewac_175m_600" : ["ne_dewac_175m_600=", "Named Entity"], |
| 18 | "ne_hgc_175m_600" : ["ne_hgc_175m_600=", "Named Entity"] |
| 19 | }, |
| 20 | "corenlp/ne_dewac_175m_600" : ["I-LOC","I-MISC","I-ORG","I-PER"], |
| 21 | "corenlp/ne_hgc_175m_600" : ["I-LOC","I-MISC","I-ORG","I-PER"], |
| 22 | "cnx" : { |
| 23 | "c" : ["c=", "Constituency"], |
| 24 | "l" : ["l=", "Lemma"], |
| 25 | "m" : ["m=", "Morpho Syntax"], |
| 26 | "p" : ["p=", "Part of Speech"], |
| 27 | "syn" : ["syn=", "Syntax"] |
| 28 | }, |
| 29 | "cnx/c" : ["np"], |
| 30 | "cnx/m" : ["Abbr","CMP","IMP","IND","INF","ORD","PAST","PCP","PERF","PL","PRES","PROG","Prop","SUB","SUP"], |
| 31 | "cnx/p" : ["A","ADV","CC","CS","DET","INTERJ","N","NUM","PREP","PRON","V"], |
| 32 | "cnx/syn" : ["@ADVL","@AUX","@CC","@MAIN","@NH","@POSTMOD","@PREMARK","@PREMOD"], |
| 33 | "opennlp" : { |
| 34 | "p" : ["p=", "Part of Speech"] |
| 35 | }, |
| 36 | "opennlp/p" : ["$(","$,","$.","ADJA","ADJD","ADV","APPR","APPRART","ART","CARD","FM","KOKOM","KON","KOUI","KOUS","NE","NN","PDAT","PDS","PIAT","PIS","PPER","PPOSAT","PRELS","PRF","PROAV","PTKNEG","PTKVZ","PTKZU","PWAT","PWAV","PWS","TRUNC","VAFIN","VAINF","VAPP","VMFIN","VVFIN","VVIMP","VVINF","VVIZU","VVPP","XY"], |
| 37 | "xip" : { |
| 38 | "c" : ["c=", "Constituency"], |
| 39 | "d" : ["d=", "Dependency"], |
| 40 | "l" : ["l=", "Lemma"], |
| 41 | "p" : ["p=", "Part of Speech"] |
| 42 | }, |
| 43 | "xip/c" : ["ADJ","ADV","AP","CONJ","DET","INFC","INS","ITJ","MC","NEGAT","NOUN","NP","NPA","NUM","POSTP","PP","PREP","PRON","PTCL","PUNCT","SC","SYMBOL","TOP","TRUNC","VERB"], |
| 44 | "xip/d" : ["ADJMOD","AUXIL","CONNECT","COORD","DATE","DETERM","EXPL","LOC","MODAL","NEGAT","NMOD","NMOD2","NUMMOD","OBJ","ORG","PERSON","PLINK","PRED","REFLEX","SUBJ","THEMA","TIME","TRUNC","VMAIN","VMOD","VPREF"], |
| 45 | "xip/p" : ["ADJ","ADV","CONJ","DET","ITJ","NEGAT","NOUN","NUM","POSTP","PREP","PRON","PTCL","PUNCT","SYMBOL","TRUNC","VERB"], |
| 46 | "tt" : { |
| 47 | "l" : ["l=", "Lemma"], |
| 48 | "p" : ["p=", "Part of Speech"] |
| 49 | }, |
| 50 | "tt/p" : ["$.","ADJA","ADJD","ADV","APPO","APPR","APPRART","APZR","ART","CARD","FM","ITJ","KOKOM","KON","KOUI","KOUS","NE","NN","PDAT","PDS","PIAT","PIS","PPER","PPOSAT","PRELS","PRF","PROAV","PTKA","PTKNEG","PTKVZ","PTKZU","PWAT","PWAV","PWS","TRUNC","VAFIN","VAINF","VAPP","VMFIN","VMINF","VVFIN","VVIMP","VVINF","VVIZU","VVPP","XY"], |
| 51 | "mate" : { |
| 52 | "d" : ["d=", "Dependency"], |
| 53 | "l" : ["l=", "Lemma"], |
| 54 | "m" : ["m=", "Morpho Syntax"], |
| 55 | "p" : ["p=", "Part of Speech"] |
| 56 | }, |
| 57 | "mate/d" : ["--","AG","AMS","APP","CC","CD","CJ","CM","CP","CVC","DA","DM","EP","JU","MNR","MO","NG","NK","NMC","OA","OC","OG","OP","PAR","PD","PG","PH","PM","PNC","RC","RE","RS","SB","SBP","SVP","UC"], |
| 58 | "mate/m" : ["<no-type>","case:*","case:acc","case:dat","case:gen","case:nom","degree:comp","degree:pos","degree:sup","gender:*","gender:fem","gender:masc","gender:neut","mood:imp","mood:ind","mood:subj","number:*","number:pl","number:sg","person:1","person:2","person:3","tense:past","tense:pres"], |
| 59 | "mate/p" : ["$(","$,","$.","<root-POS>","ADJA","ADJD","ADV","APPO","APPR","APPRART","ART","CARD","FM","ITJ","KOKOM","KON","KOUI","KOUS","NE","NN","PDAT","PDS","PIAT","PIS","PPER","PPOSAT","PPOSS","PRELAT","PRELS","PRF","PROAV","PTKA","PTKNEG","PTKVZ","PTKZU","PWAT","PWAV","PWS","TRUNC","VAFIN","VAINF","VAPP","VMFIN","VVFIN","VVIMP","VVINF","VVIZU","VVPP","XY"] |
| 60 | }} |
| 61 | ); |
| 62 | |
| 63 | |
| 64 | function openTutorial (o) { |
| 65 | var tut = $("#tutorial"); |
| 66 | tut.addClass("active"); |
| 67 | var iframe = tut.children("iframe"); |
Nils Diewald | 4e9fbcb | 2014-07-15 11:45:09 +0000 | [diff] [blame^] | 68 | /* |
Nils Diewald | 4af3f0b | 2014-06-25 01:43:17 +0000 | [diff] [blame] | 69 | var src = iframe.attr("data-src"); |
| 70 | iframe.attr("src", src); |
Nils Diewald | 4e9fbcb | 2014-07-15 11:45:09 +0000 | [diff] [blame^] | 71 | */ |
| 72 | iframe.attr("src", getTutorialPage()); |
Nils Diewald | 4af3f0b | 2014-06-25 01:43:17 +0000 | [diff] [blame] | 73 | }; |
| 74 | |
| 75 | function closeTutorial (o) { |
| 76 | $("#tutorial").removeClass("active"); |
| 77 | }; |
| 78 | |
| 79 | function useQuery (o) { |
| 80 | var q = o.getAttribute("data-query"); |
| 81 | var ql = o.getAttribute("data-query-language"); |
| 82 | $("#ql-field").val(ql); |
| 83 | $("#q-field").val(q); |
| 84 | closeTutorial(); |
| 85 | }; |
| 86 | |
Nils Diewald | 7cad840 | 2014-07-08 17:06:56 +0000 | [diff] [blame] | 87 | $("#sidebar").on("click", function () { |
Nils Diewald | 4af3f0b | 2014-06-25 01:43:17 +0000 | [diff] [blame] | 88 | $(this).toggleClass('active'); |
| 89 | }); |
| 90 | |
Nils Diewald | 7cad840 | 2014-07-08 17:06:56 +0000 | [diff] [blame] | 91 | $("span.location").on("click", function () { |
| 92 | $("#sidebar").toggleClass('active'); |
| 93 | }); |
| 94 | |
Nils Diewald | 4af3f0b | 2014-06-25 01:43:17 +0000 | [diff] [blame] | 95 | % end |