File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Ivan Bisevac
Ranch Hand
Posts: 48
Java MySQL Database Oracle
  • 0
  • Mark post as helpful
  • send pies
  • 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:

 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • 0
  • Mark post as helpful
  • send pies
  • 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
Java MySQL Database Oracle
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot, i will try and post here what i did.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic