Classifies the word with some already-calculated BLOB_CHOICEs. The choices are an array of blob_count pointers to BLOB_CHOICE, providing a single classifier result for each blob. The BLOB_CHOICEs are consumed and the word takes ownership. The number of blobs in the box_word must match blob_count.
| 870 | // The BLOB_CHOICEs are consumed and the word takes ownership. |
| 871 | // The number of blobs in the box_word must match blob_count. |
| 872 | void WERD_RES::FakeClassifyWord(int blob_count, BLOB_CHOICE** choices) { |
| 873 | // Setup the WERD_RES. |
| 874 | ASSERT_HOST(box_word != NULL); |
| 875 | ASSERT_HOST(blob_count == box_word->length()); |
| 876 | ClearWordChoices(); |
| 877 | ClearRatings(); |
| 878 | ratings = new MATRIX(blob_count, 1); |
| 879 | for (int c = 0; c < blob_count; ++c) { |
| 880 | BLOB_CHOICE_LIST* choice_list = new BLOB_CHOICE_LIST; |
| 881 | BLOB_CHOICE_IT choice_it(choice_list); |
| 882 | choice_it.add_after_then_move(choices[c]); |
| 883 | ratings->put(c, c, choice_list); |
| 884 | } |
| 885 | FakeWordFromRatings(TOP_CHOICE_PERM); |
| 886 | reject_map.initialise(blob_count); |
| 887 | done = true; |
| 888 | } |
| 889 | |
| 890 | // Creates a WERD_CHOICE for the word using the top choices from the leading |
| 891 | // diagonal of the ratings matrix. |
no test coverage detected