• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to convert dictionary words from .txt file to database?

 
Ranch Hand
Posts: 48
Oracle MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am learning Java and i know basic java and oo technologies and learned how to make windows. Also i know to work with databases and servlets. I graduated for bachelor on databases.
Now i would like to make english-serbian dictionary in java.
I have words in .doc file but i copied these words from .doc to .txt. How i have doubt is possible to convert from .doc or .txt file to database. Is it big job? I have expirience in programming but not in data conversion..

Here is part of .txt file:



First is a Serbian word following English translations. Problem may be english translations which are not in same row. For example:

 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Parsing a text file and populating a database table with its data is easy enough (you can often do this with a database's own loading tool). Your issue is defining where a single definition ends. You may be able to find a common pattern for the start of a definition and use that to delimit stuff; you will have to make the call if this is possible based on the data you have.

You can access the file using the java.io package. Any clever parsing is best achieved with classes in the java.util.regex package.
 
Ivan Bisevac
Ranch Hand
Posts: 48
Oracle MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot, i will try and post here what i did.
 
money grubbing section goes here:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic