{"action":"created","issue":{"url":"https://api.github.com/repos/INL/BlackLab/issues/12","labels_url":"https://api.github.com/repos/INL/BlackLab/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/INL/BlackLab/issues/12/comments","events_url":"https://api.github.com/repos/INL/BlackLab/issues/12/events","html_url":"https://github.com/INL/BlackLab/issues/12","id":94530732,"number":12,"title":"Having hierarchical views inside blacklab? ","user":{"login":"danyaljj","id":2441454,"avatar_url":"https://avatars.githubusercontent.com/u/2441454?v=3","gravatar_id":"","url":"https://api.github.com/users/danyaljj","html_url":"https://github.com/danyaljj","followers_url":"https://api.github.com/users/danyaljj/followers","following_url":"https://api.github.com/users/danyaljj/following{/other_user}","gists_url":"https://api.github.com/users/danyaljj/gists{/gist_id}","starred_url":"https://api.github.com/users/danyaljj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danyaljj/subscriptions","organizations_url":"https://api.github.com/users/danyaljj/orgs","repos_url":"https://api.github.com/users/danyaljj/repos","events_url":"https://api.github.com/users/danyaljj/events{/privacy}","received_events_url":"https://api.github.com/users/danyaljj/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-07-12T03:58:12Z","updated_at":"2015-08-03T11:57:30Z","closed_at":null,"body":"Is it possible to have hierarchical view for some of the views? \r\nWhy this is important? Suppose you have the following two views: \r\n1) A row text view \r\n2) A POS tag view\r\n3) A taxonomy view: a tree structured view of words and how words are hierarchically connected to each other. For example, one example hierarchy is: \r\n```\r\n=> respiratory disease => disease => illness => ill health => pathological state => physical condition => condition => state => attribute => abstraction => entity\r\n```\r\nThe question can I query for any NN (nouns) that is in the subcategory of `disease`?\r\n\r\nI suspect that faceted search of Lucene might helpful for this, if it is available inside BlackLab. \r\nhttps://chimpler.wordpress.com/2013/01/30/faceted-search-with-lucene/, http://stackoverflow.com/questions/14852995/tree-search-with-lucene \r\n\r\n@dirkgr : any idea?  (might as well be of your interest)\r\nFYI @cttsai "},"comment":{"url":"https://api.github.com/repos/INL/BlackLab/issues/comments/127209445","html_url":"https://github.com/INL/BlackLab/issues/12#issuecomment-127209445","issue_url":"https://api.github.com/repos/INL/BlackLab/issues/12","id":127209445,"user":{"login":"jan-niestadt","id":2195553,"avatar_url":"https://avatars.githubusercontent.com/u/2195553?v=3","gravatar_id":"","url":"https://api.github.com/users/jan-niestadt","html_url":"https://github.com/jan-niestadt","followers_url":"https://api.github.com/users/jan-niestadt/followers","following_url":"https://api.github.com/users/jan-niestadt/following{/other_user}","gists_url":"https://api.github.com/users/jan-niestadt/gists{/gist_id}","starred_url":"https://api.github.com/users/jan-niestadt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jan-niestadt/subscriptions","organizations_url":"https://api.github.com/users/jan-niestadt/orgs","repos_url":"https://api.github.com/users/jan-niestadt/repos","events_url":"https://api.github.com/users/jan-niestadt/events{/privacy}","received_events_url":"https://api.github.com/users/jan-niestadt/received_events","type":"User","site_admin":false},"created_at":"2015-08-03T11:57:30Z","updated_at":"2015-08-03T11:57:30Z","body":"Yes, that would work in principle. And the way you added multiple property values at one token position is correct.\r\n\r\nHowever, if you choose to split the ;-separated string and add them as separate values, right now only the first is saved in the forward index. So you'd either need to make it possible to store multiple values per token in the forward index, or you'd need to stick with the original ;-separated string as the property value.\r\n\r\nNote also that, if every dependency in your corpus gets a unique id, the terms index for the forward index will get very large (because all terms are unique).\r\n\r\nYou would need to add TextPattern and corresponding SpanQuery/Spans classes that \"follow a depency\", i.e. for the \"nsubj\" relation, produce all subject tokens pointed to by the input tokens. It would do this by querying the forward index for the attribute value, parsing it to find the \"nsubj\" relation id, then find tokens where depIn contains that relation id. This does mean an extra forward index query and an extra reverse index query for each input token, so it may be slow for large result sets."}}