Coffeehouse Thread

17 posts

Dictionary app , need your help

Back to Forum: Coffeehouse
  • User profile image
    arundua

    Hi , 

    I have gone through your tutorials and they are very helpful , thanks a lot . Based on that I have set target of  building dictionary app , but I need your help . I have built the complete gui added the required functionality  but I don't know how to proceed for storing the words for faster access to the words. Should I include the words in the database or in the code for faster access or anything else can be done .Please help , this is my first app.

     

    Arun Dua

    arundua20@live.in

  • User profile image
    MasterPi

    Are these your words or do they belong to a third party? Also, are you building a Windows Store app? You can't talk to a database directly in a Windows Store app and you don't store data in code.

  • User profile image
    Harlequin
  • User profile image
    MasterPi

    @Harlequin: You can, but AFAIK the intent of SQLite was for smaller sets of data like settings or player data.

  • User profile image
    kettch

    @MasterPie: SQLite should be fine for most local database needs in a WinRT app. For stuff like settings, you should actually be using WinRT's storage API's directly. Then you get the benefit of roaming settings.

  • User profile image
    vesuvius

    , MasterPie wrote

    Are these your words or do they belong to a third party?

    They belong to a party called homework/assignment

  • User profile image
    MasterPi

    @kettch: I assumed he was actually creating a real dictionary app that surfaces a real wordlist, which seems bit too heavy for SQLite.

    @vesuvius: I was actually referring to the word set he's using for the app. But then, your reply probably still applies. Sad

  • User profile image
    kettch

    @MasterPie: On their website, SQLite makes some tall claims about the load capabilities of their product. If anything, I would think that SQLite would be too heavy for a simple word list. You'd want to use something that supported simple key/value lookups.

  • User profile image
    MasterPi

    @kettch: Interesting...I've only ever seen it used for simple storage means. But yeah, a tab delimited word-def file would suffice. What I was really hinting at before was just using a web service because I'm sure several exist for dictionary word lookups.

  • User profile image
    kettch

    @MasterPie: Some kind of local cache would be necessary so that you don't have to require a connection for the app to function.

  • User profile image
    PopeDai

    , MasterPie wrote

    @kettch: Interesting...I've only ever seen it used for simple storage means. But yeah, a tab delimited word-def file would suffice. What I was really hinting at before was just using a web service because I'm sure several exist for dictionary word lookups.

    SQLite is popular because both iOS and Android come with SQLite built-in, and it's a fast lightweight DBMS - it reminds me of when everyone used Access 97-2003 MDB databases with the ADODB OleDB drivers. Given its ubiquity I don't see the point in using SQLCE.

    I haven't used SQLite for any heavy projects - mostly light data like a basic CRM, but I don't see why you can't use it for holding a dictionary-sized hundred-thousand entries. That would make it a few hundred megabytes, which is certainly fine because SQLite scales to several gigabytes without issue (assuming you use indexes!)

    SQLite is great for single-user applications or cases where a single user has an exclusive lock for a long time, so it isn't good for web applications.

  • User profile image
    eddwo

    A ~100,000 word dictionary shouldn't come in at much more than about 5MB even in an indexed database file. SQLite is perfectly fine for that, a lot simpler to work with than a text file, (no need to parse the whole thing up front and build your own hashtable, make use of the engines query capabilities etc), and nowadays the engine is built into or available for all the major platforms. Using a larger database engine would be overkill.

  • User profile image
    figuerres

    One thing that I thought was funny in this thread.

    no one ever asked the OP if he was making a real "Dictionary" or a spell check table.

    folks use the word "Dictionary" so often when they mean "a list of words to check spelling" I wonder if we even know that they are not the same thing.

    just figured I would point that out.

  • User profile image
    kettch

    @figuerres: He did say dictionary app, so I guess we assumed. Tongue Out

  • User profile image
    MasterPi

    @figuerres: Well yeah, he hasn't given any real details on what he's trying to accomplish. He hasn't bothered to reply either.

    @eddwo: Actually, yes...that's a good point. Wasn't thinking of the actual size.

  • User profile image
    PopeDai

    , eddwo wrote

    A ~100,000 word dictionary shouldn't come in at much more than about 5MB even in an indexed database file

    5MB over 100,000 words gives 52 bytes per word. Fine for a word-list, but a dictionary tends to carry the word, pronunciation key, definition, inflections, declensions, synonyms, and possibly an etymology - for that you're easily looking at at least a few hundred characters per entry.

    The OED, for example, has 600,000 words. 

  • User profile image
    figuerres

    , PopeDai wrote

    *snip*

    5MB over 100,000 words gives 52 bytes per word. Fine for a word-list, but a dictionary tends to carry the word, pronunciation key, definition, inflections, declensions, synonyms, and possibly an etymology - for that you're easily looking at at least a few hundred characters per entry.

    The OED, for example, has 600,000 words. 

    Ahh... Yeah I have the "compact" OED,  folks see it and then back away in fear Smiley big heavy blue volumes and tiny printing you read with a magnifying glass ...

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.