#include "const.h"
#include "hyphen.h"
#include "tordvars.h"
#include "callcpp.h"
#include <math.h>
Go to the source code of this file.
void set_hyphen_word | ( | char * | word, | |
float | rating, | |||
int | state | |||
) |
If this hyphenated word choice is better than the last one then add it as the new word choice.
This string can be used on the next line to permute the other half of the word.
Definition at line 46 of file hyphen.cpp.
References cprintf(), display_ratings, hyphen_rating, hyphen_state, hyphen_string, strfree, and strsave.
Referenced by append_next_choice().
00046 { 00047 int char_index = strlen (word) - 1; 00048 00049 if (display_ratings) 00050 cprintf ("set hyphen word = %s\n", word); 00051 00052 if (hyphen_rating > rating && char_index > 0) { 00053 word[char_index] = '\0'; 00054 00055 if (hyphen_string) 00056 strfree(hyphen_string); 00057 hyphen_string = strsave (word); 00058 00059 hyphen_state = state; 00060 hyphen_rating = rating; 00061 00062 word[char_index] = '-'; 00063 } 00064 }
float hyphen_rating = MAXFLOAT |
int hyphen_state = 0 |
Used in hyphen.cpp & permdawg.cpp
Definition at line 35 of file hyphen.cpp.
Referenced by dawg_permute_and_select(), and set_hyphen_word().
char* hyphen_string = 0 |
Used in hyphen.cpp & permdawg.cpp
Definition at line 33 of file hyphen.cpp.
Referenced by dawg_permute_and_select(), permute_words(), and set_hyphen_word().
int last_word_on_line = 0 |
* (c) Copyright 1987, Hewlett-Packard Company. ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** http://www.apache.org/licenses/LICENSE-2.0 ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License.
Definition at line 32 of file hyphen.cpp.
Referenced by recog_word_recursive().