CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 12 of 12
  1. #1
    Join Date
    Mar 2009
    Location
    UK
    Posts
    5

    Predictive Text Programming

    Starting a project on Predictive Text For C++ using Microsoft Visual Studio.

    Never Used C++ before.

    From what I know, I should Create an Array or Database of Words which will then checked once certain letters have been inputted.

    How Should I start creating a Database?

    How should this datebase be Queried?

    A simple skeleton or an idea of a skeleton would be greatly appreciated.

    Thanks

    Roushy.

  2. #2
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    Re: Predictive Text Programming

    There's more to it than that. You also need to know which words are most likely. For example, entering AB will result in a lot of dictionary hits. Only a few of them will be likely given the context and what the use typically types.

    I'd work on the algorithms before worrying about the database or even trying to do any coding.

  3. #3
    Join Date
    Mar 2009
    Location
    UK
    Posts
    5

    Re: Predictive Text Programming

    All that is needed for now is a simple skeleton of the beginning of the program.

    We have created simple algorithms to date but are unsure on how to implement this into simple code.

    What we need now is a way of typing in a letter e.g. 'A' and 5 words beginning with that letter coming up.

    From this you can write 'A' then 'L' and this will filter the number of words shown.

  4. #4
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    Re: Predictive Text Programming

    Where are you stuck?

  5. #5
    Join Date
    Mar 2009
    Location
    UK
    Posts
    5

    Re: Predictive Text Programming

    We stuck on how the database is refered to once we input text, in terms of how we are to code this into the rest of our code.

    Greatly appreciated,

  6. #6
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    Re: Predictive Text Programming

    Quote Originally Posted by Roushy View Post
    We stuck on how the database is refered to once we input text, in terms of how we are to code this into the rest of our code.

    Greatly appreciated,
    We're not mind readers here. What kind of app? Which development environment? Which database? Which protocol are you accessing the database?

    Please provide relevant details and ask specific questions.

  7. #7
    Join Date
    Mar 2009
    Location
    UK
    Posts
    5

    Re: Predictive Text Programming

    ok, so here's the story so far...
    were a group of 4 and we've been asked to think of a problem and to code a solution (in terms of computers), so we thought of a predictive text app for dexterity challenged individuals.
    so we all went away and researched on wot we gotta do and with a lecturer who don't help 1 bit, we made the briefest algorithm possible (assuming none of us have ever done C/C++ programming before in our life).
    we've also made a small database of a few words (around 80) and basically we've been asked to now make a skeleton on visual studio and we are all lost on both how to start and where to get help.
    We have a very narrow knowledge of C programming as weve been given lectures once a week since feb so our terminology isn't too good so i do apologize if im not specific enough and i do apologise if this reply still doesnt explain our situation but its all we know.

  8. #8
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    Re: Predictive Text Programming

    Quote Originally Posted by Roushy View Post
    ok, so here's the story so far...
    were a group of 4 and we've been asked to think of a problem and to code a solution (in terms of computers), so we thought of a predictive text app for dexterity challenged individuals.
    so we all went away and researched on wot we gotta do and with a lecturer who don't help 1 bit, we made the briefest algorithm possible (assuming none of us have ever done C/C++ programming before in our life).
    we've also made a small database of a few words (around 80) and basically we've been asked to now make a skeleton on visual studio and we are all lost on both how to start and where to get help.
    We have a very narrow knowledge of C programming as weve been given lectures once a week since feb so our terminology isn't too good so i do apologize if im not specific enough and i do apologise if this reply still doesnt explain our situation but its all we know.
    You didn't answer any questions about your database. Unfortunately, you're not going to get very far knowing nothing about C++, and an introductory how to get started tutorial is way beyond the scope of a bulletin board. Pick up a teach yourself C++ in 21 days or C++ for dummies book and at least get a feel for how the language works.

  9. #9
    Join Date
    Mar 2009
    Location
    UK
    Posts
    5

    Re: Predictive Text Programming

    srsly, if your not gonna be part of the solution...stop being part of my problem. i told you i dont know very much about programming and your answer to me is a simple 'get C++ for dummies' i may have not answered your questions but you havnt answered any of mine and i am in need of help

  10. #10
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    Re: Predictive Text Programming

    Quote Originally Posted by Roushy View Post
    srsly, if your not gonna be part of the solution...stop being part of my problem. i told you i dont know very much about programming and your answer to me is a simple 'get C++ for dummies' i may have not answered your questions but you havnt answered any of mine and i am in need of help
    And here it is some 37 days later. You could have gone through C++ in 21 days almost twice by now and been well on your way. My advice was sound. It just wasn't what you want to hear. The reality remains, that with no knowledge of C++ and basic database programming, you won't can't get anywhere. The fact that you're dragging this post up again after all this time should be evidence that I'm correct.

    I won't answer your questions because you lack the fundamental knowledge to understand what I would say. You can't or won't even tell me what database you're using. I asked the questions I did, so that I could give you specific guidance. If you won't answer them, don't expect any help.

  11. #11
    Lindley is offline Elite Member Power Poster
    Join Date
    Oct 2007
    Location
    Seattle, WA
    Posts
    10,895

    Re: Predictive Text Programming

    There's a data structure called a Trie which might be appropriate for this problem.

  12. #12
    Join Date
    Feb 2007
    Posts
    43

    Re: Predictive Text Programming

    ROFL @GCDEF

    Roushy, the project you're working on sounds hard for a beginner. I'd recommend using Forms in Visual Studio, along with learning Regex to filter text. Forms has textboxes built-in so you just have to figure out the programming to get the text you want.


    GCDEF is obviously right. If you don't want to buy any books, try the following terms in google:
    c++ tutorials
    vc++ tutorials
    visual studio tutorials

    I'd expect to learn c++ well enough to do what you are talking about would take quite literally 10x more time than all the hours for your class.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured