Skip to content

Commit

Permalink
removing some powerset specific data from tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
KirinDave committed Apr 29, 2009
1 parent f34210d commit 974dfdf
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 157 deletions.
73 changes: 0 additions & 73 deletions etest/master_responder_test.erl
Original file line number Diff line number Diff line change
Expand Up @@ -40,77 +40,4 @@ k_does_details_right_test() ->
L1 = [{details, {struct, Details}}, {notdetails, "Fakeness"}],
[{<<"xle">>, {1,2,3,4}}, {<<"tags">>, [<<"one">>]}] = k(details, L1).

jsonifying_details_test() ->
BadTerm = [{<<"tags">>,[]},
{<<"boost_filesystem">>,{1,34,1,0}},
{<<"boost_program_options">>,{1,34,1,0}},
{<<"boost_regex">>,{1,34,1,0}},
{<<"dictionary_server_rpc">>,{0,0,2,3}},
{<<"rubygem_json">>,{1,1,0,9999}},
{<<"rubygem_powerset_nl">>,{1,2,23,1}},
{<<"rubygem_xle">>,{1,1,7,0}},
{<<"dictionary_server">>,{0,0,4,5}},
{<<"log4cpp">>,{0,3,5,5}},
{<<"onomasticon">>,{0,6,6,0}},
{<<"powerset_python_module_environment">>,{0,0,1,0}},
{<<"ps_semantics_rule_induction">>,{0,6,12,0}},
{<<"tokenizer">>,{0,0,6,12}},
{<<"xle_rpc">>,{0,3,4,38}},
{<<"lexicon_json_rpc_server">>,{0,6,2,0}},
{<<"libiconv">>,{1,11,0}},
{<<"pargram_english">>,{1,7,1,0}},
{<<"ps_semantics_base">>,{0,6,12,0}},
{<<"queryreform">>,{0,2,30,0}},
{<<"rubygem_gem_plugin">>,{0,2,2,9999}},
{<<"rubygem_tokenizer">>,{0,0,8,19}},
{<<"rubygem_xle_thrift_responder">>,{0,2,3,0}},
{<<"boost">>,{1,34,1,0}},
{<<"cxx">>,{0,2,4,44}},
{<<"libevent">>,{1,3,2}},
{<<"rubygem_rspec">>,{0,9,3,9999}},
{<<"rubygem_thrift">>,{0,0,1,0}},
{<<"powerset_rubygems">>,{0,9,2,9999}},
{<<"prolog_lexicon_client">>,{0,1,19,0}},
{<<"rubygem_activerecord">>,{1,15,3,9999}},
{<<"rubygem_daemons">>,{1,0,8,9999}},
{<<"rubygem_fastthread">>,{1,0,1,9999}},
{<<"sicstus">>,{3,12,7,0}},
{<<"boost_thread">>,{1,34,1,0}},
{<<"dictionary_loader">>,{0,0,2,3}},
{<<"log4cpp-devel">>,{0,3,5,5}},
{<<"rubygem_facets">>,{1,8,54,9999}},
{<<"server_base">>,{0,2,0,67}},
{<<"xle">>,{2,3,2,0}},
{<<"boost-devel">>,{1,34,1,0}},
{<<"dictionary_db">>,{0,0,0,0}},
{<<"powerset_ruby_bdb">>,{0,6,0,9999}},
{<<"ps_semantics_nl_match">>,{0,1,3,0}},
{<<"rubygem_json_rpc_service">>,{0,5,4,0}},
{<<"rubygem_lexicon">>,{0,6,14,0}},
{<<"rubygem_libxml_ruby">>,{0,3,8,9999}},
{<<"thrift">>,{1,2,0,26}},
{<<"c_fsm">>,{2,10,1,0}},
{<<"rubygem_rake">>,{0,7,3,9999}},
{<<"lexicon_db">>,{0,6,7,0}},
{<<"rubygem_activesupport">>,{1,4,4,9999}},
{<<"rubygem_cgi_multipart_eof_fix">>,{2,1,9999}},
{<<"rubygem_mongrel">>,{1,0,1,9999}},
{<<"scribe_rpc">>,{0,0,5,4}},
{<<"tbb">>,{2,0,0,5}},
{<<"boost_iostreams">>,{1,34,1,0}},
{<<"powerset_environment">>,{0,1,5,0}},
{<<"powerset_ruby">>,{1,8,5,9999}},
{<<"ps_semantics">>,{0,6,12,0}},
{<<"ps_semantics_procedural_attachments">>,{0,1,8,0}},
{<<"ps_semantics_semxml">>,{0,1,3,0}},
{<<"rubygem_unicodechars">>,{0,0,2,9999}},
{<<"xleenv">>,{0,0,11,0}},
{<<"nl_runtime_stack">>,{1,7,6,22}},
{<<"grammar">>,<<"query">>}],
jsonify_full_details_list(BadTerm),
Details = [{<<"bears">>, {1,2,3,4}}, {<<"beats">>, <<"funky">>}, {<<"tags">>, [<<"one">>]}],
{struct, [{"bears","1.2.3-4"},
{"beats","funky"},
{"tags",{array, ["one"]}}]} = jsonify_full_details_list(Details).


19 changes: 0 additions & 19 deletions etest/node_api_test.erl
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,3 @@ nested_struct_array_conversion_test() ->
{restrict_to_url, {struct, [{key, <<"Test me!">>}]}}]}}],
V2 = prepare_parameters(V1).

