private Item instantiateWordAlternativesItem(String field, String key, Inspector value) {
        HashMap<Integer, Inspector> children = childMap(value);
        Preconditions.checkArgument(!children.isEmpty(), "Expected 1 or more arguments, got none");
        Preconditions.checkArgument(children.get(0).type() == OBJECT,
                                    "Expected OBJECT, got %s.", children.get(0).type());

        List<WordAlternativesItem.Alternative> terms = new ArrayList<>();

        children.get(0).traverse((ObjectTraverser) (keys, values) -> {
            terms.add(new WordAlternativesItem.Alternative(keys, values.asDouble()));
        });
        return leafStyleSettings(getAnnotations(value), new WordAlternativesItem(field, Boolean.TRUE, null, terms));
    }
Translates a list of grouping requests on JSON form to a list in the grouping language form
container-search/src/main/java/com/yahoo/search/query/SelectParser.java