uk.ac.gla.dcs.renaissance.mg4j.documents
Class CompactDocument

java.lang.Object
  extended by uk.ac.gla.dcs.renaissance.mg4j.documents.CompactDocument

public class CompactDocument
extends Object

This represents a compressed document representation

Author:
B. Piwowarski

Field Summary
static it.unimi.dsi.parser.Element SENTENCE
          A sentence boundary
 
Constructor Summary
CompactDocument()
           
 
Method Summary
 void addTag(TagPointer tag)
           
 void addWord(WordPointer word)
           
 List<TagPointer> getTags()
           
 List<WordPointer> getWords()
           
 List<Integer> indexPositions()
          Get a list of integers reflecting the index positions
 Iterable<Pointer> tagAndWords()
          Returns an iterator on words and tags, following document order
 Iterable<TagPointer> tags()
           
 Iterable<WordPointer> words()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SENTENCE

public static final it.unimi.dsi.parser.Element SENTENCE
A sentence boundary

Constructor Detail

CompactDocument

public CompactDocument()
Method Detail

words

public Iterable<WordPointer> words()

tags

public Iterable<TagPointer> tags()

addTag

public void addTag(TagPointer tag)

addWord

public void addWord(WordPointer word)

getTags

public List<TagPointer> getTags()

tagAndWords

public Iterable<Pointer> tagAndWords()
Returns an iterator on words and tags, following document order


indexPositions

public List<Integer> indexPositions()
Get a list of integers reflecting the index positions


getWords

public List<WordPointer> getWords()


Copyright © 2011. All Rights Reserved.