realistic_parameter_test() ->
V1 = [{options,{struct,[{sem_laxer_pseudo_coefficient,"9"},
{sem_loose_default_role_coeff,"1.0"},
{sem_semor_expand_hierarchy,"0.5"},
{title_redirect_score,"0.0"},
{kw_max_keyphrase_length,"5"},
{kw_keyphrase_full_query,"true"},
{kw_pseudo_stopword_relative_weight,"0.7"}]}},
{passage,"Why doesn't this work?"}],
V2 = [{options,{struct,[{sem_laxer_pseudo_coefficient,<<"9">>},
{sem_loose_default_role_coeff,<<"1.0">>},
{sem_semor_expand_hierarchy,<<"0.5">>},
{title_redirect_score,<<"0.0">>},
{kw_max_keyphrase_length,<<"5">>},
{kw_keyphrase_full_query,<<"true">>},
{kw_pseudo_stopword_relative_weight,<<"0.7">>}]}},
{passage,<<"Why doesn't this work?">>}],
V2 = prepare_parameters(V1).

66 changes: 1 addition & 65 deletions etest/scoring_test.erl
Original file line number Diff line number Diff line change
Expand Up @@ -30,70 +30,6 @@ score_details_should_return_minus_1000_for_non_match_test() ->
D2 = [{<<"alpha">>, <<"3.2.1">>}],
-1000 = score_details(D1, D2).

score_details_real_world_test() ->
Partial1 = [{<<"kind">>,<<"xle">>},{<<"grammar">>,<<"query">>}, {<<"roles">>, [<<"production">>]}],
Partial2 = [{<<"kind">>,<<"xle">>},{<<"grammar">>,<<"query">>}],
Complete = [{<<"tags">>,[]},
{<<"rubygem_powerset_nl">>,{1,3,0,0}},
{<<"rubygem_xle">>,{1,1,8,0}},
{<<"rubygem_json">>,{1,1,0,9999}},
{<<"pargram_english">>,{1,10,3,0}},
{<<"powerset_rubygems">>,{0,9,2,9999}},
{<<"xle">>,{2,3,8,0}},
{<<"rubygem_json_rpc_client">>,{0,1,6,0}},
{<<"name_tagger">>,{0,10,6,0}},
{<<"powerset_ruby">>,{1,8,5,9999}},
{<<"powerset_environment">>,{0,1,5,0}},
{<<"xle_rpc">>,{0,3,4,32}},
{<<"rubygem_thrift">>,{0,0,1,0}},
{<<"thrift">>,{1,2,6,31}},
{<<"onomasticon">>,{0,10,2,89}},
{<<"c_fsm">>,{2,10,1,0}},
{<<"lexicon_json_rpc_server">>,{0,10,4,0}},
{<<"rubygem_json_rpc_server">>,{0,10,1,0}},
{<<"rubygem_lexicon">>,{0,10,7,0}},
{<<"lexicon_db">>,{0,10,1,0}},
{<<"rubygem_mongrel">>,{1,0,1,9999}},
{<<"rubygem_unicodechars">>,{0,0,2,9999}},
{<<"queryreform">>,{0,2,33,0}},
{<<"dictionary_server_rpc">>,{0,0,2,4}},
{<<"rubygem_tokenizer">>,{0,0,8,18}},
{<<"rubygem_xle_thrift_responder">>,{0,2,3,0}},
{<<"rubygem_fastthread">>,{1,0,1,9999}},
{<<"xleenv">>,{0,0,11,0}},
{<<"prolog_lexicon_client">>,{0,1,22,0}},
{<<"sicstus">>,{3,12,7,0}},
{<<"zlib">>,{1,2,3,0}},
{<<"tk">>,{8,4,14,0}},
{<<"libiconv">>,{1,11,4}},
{<<"tcl">>,{8,4,14,0}},
{<<"rubygem_rspec">>,{1,0,8,9999}},
{<<"rubygem_hapnis">>,{0,10,0,0}},
{<<"rubygem_alias">>,{0,10,0,0}},
{<<"powerset_ruby_bdb">>,{0,6,0,9999}},
{<<"rubygem_libxml_ruby">>,{0,3,8,9999}},
{<<"rubygem_sores">>,{0,10,2,0}},
{<<"rubygem_unidecode">>,{1,0,0,9999}},
{<<"ps_semantics">>,{0,8,2,0}},
{<<"db4">>,{4,3,29,0}},
{<<"ps_semantics_rule_induction">>,{0,8,2,0}},
{<<"ps_semantics_base">>,{0,8,2,0}},
{<<"tadm">>,{0,9,8,6}},
{<<"powerset_python_module_environment">>,{0,0,1,0}},
{<<"fst_tag_jsonrpc">>,{0,1,1,0}},
{<<"python_jsonrpc_client">>,{1,0,2,0}},
{<<"python_jsonrpc_server">>,{0,0,6,0}},
{<<"py_fsm">>,{0,1,0,0}},
{<<"roles">>,[<<"production">>]},
{<<"kind">>,<<"xle">>},
{<<"grammar">>,<<"query">>}],
3 = score_details(Partial1, Partial1),
3 = score_details(Partial1, Complete),
0 > score_details(Partial2, Complete).



% extract

extract_should_extract_single_tag_list_test() ->
Tag = extract(<<"tags">>, [{<<"tags">>, [<<"foobar">>]}]),
Expand Down Expand Up @@ -135,4 +71,4 @@ tag_bonus_score_should_give_one_point_for_each_match_test() ->
0 = tag_bonus_score(D4, D1),
1 = tag_bonus_score(D3, D1),
2 = tag_bonus_score(D2, D1),
3 = tag_bonus_score(D1, D1).
3 = tag_bonus_score(D1, D1).

0 comments on commit 974dfdf

Please sign in to comment.