When displaying grouping results, corpus-frontend uses identity from the BLS response, not identityDisplay.
identity is not intended for display, just for unambiguously referring to this group.
Some examples where things don't quite work as we would like:
cws:pos:i: there is no token to take a value from (e.g. group on token before when hit is at start of doc). Currently displayed as '[unknown]'. Should probably be (no token) or something.
cws:pos:i:~: there was a token, but no value for this annotation. Currently displayed as ~. Should probably be (no value) or something. Example for the this and the previous item.
cws:pos:i:: value is the empty string. I don't have an example, but probably displayed as [unknown] as well? Should probably be displayed as (empty).
cws:pos:i:~~: probably displayed as ~~, but should be displayed as ~ (because single tilde means "no token", a tilde at index 0 is escaped this way)
when grouping by left:word:i (i.e. several words to the left of the hit), words are shown in reversed order, which is used for sorting/grouping, but is not how the user wants to see them. identityDisplay uses the correct order. Example
The business with ~ is quite obscure and eventually we should improve this in a BLS API revision. Same goes for grouping by multiple properties and how the individual property values cannot be easily extracted from the BLS response (See INL/BlackLab#439 about future API revision).
When displaying grouping results, corpus-frontend uses
identity
from the BLS response, notidentityDisplay
.identity
is not intended for display, just for unambiguously referring to this group.Some examples where things don't quite work as we would like:
cws:pos:i
: there is no token to take a value from (e.g. group on token before when hit is at start of doc). Currently displayed as '[unknown]'. Should probably be(no token)
or something.cws:pos:i:~
: there was a token, but no value for this annotation. Currently displayed as~
. Should probably be(no value)
or something. Example for the this and the previous item.cws:pos:i:
: value is the empty string. I don't have an example, but probably displayed as[unknown]
as well? Should probably be displayed as(empty)
.cws:pos:i:~~
: probably displayed as~~
, but should be displayed as~
(because single tilde means "no token", a tilde at index 0 is escaped this way)left:word:i
(i.e. several words to the left of the hit), words are shown in reversed order, which is used for sorting/grouping, but is not how the user wants to see them.identityDisplay
uses the correct order. ExampleThe business with
~
is quite obscure and eventually we should improve this in a BLS API revision. Same goes for grouping by multiple properties and how the individual property values cannot be easily extracted from the BLS response (See INL/BlackLab#439 about future API revision).(see also INL/BlackLab#315)