Hiroyuki Komatsu
komat****@users*****
2004年 12月 18日 (土) 17:02:53 JST
Index: prime/lib/prime-japanese.rb diff -u prime/lib/prime-japanese.rb:1.9 prime/lib/prime-japanese.rb:1.10 --- prime/lib/prime-japanese.rb:1.9 Fri Dec 17 22:48:23 2004 +++ prime/lib/prime-japanese.rb Sat Dec 18 17:02:53 2004 @@ -1,5 +1,5 @@ # prime/prime-japnese.rb: Japanese module for PRIME. -# $Id: prime-japanese.rb,v 1.9 2004/12/17 13:48:23 komatsu Exp $ +# $Id: prime-japanese.rb,v 1.10 2004/12/18 08:02:53 komatsu Exp $ # # Copyright (C) 2004 Hiroyuki Komatsu <komat****@taiya*****> # All rights reserved. @@ -243,7 +243,7 @@ results = search_raw(string) rest = nil - clauses_list = process_clauses(string) + clauses_list = process_clauses(string, 1) clauses_list.each {|clauses| if clauses.length == 1 then ## FIXME: It's an adhoc routine. @@ -282,8 +282,8 @@ ## FIXME: 文節区切りが同じものは統合したい。 ## FIXME: <komat****@taiya*****> (2004-01-24) - def process_clauses (string) - (depth, clauses_list) = guess_clauses_internal(string) + def process_clauses (string, threshold = 4) + (depth, clauses_list) = guess_clauses_internal(string, 1, nil, threshold) processed_clauses_list = [] clauses_list.each {|clauses| if clauses.length <= depth then