|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.llnl.ontology.wordnet.FileBasedInformationContent
public class FileBasedInformationContent
This InformationContent
implementation loads the content data from
plain text based file where each line contains an offset, part of speech, and
content count. This is the typical format used content files distributed
with the WordNet::Similarity perl package.
Constructor Summary | |
---|---|
FileBasedInformationContent(String icFilename)
Creates a FileBasedInformationContent from the provided file
name. |
Method Summary | |
---|---|
double |
contentForPartOfSpeech(Synset.PartsOfSpeech pos)
Returns the raw content counts for a given Synset.PartsOfSpeech |
double |
contentForSynset(Synset synset)
Returns the raw content counts for a given Sysnet . |
double |
informationContent(Synset synset)
Returns the information theoretic content value for a given Synset . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileBasedInformationContent(String icFilename)
FileBasedInformationContent
from the provided file
name. tThis InformationContent
should only be loaded after
initializing the WordNetCorpusReader
.
IllegalArgumentException
- When an offset id does not match any
known offset value in wordnet as this is indicitive that the
incorrect content file is being used.Method Detail |
---|
public double contentForSynset(Synset synset)
Sysnet
. If there is
no content value, -1 is returned.
contentForSynset
in interface InformationContent
public double contentForPartOfSpeech(Synset.PartsOfSpeech pos)
Synset.PartsOfSpeech
contentForPartOfSpeech
in interface InformationContent
public double informationContent(Synset synset)
Synset
. If there is no content value, -1 is returned.
informationContent
in interface InformationContent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |