lib/sekka/henkan.nnd in sekka-1.0.0 vs lib/sekka/henkan.nnd in sekka-1.1.0.pre

- old
+ new

@@ -494,50 +494,11 @@ (k (first kv)) (v (second kv))) (set! user-keylist (cons k user-keylist)) (append-entry userid kvs k v))) sekka-jisyo-data)) - - (define (_create-ready-made-keylist keylist) - (receive (okuri-ari-hash - okuri-nashi-hash - hiragana-phrase-hash) - (create-2char-hash keylist) - - ;; OKURI-ARI - (for-each - (lambda (key) - (let1 fetched (kvs.get (+ userid "::" "(" (sekka-upcase key) ")") - (kvs.get (+ masterid "::" "(" (sekka-upcase key) ")") "")) - (kvs.put! (+ userid "::" "(" (sekka-upcase key) ")") - (string-join (uniq (sort (append (to-list (fetched.split #/[ ]+/)) - (hash-table-get okuri-ari-hash key)))) - " ")))) - (hash-table-keys okuri-ari-hash)) - - ;; OKURI-NASHI - (for-each - (lambda (key) - (let1 fetched (kvs.get (+ userid "::" "(" (sekka-downcase key) ")") - (kvs.get (+ masterid "::" "(" (sekka-downcase key) ")") "")) - (kvs.put! (+ userid "::" "(" (sekka-downcase key) ")") - (string-join (uniq (sort (append (to-list (fetched.split #/[ ]+/)) - (hash-table-get okuri-nashi-hash key)))) - " ")))) - (hash-table-keys okuri-nashi-hash)) - ;; HIRAGANA-PHRASE - (for-each - (lambda (key) - (let1 fetched (kvs.get (+ userid "::" "{" (sekka-downcase key) "}") - (kvs.get (+ masterid "::" "{" (sekka-downcase key) "}") "")) - (kvs.put! (+ userid "::" "{" (sekka-downcase key) "}") - (string-join (uniq (sort (append (to-list (fetched.split #/[ ]+/)) - (hash-table-get hiragana-phrase-hash key)))) - " ")))) - (hash-table-keys hiragana-phrase-hash)))) - ;; "ユーザー語彙を"(stored)"にpush!する" (define (kvs-push! userid kvs entry-str) (let* ((orig (kvs.get (+ userid "::(stored)") "()")) (orig (read-from-string orig))) (kvs.put! (+ userid "::(stored)") (write-to-string (append orig (list entry-str)))) @@ -555,10 +516,10 @@ (begin #?=(+ "Error user dict format error userid=[" userid "] tango=[" dict-line "]") #f) (begin (insert-to-db lst) - (_create-ready-made-keylist user-keylist) + (setup-trie-index userid kvs user-keylist #f) (kvs-push! userid kvs dict-line) #?=(+ "user dict stored userid=[" userid "] tango=[" dict-line "]") #t)))) (else #?=(+ "Error user dict format error userid=[" userid "] tango=[" dict-line "]")