null+****@clear*****
null+****@clear*****
2011年 5月 6日 (金) 14:00:23 JST
Kouhei Sutou 2011-05-06 05:00:23 +0000 (Fri, 06 May 2011)
New Revision: 4e9edac8dce2780651b8dcab39e6e5f4720629a6
Log:
use groonga-suggest-create-dataset.
Removed files:
examples/dictionary/ddl.grn
Modified files:
examples/dictionary/edict/edict2grn.rb
examples/dictionary/eijiro/eijiro2grn.rb
examples/dictionary/gene95/gene2grn.rb
examples/dictionary/html/js/dictionary.js
examples/dictionary/init_db.sh
Deleted: examples/dictionary/ddl.grn (+0 -32) 100644
===================================================================
--- examples/dictionary/ddl.grn 2011-05-06 03:36:15 +0000 (f930e3d)
+++ /dev/null
@@ -1,32 +0,0 @@
-register suggest/suggest
-
-table_create item TABLE_PAT_KEY ShortText
-table_create bigram TABLE_PAT_KEY|KEY_NORMALIZE ShortText --default_tokenizer TokenBigram
-table_create kana TABLE_PAT_KEY|KEY_NORMALIZE ShortText
-column_create bigram item_key COLUMN_INDEX|WITH_POSITION item _key
-column_create item norm COLUMN_SCALAR item
-column_create item item_norm COLUMN_INDEX item norm
-column_create item kana COLUMN_VECTOR kana
-column_create kana item_kana COLUMN_INDEX item kana
-column_create item freq COLUMN_SCALAR Int32
-column_create item last COLUMN_SCALAR Time
-column_create item boost COLUMN_SCALAR Int32
-column_create item freq2 COLUMN_SCALAR Int32
-column_create item buzz COLUMN_SCALAR Int32
-
-table_create pair TABLE_HASH_KEY UInt64
-column_create pair pre COLUMN_SCALAR item
-column_create pair post COLUMN_SCALAR item
-column_create pair freq0 COLUMN_SCALAR Int32
-column_create pair freq1 COLUMN_SCALAR Int32
-column_create pair freq2 COLUMN_SCALAR Int32
-column_create item co COLUMN_INDEX pair pre
-
-table_create event_type TABLE_HASH_KEY ShortText
-table_create sequence TABLE_HASH_KEY ShortText
-table_create event TABLE_NO_KEY
-column_create sequence events COLUMN_VECTOR|RING_BUFFER event
-column_create event type COLUMN_SCALAR event_type
-column_create event time COLUMN_SCALAR Time
-column_create event item COLUMN_SCALAR item
-column_create event sequence COLUMN_SCALAR sequence
Modified: examples/dictionary/edict/edict2grn.rb (+3 -3)
===================================================================
--- examples/dictionary/edict/edict2grn.rb 2011-05-06 03:36:15 +0000 (9f2aad6)
+++ examples/dictionary/edict/edict2grn.rb 2011-05-06 05:00:23 +0000 (79e0713)
@@ -32,9 +32,9 @@ class Array
end
puts <<END
-column_create item edict_desc COLUMN_SCALAR ShortText
-column_create bigram item_edict_desc COLUMN_INDEX|WITH_POSITION item edict_desc
-load --table item
+column_create item_dictionary edict_desc COLUMN_SCALAR ShortText
+column_create bigram item_dictionary_edict_desc COLUMN_INDEX|WITH_POSITION item_dictionary edict_desc
+load --table item_dictionary
[["_key","edict_desc"],
END
Modified: examples/dictionary/eijiro/eijiro2grn.rb (+9 -9)
===================================================================
--- examples/dictionary/eijiro/eijiro2grn.rb 2011-05-06 03:36:15 +0000 (5ad3855)
+++ examples/dictionary/eijiro/eijiro2grn.rb 2011-05-06 05:00:23 +0000 (e72f8d2)
@@ -33,15 +33,15 @@ class Array
end
puts <<END
-column_create item eijiro_trans COLUMN_SCALAR ShortText
-column_create item eijiro_exp COLUMN_SCALAR ShortText
-column_create item eijiro_level COLUMN_SCALAR Int32
-column_create item eijiro_memory COLUMN_SCALAR Int32
-column_create item eijiro_modify COLUMN_SCALAR Int32
-column_create item eijiro_pron COLUMN_SCALAR ShortText
-column_create item eijiro_filelink COLUMN_SCALAR ShortText
-column_create bigram item_eijiro_trans COLUMN_INDEX|WITH_POSITION item eijiro_trans
-load --table item
+column_create item_dictionary eijiro_trans COLUMN_SCALAR ShortText
+column_create item_dictionary eijiro_exp COLUMN_SCALAR ShortText
+column_create item_dictionary eijiro_level COLUMN_SCALAR Int32
+column_create item_dictionary eijiro_memory COLUMN_SCALAR Int32
+column_create item_dictionary eijiro_modify COLUMN_SCALAR Int32
+column_create item_dictionary eijiro_pron COLUMN_SCALAR ShortText
+column_create item_dictionary eijiro_filelink COLUMN_SCALAR ShortText
+column_create bigram item_dictionary_eijiro_trans COLUMN_INDEX|WITH_POSITION item_dictionary eijiro_trans
+load --table item_dictionary
[["_key","norm","eijiro_trans","eijiro_exp","eijiro_level","eijiro_memory","eijiro_modify","eijiro_pron","eijiro_filelink","kana"],
END
Modified: examples/dictionary/gene95/gene2grn.rb (+3 -3)
===================================================================
--- examples/dictionary/gene95/gene2grn.rb 2011-05-06 03:36:15 +0000 (4a4c65d)
+++ examples/dictionary/gene95/gene2grn.rb 2011-05-06 05:00:23 +0000 (f7741ad)
@@ -32,9 +32,9 @@ class Array
end
puts <<END
-column_create item gene95_desc COLUMN_SCALAR ShortText
-column_create bigram item_gene95_desc COLUMN_INDEX|WITH_POSITION item gene95_desc
-load --table item
+column_create item_dictionary gene95_desc COLUMN_SCALAR ShortText
+column_create bigram item_dictionary_gene95_desc COLUMN_INDEX|WITH_POSITION item_dictionary gene95_desc
+load --table item_dictionary
[["_key","gene95_desc"],
END
Modified: examples/dictionary/html/js/dictionary.js (+1 -1)
===================================================================
--- examples/dictionary/html/js/dictionary.js 2011-05-06 03:36:15 +0000 (d79b09f)
+++ examples/dictionary/html/js/dictionary.js 2011-05-06 05:00:23 +0000 (965acb2)
@@ -9,7 +9,7 @@
$.getJSON(source+"?callback=?",
{query: q,
types: 'complete',
- table: 'item',
+ table: 'item_dictionary',
column: 'kana',
limit: 25,
output_columns: columns},
Modified: examples/dictionary/init_db.sh (+1 -1)
===================================================================
--- examples/dictionary/init_db.sh 2011-05-06 03:36:15 +0000 (16fab6c)
+++ examples/dictionary/init_db.sh 2011-05-06 05:00:23 +0000 (351d90e)
@@ -5,6 +5,6 @@ if [ 1 != $# ]; then
exit 1
fi
-if groonga --file ddl.grn -n $1 > /dev/null; then
+if groonga-suggest-create-dataset $1 dictionary > /dev/null; then
echo "db initialized."
fi