{"title":"Efficient Algorithms for Context Query Evaluation over a Tagged Corpus","authors":"Jérémy Félix Barbay, A. López-Ortiz","doi":"10.1109/SCCC.2009.16","DOIUrl":null,"url":null,"abstract":"We present an optimal adaptive algorithm for context queries in tagged content. The queries consist of locating instances of a tag within a context specified by the query using patterns with preorder, ancestor-descendant and proximity operators in the document tree implied by the tagged content. The time taken to resolve a query $Q$ on a document tree $T$ is logarithmic in the size of $T$, proportional to the size of $Q$, and to the difficulty of the combination of $Q$ with $T$, as measured by the minimal size of a certificate of the answer. The performance of the algorithm is no worse than the classical worst-case optimal, while provably better on simpler queries and corpora. More formally, the algorithm runs in time $\\bigo(\\difficulty\\nbkeywords\\lg(\\nbobjects/\\difficulty\\nbkeywords))$ in the standard RAM model and in time $\\bigo(\\difficulty\\nbkeywords\\lg\\lg\\min(\\nbobjects,\\nblabels))$ in the $\\Theta(\\lg(\\nbobjects))$-word RAM model, where $\\nbkeywords$ is the number of edges in the query, $\\difficulty$ is the minimum number of operations required to certify the answer to the query, $\\nbobjects$ is the number of nodes in the tree, and $\\nblabels$ is the number of labels indexed.","PeriodicalId":398661,"journal":{"name":"2009 International Conference of the Chilean Computer Science Society","volume":"1 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2009-11-10","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"2","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2009 International Conference of the Chilean Computer Science Society","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/SCCC.2009.16","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 2
Abstract
We present an optimal adaptive algorithm for context queries in tagged content. The queries consist of locating instances of a tag within a context specified by the query using patterns with preorder, ancestor-descendant and proximity operators in the document tree implied by the tagged content. The time taken to resolve a query $Q$ on a document tree $T$ is logarithmic in the size of $T$, proportional to the size of $Q$, and to the difficulty of the combination of $Q$ with $T$, as measured by the minimal size of a certificate of the answer. The performance of the algorithm is no worse than the classical worst-case optimal, while provably better on simpler queries and corpora. More formally, the algorithm runs in time $\bigo(\difficulty\nbkeywords\lg(\nbobjects/\difficulty\nbkeywords))$ in the standard RAM model and in time $\bigo(\difficulty\nbkeywords\lg\lg\min(\nbobjects,\nblabels))$ in the $\Theta(\lg(\nbobjects))$-word RAM model, where $\nbkeywords$ is the number of edges in the query, $\difficulty$ is the minimum number of operations required to certify the answer to the query, $\nbobjects$ is the number of nodes in the tree, and $\nblabels$ is the number of labels indexed.