Exemplo n.º 1
0
} END_TEST

START_TEST (test_can_get_clue_by_token_id) {
  ClueList *clues = new_clue_list();
  add_clue(clues, 1234, 0.95);
  Clue *clue = get_clue(clues, 1234);
  assert_not_null(clue);
  assert_equal(1234, clue->token_id);
  assert_equal_f(0.95, clue->probability);
  assert_equal_f(0.45, clue->strength);
} END_TEST
Exemplo n.º 2
0
} END_TEST

START_TEST (test_classify_item_sets_prob_to_the_return_value_of_the_classify_function) {
  double prob;
  classify_item(tagger, item, &prob);
  assert_equal_f(0.75, prob);
} END_TEST
Exemplo n.º 3
0
END_TEST

START_TEST (test_load_tagger_from_tag_definition_document_sets_bias) {
    Tagger *tagger = build_tagger(document, item_cache);
    assert_equal_f(1.2, tagger->bias);
}