uk.ac.gla.dcs.renaissance.mg4j.documents
Class CompactDocument
java.lang.Object
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 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SENTENCE
public static final it.unimi.dsi.parser.Element SENTENCE
- A sentence boundary
CompactDocument
public CompactDocument()
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.