public class MFSResource extends Object implements opennlp.tools.util.model.SerializableArtifact
| Modifier and Type | Class and Description |
|---|---|
static class |
MFSResource.MFSResourceSerializer |
| Constructor and Description |
|---|
MFSResource(InputStream in)
Build the MFS Dictionary.
|
| Modifier and Type | Method and Description |
|---|---|
Class<?> |
getArtifactSerializerClass() |
List<String> |
getFirstSenseBilou(List<String> lemmas,
String[] posTags)
Extract most frequent sense baseline from WordNet data, using Ciaramita and
Altun's (2006) approach for bilou encoding.
|
List<String> |
getFirstSenseBio(List<String> lemmas,
String[] posTags)
Extract most frequent sense baseline from WordNet data, using Ciaramita and
Altun's (2006) approach for a bio encoding.
|
String |
getMFS(com.google.common.collect.TreeMultimap<Integer,String> mfsMap)
Get the MFS from a lemma#posClass entry, e.g., house#n.
|
com.google.common.collect.TreeMultimap<Integer,String> |
getMFSRanking(String lemmaPOSClass,
Integer rankSize)
Get a rank of senses ordered by MFS.
|
com.google.common.collect.TreeMultimap<Integer,String> |
getOrderedMap(String lemmaPOSClass)
Get the ordered Map of most frequent senses for a lemma#pos entry.
|
void |
getOrderedSenses(List<String> mfsList,
com.google.common.collect.TreeMultimap<Integer,String> mfsResultsMap)
Look-up lemma#pos string as key in dictionary.
|
void |
serialize(OutputStream out)
Serialize the lexicon in the original format.
|
public MFSResource(InputStream in) throws IOException
in - the input streamIOException - the io exceptionpublic List<String> getFirstSenseBio(List<String> lemmas, String[] posTags)
lemmas - in the sentenceposTags - the postags of the sentencepublic List<String> getFirstSenseBilou(List<String> lemmas, String[] posTags)
lemmas - in the sentenceposTags - posTags in the sentencepublic com.google.common.collect.TreeMultimap<Integer,String> getOrderedMap(String lemmaPOSClass)
lemmaPOSClass - the lemma#pos entrypublic void getOrderedSenses(List<String> mfsList, com.google.common.collect.TreeMultimap<Integer,String> mfsResultsMap)
mfsList - the list containing the freq#sense valuesmfsResultsMap - the map in which the results are storedpublic String getMFS(com.google.common.collect.TreeMultimap<Integer,String> mfsMap)
mfsMap - map to get the MFS frompublic com.google.common.collect.TreeMultimap<Integer,String> getMFSRanking(String lemmaPOSClass, Integer rankSize)
lemmaPOSClass - the lemma#pos entryrankSize - the size of the rankpublic void serialize(OutputStream out) throws IOException
out - the output streamIOException - if io errorspublic Class<?> getArtifactSerializerClass()
getArtifactSerializerClass in interface opennlp.tools.util.model.SerializableArtifactCopyright © 2016 IXA pipes. All rights reserved.