gov.llnl.ontology.wordnet
Class WordNetSynsetWriter

java.lang.Object
  extended by gov.llnl.ontology.wordnet.WordNetSynsetWriter
All Implemented Interfaces:
SynsetWriter

public class WordNetSynsetWriter
extends Object
implements SynsetWriter

A SynsetWriter that generates data lines in the form expected defined by the original WordNet library.

Author:
Keith Stevens

Field Summary
 String offsetFormat
          The string formatused to print out an offset.
 int offsetSize
          The number of bytes needed to represent each known synset offset.
 
Constructor Summary
WordNetSynsetWriter(int offsetSize)
          Creates a new WordNetSynsetWriter.
 
Method Summary
 String serializeSynset(Synset synset)
          Returns a string form of this Synset formatted in the WordNet data.pos file format.
 List<String> serializeSynsetKeys(Synset synset)
          Returns a List of each sense key linked to it's Synset's serialziation id.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

offsetSize

public int offsetSize
The number of bytes needed to represent each known synset offset.


offsetFormat

public String offsetFormat
The string formatused to print out an offset.

Constructor Detail

WordNetSynsetWriter

public WordNetSynsetWriter(int offsetSize)
Creates a new WordNetSynsetWriter.

Method Detail

serializeSynsetKeys

public List<String> serializeSynsetKeys(Synset synset)
Returns a List of each sense key linked to it's Synset's serialziation id..

Specified by:
serializeSynsetKeys in interface SynsetWriter

serializeSynset

public String serializeSynset(Synset synset)
Returns a string form of this Synset formatted in the WordNet data.pos file format. This method should only be called if an offset value has been set for the Synset and an offset size has been set.

Specified by:
serializeSynset in interface SynsetWriter


Copyright © 2010-2011. All Rights Reserved.