Results 1 to 4 of 4
  1. #1
    priyanka588 is offline Member
    Join Date
    Feb 2011
    Posts
    4
    Rep Power
    0

    Default How to read SGML files using Java

    Hi..
    I'm doing my project on Text Categorization.I've got a text categorisation test collection called Reuters-21578 for my Information Retrieval project. It is distributed in 22 files. Each of the first 21 files (reut2-000.sgm through reut2-020.sgm) contains 1000 documents, while the last (reut2-021.sgm) contains 578 documents. The files are in SGML format. Each of the 22 files begins with a document type declaration line:
    <!DOCTYPE lewis SYSTEM "lewis.dtd"> The DTD file lewis.dtd is included in the distribution. Following the document type declaration line are individual Reuters articles marked up with SGML tags.

    I need help to write a java program to read those 21578 documents or transform them into 21578 seperated text files.

    Plzz...

  2. #2
    goldest's Avatar
    goldest is offline Senior Member
    Join Date
    Oct 2009
    Location
    Pune, India
    Posts
    469
    Rep Power
    6

    Wink

    Piyu,

    Have you tried anything? Any attempt made from your side to achieve this?

    Goldest
    Java Is A Funny Language... Really!
    Click on * and add to member reputation, if you find their advices/solutions effective.

  3. #3
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

  4. #4
    priyanka588 is offline Member
    Join Date
    Feb 2011
    Posts
    4
    Rep Power
    0

    Default

    hi..
    I'm able to read the contents of the .sgm files. but I'm not understanding how to extract the individual documents from each .sgm file since each document is surrounded many SGML tags???

    plzz help

Similar Threads

  1. Read from two files
    By globo in forum New To Java
    Replies: 1
    Last Post: 01-29-2011, 11:25 PM
  2. Files, cannot read!
    By LennyKosmos in forum New To Java
    Replies: 2
    Last Post: 10-02-2010, 02:35 PM
  3. Read binary files
    By ronaldo121 in forum New To Java
    Replies: 5
    Last Post: 03-04-2010, 04:37 AM
  4. How Read and Write XMl files using Java
    By tjs in forum SWT / JFace
    Replies: 0
    Last Post: 02-23-2009, 01:19 PM
  5. Replies: 2
    Last Post: 02-20-2009, 08:13 AM

Posting Permissions

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