`grouped=true` queries do not return in features
stargazing-dino opened this issue · 0 comments
Hello !
From here it says that you can pass a grouped=true
parameter to the api request to get the results in the form
> Features
> Edges
rather than
> Edges
and that works for a request like
but not for a query like:
/query?node=/c/en/house&grouped=true
my reasoning as to why
It probably comes down to here
conceptnet5/web/conceptnet_web/api.py
Line 74 in 541d4a1
where this route calls query_paginated
which then calls FINDER.query
here:
conceptnet5/conceptnet5/api.py
Line 244 in 541d4a1
The reason I think this is because FINDER.query
has the argument of a single string term
argument whereas FINDER.lookup_grouped_by_feature
works on a query string that's parsed.
I think it would make sense though to allow lookup_grouped_by_feature
to work on a query rather than a single term. This would allow it to be used in most places where grouping is wanted.
I might be missing important a lot of things though so please let me know