Difference between revisions of "Knowledge-Aware-Search-AQL"
From Knoesis wiki
(→Annotation Query Language) |
|||
Line 1: | Line 1: | ||
=Annotation Query Language= | =Annotation Query Language= | ||
+ | '''create dictionary''' periodDeterminer '''as''' | ||
+ | ( | ||
+ | 'ago', 'prior', 'previous', | ||
+ | 'since', 'now', 'next', | ||
+ | 'last', 'later', | ||
+ | 'about', 'around', | ||
+ | 'before', 'after', | ||
+ | 'several','almost', | ||
+ | 'few', 'couple', | ||
+ | 'every','all' | ||
+ | ); | ||
+ | |||
+ | '''create dictionary''' Buprenorphine_dict '''as''' | ||
+ | ( | ||
+ | 'Buprel', 'Buprenex', | ||
+ | 'Buprenorphine', | ||
+ | 'Buprenorphine analgesic', | ||
+ | 'Buprenorphine opioid dependence', 'Probuphine', | ||
+ | 'Subbies', | ||
+ | 'Suboxone', 'Suboxone film', | ||
+ | 'Suboxone tablet', 'Subs', | ||
+ | 'Subutex', 'Temgesic', | ||
+ | 'film', 'films', 'strip', | ||
+ | 'strips', | ||
+ | 'sub', 'tecs', 'tex', | ||
+ | 'Zubsolv' | ||
+ | ); | ||
+ | |||
+ | '''create view''' Buprenorphine_view '''as''' | ||
+ | extract | ||
+ | dictionaries ''''Buprenorphine_dict'''' | ||
+ | on D.text as buprenorphine | ||
+ | from Document D; | ||
+ | |||
+ | '''create dictionary''' demonstrative_pronoun_dict '''as''' | ||
+ | ( | ||
+ | 'this', 'that', | ||
+ | 'these', 'those' | ||
+ | ); | ||
+ | |||
+ | '''create dictionary''' personal_pronoun_dict '''as''' | ||
+ | ( | ||
+ | 'i', 'me','you', | ||
+ | 'she','her', | ||
+ | 'he','him', | ||
+ | 'it', | ||
+ | 'we','us', | ||
+ | 'they','them' | ||
+ | ); | ||
+ | |||
+ | '''create dictionary''' possessive_pronoun_dict '''as''' | ||
+ | ( | ||
+ | 'my', 'your', | ||
+ | 'our', 'ours', 'your','yours', | ||
+ | 'his','her', 'hers', | ||
+ | 'its', | ||
+ | 'their','theirs', | ||
+ | 'mine' | ||
+ | ); | ||
+ | |||
+ | '''create dictionary''' reflexive_pronoun_dict '''as''' | ||
+ | ( | ||
+ | 'myself', 'ourselves', | ||
+ | 'yourself','yourselves', | ||
+ | 'himself','herself', | ||
+ | 'itself','themselves' | ||
+ | ); | ||
+ | |||
+ | '''create dictionary''' relative_pronoun_dict '''as''' | ||
+ | ( | ||
+ | 'that', 'which', 'who', 'whom', 'whose', | ||
+ | 'whichever', 'whoever', 'whomever' | ||
+ | ); | ||
+ | |||
+ | '''create dictionary''' interrogative_pronoun_dict '''as''' | ||
+ | ( | ||
+ | 'what', 'who', 'whom', 'which', 'whose' | ||
+ | ); | ||
+ | |||
+ | '''create dictionary''' indefinite_pronoun_dict '''as''' | ||
+ | ( | ||
+ | 'anybody', 'anyone','anything', | ||
+ | 'each','either', | ||
+ | 'everybody','everyone','everything', | ||
+ | 'neither','nobody','no one','nothing','one', | ||
+ | 'somebody','someone','something', | ||
+ | 'both','few','many','several', | ||
+ | 'all','any','most','none','some' | ||
+ | ); | ||
+ | |||
+ | '''create view''' Pronounview '''as''' | ||
+ | extract | ||
+ | dictionaries | ||
+ | ''''personal_pronoun_dict'''' and ''''relative_pronoun_dict'''' and | ||
+ | ''''demonstrative_pronoun_dict'''' and ''''indefinite_pronoun_dict'''' and | ||
+ | ''''reflexive_pronoun_dict'''' and ''''interrogative_pronoun_dict'''' and | ||
+ | ''''possessive_pronoun_dict'''' | ||
+ | on D.text as match | ||
+ | from Document D; |
Revision as of 20:59, 12 May 2013
Annotation Query Language
create dictionary periodDeterminer as ( 'ago', 'prior', 'previous', 'since', 'now', 'next', 'last', 'later', 'about', 'around', 'before', 'after', 'several','almost', 'few', 'couple', 'every','all' );
create dictionary Buprenorphine_dict as ( 'Buprel', 'Buprenex', 'Buprenorphine', 'Buprenorphine analgesic', 'Buprenorphine opioid dependence', 'Probuphine', 'Subbies', 'Suboxone', 'Suboxone film', 'Suboxone tablet', 'Subs', 'Subutex', 'Temgesic', 'film', 'films', 'strip', 'strips', 'sub', 'tecs', 'tex', 'Zubsolv' );
create view Buprenorphine_view as extract dictionaries 'Buprenorphine_dict' on D.text as buprenorphine from Document D;
create dictionary demonstrative_pronoun_dict as ( 'this', 'that', 'these', 'those' );
create dictionary personal_pronoun_dict as ( 'i', 'me','you', 'she','her', 'he','him', 'it', 'we','us', 'they','them' );
create dictionary possessive_pronoun_dict as ( 'my', 'your', 'our', 'ours', 'your','yours', 'his','her', 'hers', 'its', 'their','theirs', 'mine' );
create dictionary reflexive_pronoun_dict as ( 'myself', 'ourselves', 'yourself','yourselves', 'himself','herself', 'itself','themselves' );
create dictionary relative_pronoun_dict as ( 'that', 'which', 'who', 'whom', 'whose', 'whichever', 'whoever', 'whomever' );
create dictionary interrogative_pronoun_dict as ( 'what', 'who', 'whom', 'which', 'whose' );
create dictionary indefinite_pronoun_dict as ( 'anybody', 'anyone','anything', 'each','either', 'everybody','everyone','everything', 'neither','nobody','no one','nothing','one', 'somebody','someone','something', 'both','few','many','several', 'all','any','most','none','some' );
create view Pronounview as extract dictionaries 'personal_pronoun_dict' and 'relative_pronoun_dict' and 'demonstrative_pronoun_dict' and 'indefinite_pronoun_dict' and 'reflexive_pronoun_dict' and 'interrogative_pronoun_dict' and 'possessive_pronoun_dict' on D.text as match from Document D;