yohei #7091(2008/08/10 07:58 GMT) [ Prolog ] Rating0/0=0.00
1 2 3 4 5 6 7 8 9 10
:- use_module(library('http/http_open')). assert_word(_, '') :- !. assert_word(In, W) :- downcase_atom(W, WL), line_count(In, N), assert(index(WL, N)). make_index(In, W) :- at_end_of_stream(In), assert_word(In, W), !. make_index(In, W) :- peek_char(In, C), (char_type(C, csym) -> atom_concat(W, C, W1); assert_word(In, W), W1 = ''), get_char(In, _), make_index(In, W1). :- http_open('http://www.gnu.org/licenses/gpl.txt', In, []), make_index(In, ''), close(In).
Rating0/0=0.00-0+
[ reply ]
yohei
#7091()
[
Prolog
]
Rating0/0=0.00
?- index('future', N).
N = 58 ;
N = 579.
:- use_module(library('http/http_open')). assert_word(_, '') :- !. assert_word(In, W) :- downcase_atom(W, WL), line_count(In, N), assert(index(WL, N)). make_index(In, W) :- at_end_of_stream(In), assert_word(In, W), !. make_index(In, W) :- peek_char(In, C), (char_type(C, csym) -> atom_concat(W, C, W1); assert_word(In, W), W1 = ''), get_char(In, _), make_index(In, W1). :- http_open('http://www.gnu.org/licenses/gpl.txt', In, []), make_index(In, ''), close(In).Rating0/0=0.00-0+
[ reply ]