org.cogroo.dictionary.impl
Class FSADictionary
java.lang.Object
org.cogroo.dictionary.impl.FSADictionary
- All Implemented Interfaces:
- Iterable<String>, opennlp.tools.postag.TagDictionary, LemmaDictionary
public class FSADictionary
- extends Object
- implements opennlp.tools.postag.TagDictionary, LemmaDictionary, Iterable<String>
getTags
public String[] getTags(String word)
- Specified by:
getTags
in interface opennlp.tools.postag.TagDictionary
getLemmas
public String[] getLemmas(String word,
String tag)
- Specified by:
getLemmas
in interface LemmaDictionary
getTagsAndLemms
public List<PairWordPOSTag> getTagsAndLemms(String aWord)
- This is used by rule system
create
public static opennlp.tools.postag.TagDictionary create(String path)
throws IllegalArgumentException,
IOException
- Throws:
IllegalArgumentException
IOException
getFSADictionaryInfo
public static byte[] getFSADictionaryInfo(String path)
throws IOException
- Throws:
IOException
getFSADictionaryData
public static byte[] getFSADictionaryData(String path)
throws IOException
- Throws:
IOException
create
public static FSADictionary create(InputStream fsaData,
InputStream featuresData)
throws IllegalArgumentException,
IOException
- Throws:
IllegalArgumentException
IOException
create
public static opennlp.tools.postag.TagDictionary create(byte[] dictData,
byte[] dictInfo)
throws IllegalArgumentException,
IOException
- Throws:
IllegalArgumentException
IOException
createFromResources
public static FSADictionary createFromResources(String path)
throws IllegalArgumentException,
IOException
- Throws:
IllegalArgumentException
IOException
iterator
public Iterator<String> iterator()
- Specified by:
iterator
in interface Iterable<String>
main
public static void main(String[] args)
throws IllegalArgumentException,
IOException
- Throws:
IllegalArgumentException
IOException
Copyright © 2012-2013 CoGrOO. All Rights Reserved.