Skip to content

Commit

Permalink
table_tokenize: fix English
Browse files Browse the repository at this point in the history
    estimate _size ->
    estimated_size
            +
  • Loading branch information
kou committed Apr 3, 2016
1 parent 43e783e commit 6a0b9dc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
14 changes: 7 additions & 7 deletions lib/proc/proc_tokenize.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,13 @@ static void
output_tokens(grn_ctx *ctx, grn_obj *tokens, grn_obj *lexicon, grn_obj *index_column)
{
int i, n_tokens, n_elements;
grn_obj estimate_size;
grn_obj estimated_size;

n_tokens = GRN_BULK_VSIZE(tokens) / sizeof(tokenize_token);
n_elements = 3;
if (index_column) {
n_elements++;
GRN_UINT32_INIT(&estimate_size, 0);
GRN_UINT32_INIT(&estimated_size, 0);
}

grn_ctx_output_array_open(ctx, "TOKENS", n_tokens);
Expand All @@ -103,17 +103,17 @@ output_tokens(grn_ctx *ctx, grn_obj *tokens, grn_obj *lexicon, grn_obj *index_co
grn_ctx_output_bool(ctx, token->force_prefix);

if (index_column) {
GRN_BULK_REWIND(&estimate_size);
grn_obj_get_value(ctx, index_column, token->id, &estimate_size);
grn_ctx_output_cstr(ctx, "estimate_size");
grn_ctx_output_int64(ctx, GRN_UINT32_VALUE(&estimate_size));
GRN_BULK_REWIND(&estimated_size);
grn_obj_get_value(ctx, index_column, token->id, &estimated_size);
grn_ctx_output_cstr(ctx, "estimated_size");
grn_ctx_output_int64(ctx, GRN_UINT32_VALUE(&estimated_size));
}

grn_ctx_output_map_close(ctx);
}

if (index_column) {
GRN_OBJ_FIN(ctx, &estimate_size);
GRN_OBJ_FIN(ctx, &estimated_size);
}

grn_ctx_output_array_close(ctx);
Expand Down
10 changes: 5 additions & 5 deletions test/command/suite/table_tokenize/index_column.expected
Original file line number Diff line number Diff line change
Expand Up @@ -25,31 +25,31 @@ table_tokenize Terms "a ruby bindings of Groonga" --mode GET --index_column inde
"value": "a",
"position": 0,
"force_prefix": false,
"estimate_size": 5
"estimated_size": 5
},
{
"value": "ruby",
"position": 1,
"force_prefix": false,
"estimate_size": 1
"estimated_size": 1
},
{
"value": "bindings",
"position": 2,
"force_prefix": false,
"estimate_size": 1
"estimated_size": 1
},
{
"value": "of",
"position": 3,
"force_prefix": false,
"estimate_size": 1
"estimated_size": 1
},
{
"value": "groonga",
"position": 4,
"force_prefix": false,
"estimate_size": 5
"estimated_size": 5
}
]
]

0 comments on commit 6a0b9dc

Please sign in to comment.