×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Jul 2013
    Posts
    48

    how to make a textfile

    I want to make a dictionary using textfile containing many words, how do i make the textfile?
    or where can i download the textfile containing over 100,000 words with their meanings and place it the res directory.

  2. #2
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,087

    Re: how to make a textfile

    Quote Originally Posted by juliusa View Post
    I want to make a dictionary using textfile containing many words, how do i make the textfile?
    or where can i download the textfile containing over 100,000 words with their meanings and place it the res directory.
    As you wish to keep the dictionary data in text files and keep them in res directory of your app - containing words and meanings then I will suggest to make the names of the res files something like this - aa.txt, ab.txt,ac.txt.............az.txt, ba.txt, bb.txt,bx.txt,.................zy.txt,zz.txt i.e. in all 26x26 res files containing words starting from aa in aa.txt, ab in ab.txt and so on.
    once you have all these files in place in your resource bundle - you can quickly access the required file using 1st 2 alphabets of the word you are searching for.
    thanks,
    ~Amitabh
    (Champion of the Month -Aug'13)
    Follow me on my blog for Innovative Mobile Apps

  3. #3
    Super Contributor
    Join Date
    Mar 2003
    Location
    Finland
    Posts
    9,563

    Re: how to make a textfile

    JSR-75, FileConnection API has the (text) file management interfaces you need to create, open, read, write and delete files.

    Note device/platform specific restrictions regarding where you are allowed to access files.

    Lots of file handling examples in the wiki: http://developer.nokia.com/community.../Data_Articles

  4. #4
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,087

    Re: how to make a textfile

    Juliusa,

    You may not need JSR-75 for your dictionary project, as you are not using your J2me app to read or write to the device filesystem.

    You just need to read text files, line-by-line from - each line as a word = meaning only - you can do without JSR 75.

    Refer to wiki article - http://developer.nokia.com/community...ine_in_Java_ME
    Last edited by im2amit; 2014-02-28 at 08:42.
    thanks,
    ~Amitabh
    (Champion of the Month -Aug'13)
    Follow me on my blog for Innovative Mobile Apps

  5. #5
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,694

    Re: how to make a textfile

    There are at least 3 different things here:
    - if you want a built-in dictionary, you can put it into the JAR, text files compress pretty well
    - if you want an empty app, which downloads a dictionary or dictionaries from the Internet, you will need the JSR-75 API
    - and you can also combine the two approaches, e.g. having a built-in dictionary available right after installation, and downloading extensions from the Internet
    Quote Originally Posted by im2amit View Post
    You may not need JSR-75 for your dictionary project, as you are using your J2me app to read or write to the device filesystem.
    While there is no such thing as writing into the device file system and not using FileConnection, it is true that you can also use RMS, which requires less permissions to use than the FileConnection API.

  6. #6
    Registered User
    Join Date
    Jul 2013
    Posts
    48

    Re: how to make a textfile

    i want have textfiles (word=meaning) starting from aa.txt, ab.txt and so on 26x26.
    but still it looks to be tiresome creating them, am wondering if there is any link from which i can download them and place them in the res folder.

  7. #7
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,087

    Re: how to make a textfile

    Quote Originally Posted by juliusa View Post
    i want have textfiles (word=meaning) starting from aa.txt, ab.txt and so on 26x26.
    but still it looks to be tiresome creating them, am wondering if there is any link from which i can download them and place them in the res folder.
    Search internet, you might need to buy and/or cut/copy/paste the words in the above suggest 26x26 text files. Wont be getting it directly.
    thanks,
    ~Amitabh
    (Champion of the Month -Aug'13)
    Follow me on my blog for Innovative Mobile Apps

Similar Threads

  1. upload textfile on server
    By desert.05 in forum Symbian User Interface
    Replies: 1
    Last Post: 2012-05-09, 07:11
  2. Reading textfile into QString
    By Anne80 in forum [Archived] Beginning Qt
    Replies: 3
    Last Post: 2011-04-21, 06:21
  3. read textfile in j2me
    By sweetgurl in forum Mobile Java General
    Replies: 2
    Last Post: 2010-04-26, 06:37
  4. How read from unicode textfile?
    By Bertil_ in forum Mobile Java General
    Replies: 7
    Last Post: 2009-04-24, 21:38
  5. How can I write an array into a textfile?
    By manu.20 in forum Symbian
    Replies: 1
    Last Post: 2005-05-25, 14:33

Posting Permissions

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