Results 1 to 10 of 10
  1. #1
    Join Date
    Nov 2010
    Posts
    87
    Rep Power
    0

    Default Simple SQLite translation from Command Prompt

    Hi all,

    I'm hoping to get some help/suggestions with this. I have an SQLite database that contains 3 columns.

    The 1st column is '_id'
    The 2nd column 'SMS'
    The 3rd Column is 'English'

    Basically, I want to write a simple program that will translate an SMS text message a user can enter onto a command prompt into proper English. The user will enter a message and then the database will be queried and return a translated message just by matching and replacing any parts of the message it finds. My word database is comprehensive and contains roughly 1500 words.

    E.g. A user can enter... "LOL I will CU L8R M8" and the program should return "Laughing out loud I Will see you later mate"

    I am new to SQLite and have only worked with server-side databases before, mySQL etc and never to do a translation program. Is this going to be difficult to make? Am I right in thinking I would have to use the split function of a string class? I'm a bit lost on where to begin so any help is greatly appreciated. I was try to do all of this as an Android app but it seemed to be too complicated for my skills so I am trying to just keep it simple and do it from a command prompt before I expand and take it further.

    Thanks,

    Atia

  2. #2
    Join Date
    Nov 2010
    Posts
    87
    Rep Power
    0

    Default Re: Simple SQLite translation from Command Prompt

    Any ideas anyone?

  3. #3
    Junky's Avatar
    Junky is offline Grand Poobah
    Join Date
    Jan 2011
    Location
    Dystopia
    Posts
    3,755
    Rep Power
    7

    Default Re: Simple SQLite translation from Command Prompt

    I have plenty of ideas. They usually involve food.

  4. #4
    Join Date
    Nov 2010
    Posts
    87
    Rep Power
    0

    Default Re: Simple SQLite translation from Command Prompt

    Quote Originally Posted by Junky View Post
    I have plenty of ideas. They usually involve food.
    Well that gets me off to a great start... thanks

  5. #5
    Junky's Avatar
    Junky is offline Grand Poobah
    Join Date
    Jan 2011
    Location
    Dystopia
    Posts
    3,755
    Rep Power
    7

    Default Re: Simple SQLite translation from Command Prompt

    If you ask a more specific question you might get more specific answers.

  6. #6
    Join Date
    Nov 2010
    Posts
    87
    Rep Power
    0

    Default Re: Simple SQLite translation from Command Prompt

    Am I right in thinking I would have to use the split function of a string class? I'm a bit lost on where to begin so any help is greatly appreciated
    I thought I did?

  7. #7
    Join Date
    Nov 2010
    Posts
    87
    Rep Power
    0

    Default Re: Simple SQLite translation from Command Prompt

    QUESTION...

    Would it be easier for me to download the SQLite DLL and program from an environment such as Visual C++ for this task (I have only ever coded in Java)... or should I simply do everything from the command line shell?

    Thanks

  8. #8
    Join Date
    Nov 2010
    Posts
    87
    Rep Power
    0

    Default Re: Simple SQLite translation from Command Prompt

    OK an update...

    I am programming in eclipse with the JDBC driver... the driver is working etc as I have tested it yet I am still stuck as to what classes I will need (whether I need an adapter class etc.. will I end up having lots of classes or just a couple??)


    I have been searching the net for a week for a similar design but there is just nothing out there for an SQLite/Java word for word translation program... HELP :)

  9. #9
    Join Date
    Nov 2010
    Posts
    87
    Rep Power
    0

    Default Re: Simple SQLite translation from Command Prompt

    Question: For this word for word conversion should I have the SMS column as the primary key or would Id be the primary key? Also what datatype should the SMS and English columns be? I currently have them as VARCHAR but what is the difference between this and 'TEXT'?

    Thanks

  10. #10
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,450
    Rep Power
    18

    Default Re: Simple SQLite translation from Command Prompt

    Hang on, are you trying to hold the same conversation in two places on this forum?
    I just posted in your almost identical thread in Databases.

Similar Threads

  1. Running .jar in command prompt
    By wonstatus in forum New To Java
    Replies: 7
    Last Post: 07-17-2011, 11:35 PM
  2. Letting my program command the command prompt
    By Smokey. in forum Threads and Synchronization
    Replies: 4
    Last Post: 03-29-2011, 11:34 PM
  3. New Command prompt
    By jmga9 in forum New To Java
    Replies: 4
    Last Post: 11-10-2010, 01:53 AM
  4. how to get the values from command prompt
    By tej in forum New To Java
    Replies: 3
    Last Post: 05-02-2009, 08:32 AM
  5. help me!!!! about command prompt..
    By kureikougaiji in forum New To Java
    Replies: 2
    Last Post: 11-13-2008, 06:15 PM

Posting Permissions

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