473,322 Members | 1,719 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Build a dictionary...

Hi,
I need your help to build a dictionary on mysal database to have an
efficient keyword search engine.

Thanks :-)

Djam
Jul 23 '05 #1
1 1899
Djam wrote:
I need your help to build a dictionary on mysal database to have an
efficient keyword search engine.


Do you mean dictionary which
1) explain what each word mean or
2) dictionary which translates word from one language to another ?

# 1):
create table dictionary( word varchar(255), description text );
create index dictionary_index on dictionary( word(10) );

# 2):
create table dictionary( word varchar(255), word2 varchar(255) );
create index dictionary_index on dictionary( word(10) );
create index dictionary_index2 on dictionary( word2(10) );

You can increase the number 10 with the cost of disk space and advantage
of getting faster queries, if you got many words that have 10 first
characters the same.

When searching for given word, for example 'car', search with
select * from dictionary where word like 'car%';

Also, it might be smart not to commit search if only 1 or 2 characters
are inputted, depending on the size of your table (because the amount of
matches might be huge).
Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: none | last post by:
or is it just me? I am having a problem with using a dictionary as an attribute of a class. This happens in python 1.5.2 and 2.2.2 which I am accessing through pythonwin builds 150 and 148...
1
by: john wright | last post by:
I have a dictionary oject I created and I want to bind a listbox to it. I am including the code for the dictionary object. Here is the error I am getting: "System.Exception: Complex...
16
by: Podi | last post by:
How to do this in C#? I want to have a lookup table (hash) of city by zip code (integer) or phone number (string), and it would look something like x = book; // x == "Fremont" x = book; // x...
4
dshimer
by: dshimer | last post by:
I have a file whose structure in strictly generic terms is similar to the following.keyname first keyword1 1.1 keyword2 1.2 keyword3 1.3 keyname second keyword1 2.1 keyword2 2.2 keyword3 2.3...
1
by: hermesbaby | last post by:
I have a CSV-File which I convert to an array like this: , , , , , ]
2
by: Priyasal | last post by:
Hi, I want to build a dictionary for tokens in VB.Net.How can i create the dictionary to have all those tokens?
11
by: MonkeeSage | last post by:
A quick question about how python parses a file into compiled bytecode. Does it parse the whole file into AST first and then compile the AST, or does it build and compile the AST on the fly as it...
3
by: wanzathe | last post by:
hi everyone i'm a newbie to python :) i have a binary file named test.dat including 9600000 records. the record format is int a + int b + int c + int d i want to build a dict like this: key=int...
1
by: sachin2 | last post by:
I am using 3 types of dictionaries. 1) Dictionary<string, string > d = new Dictionary<string, string>(); 2) Dictionary<string, List<string>> d = new Dictionary<string, List<string>>(); 3)...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.