Results 1 to 2 of 2
  1. #1
    joe_2110 is offline Member
    Join Date
    Jan 2008
    Rep Power

    Default Feature extraction from a text file in java. this is used for scoring the sentences

    I have seperated individual sentences out of a text document read from a file using several heuristics. Now i need to index the sentence according to the order of appearance (eg 1st sentence as 1, then 2,3 etc). Then i need to extract features out of these marked sentences. The features include position(if at top of document position is 1 if bottom its 0),length(number of words in the sentence) and thematic words(most frequent words). based on these features i will score the sentences. Please do help me out friends

  2. #2
    erhart is offline Member
    Join Date
    Jan 2008
    Rep Power


    There are a few ways that you could do this. The most efficient way is to keep track of the position of the sentences during the extraction from the file. You could define a class Sentence with variables like String sentence, int position, int appearanceOrder, etc. The Sentence class could contain methods which would count the number of words in the sentence and find the most frequent words. Is this helpful, or were you looking for something more specific?

Similar Threads

  1. How to print text file in java(dotmatrix printer)
    By yoganeethi in forum Advanced Java
    Replies: 4
    Last Post: 12-01-2010, 01:45 PM
  2. count character in text file as input file
    By aNNuur in forum New To Java
    Replies: 7
    Last Post: 03-25-2010, 04:01 PM
  3. How to read a text file from a Java Archive File
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 02-08-2008, 09:13 AM
  4. Extract Text from PDF File using java
    By TSW1016 in forum Advanced Java
    Replies: 5
    Last Post: 01-06-2008, 11:03 PM
  5. Converting text file(.txt) to JPG file(.jpg) in java
    By javadeveloper in forum Advanced Java
    Replies: 0
    Last Post: 11-09-2007, 04:22 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