net.java.sen
Class ReadingProcessor.ReadingResult

java.lang.Object
  extended by net.java.sen.ReadingProcessor.ReadingResult
Enclosing class:
ReadingProcessor

public static class ReadingProcessor.ReadingResult
extends Object

The result of reading processing. Once created, the contents are unaffected by any later changes applied to the reading processor


Method Summary
 SortedMap<Integer,Reading> getBaseReadings()
          Gets the base readings resulting from processing of the result's text.
 SortedMap<Integer,Reading> getDisplayReadings()
          Gets the visible reading fragments resulting from processing of the result's text.
 List<Token> getPossibleTokens(int position)
          Searches for possible tokens starting at the given position within the result's text
 List<Token> getTokens()
          Gets the tokens resulting from analysis of the result's text.
 BitSet getVisibleTokens()
          Gets the set of tokens that contain at least one visible reading.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getTokens

public List<Token> getTokens()
Gets the tokens resulting from analysis of the result's text.

Note that although the returned data is isolated from any changes to the ReadingProcessor, it is not copied internally, and any changes you make to the returned data will be reflected by subsequent calls to this method on the same ReadingProcessor.ReadingResult object

Returns:
The tokens resulting from analysis of the result's text

getBaseReadings

public SortedMap<Integer,Reading> getBaseReadings()
Gets the base readings resulting from processing of the result's text.

Note that although the returned data is isolated from any changes to the ReadingProcessor, it is not copied internally, and any changes you make to the returned data will be reflected by subsequent calls to this method on the same ReadingProcessor.ReadingResult object

Returns:
The readings resulting from processing of the result's text

getDisplayReadings

public SortedMap<Integer,Reading> getDisplayReadings()
Gets the visible reading fragments resulting from processing of the result's text.

Note that although the returned data is isolated from any changes to the ReadingProcessor, it is not copied internally, and any changes you make to the returned data will be reflected by subsequent calls to this method on the same ReadingProcessor.ReadingResult object

Returns:
The readings resulting from processing of the result's text

getVisibleTokens

public BitSet getVisibleTokens()
Gets the set of tokens that contain at least one visible reading. Where a reading is present, the BitSet will contain true at the Token's index.

Note that although the returned data is isolated from any changes to the ReadingProcessor, it is not copied internally, and any changes you make to the returned data will be reflected by subsequent calls to this method on the same ReadingProcessor.ReadingResult object

Returns:
The set of tokens containing at least one visible reading

getPossibleTokens

public List<Token> getPossibleTokens(int position)
Searches for possible tokens starting at the given position within the result's text

Parameters:
position - The position to search at
Returns:
The possible tokens at the given position


Copyright © 2012. All Rights Reserved.