- ctx->scores[i].grp = darray_item(ctx->grps, i);
- if (should_grp_score_len(ctx, ctx->scores[i].grp, str)) {
- tl_avec(ctx)->str = ctx->scores[i].grp->key;
- tl_bvec(ctx)->str = str;
- if (should_grp_score_cos(ctx, tl_avec(ctx), tl_bvec(ctx))) {
- ctx->scores[i].score = grp_score(ctx->scores[i].grp, str);
- } else {
- ctx->scores[i].score = 0;
+ struct strgrp_grp *grp = darray_item(ctx->grps, i);
+ ctx->scores[i].grp = grp;
+ ctx->scores[i].score = 0;
+ if (should_grp_score_len(ctx, grp, str)) {
+ if (should_grp_score_cos(ctx, grp, str)) {
+ ctx->scores[i].score = grp_score(grp, str);