Dictionary Data Structure

R

ravi

I want to implement a dictionary data structure with the features
features
* autocorrect
* autocomplete
* spellcheck

can any body tell me that which data structure will be best for its
implementation in C/C++

Thanx in adv.
 
I

Ian Collins

ravi said:
I want to implement a dictionary data structure with the features
features
* autocorrect
* autocomplete
* spellcheck

can any body tell me that which data structure will be best for its
implementation in C/C++
Which language are you using? The answer will be different for each.
 
M

Malcolm McLean

Ian Collins said:
Which language are you using? The answer will be different for each.
No it won't. Algorithms are independent of the language they are implemented
in. Making the post strictly non-topical, though I think we are maybe being
too strict in rejecting all algorthmic questions.

Autocomplete implies a tree structure. Autocorrect is a lot more difficult
because you need an intelligent matching function. Spellcheck is implied by
autocomplete.
New words will be added by the user relatively infrequently. It seems to me
we are looking at a alphabetically ordered flat array for autocomplete /
spell check. Intelligent spelling correction I don't know. Presumably you
use a Needleman-Wunch algorithm to get the best match, though how to filter
efficiently before calling it I don't know.
 
M

mani

ravi said:
I want to implement a dictionary data structure with the features
features
* autocorrect
* autocomplete
* spellcheck

can any body tell me that which data structure will be best for its
implementation in C/C++

Thanx in adv.

ternary search tree is the best
 
I

Ian Collins

Malcolm said:
No it won't. Algorithms are independent of the language they are
implemented in. Making the post strictly non-topical, though I think we
are maybe being too strict in rejecting all algorthmic questions.
Yes it will, the OP asked which *data structure* would be best.
 
R

Richard Heathfield

Sensei said:
Technically the answer is perfect... Like 'excuse me, do you know what
time is it?', answer 'yes'.

Indeed. Nevertheless, it confirms that Sturgeon was an optimist when it
comes to gmail-based posters. What "ravi" has missed is that the best C
answer is different to the best C++ answer.
 
C

Coos Haak

Op Sat, 18 Aug 2007 06:08:27 -0700 schreef ravi:
Can you tell me how ?

You're using gmail, is this not a part of Google?
Look it up: 'ternary trees' gives 681.000 hits when I try!
 
S

SM Ryan

# > > I want to implement a dictionary data structure with the features
# > > features
# > > * autocorrect
# > > * autocomplete
# > > * spellcheck

# > Which language are you using? The answer will be different for each.

Which platform? I believe Mac OS 10 provides all this with a few
Objective-C calls.
 
R

ravi

# > > I want to implement a dictionary data structure with the features
# > > features
# > > * autocorrect
# > > * autocomplete
# > > * spellcheck

# > Which language are you using? The answer will be different for each.

Which platform? I believe Mac OS 10 provides all this with a few
Objective-C calls.

No, I am using Windows XP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top