org.cogroo.dictionary.impl
Class FSADictionary

java.lang.Object
  extended by 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>


Method Summary
static opennlp.tools.postag.TagDictionary create(byte[] dictData, byte[] dictInfo)
           
static FSADictionary create(InputStream fsaData, InputStream featuresData)
           
static opennlp.tools.postag.TagDictionary create(String path)
           
static FSADictionary createFromResources(String path)
           
static byte[] getFSADictionaryData(String path)
           
static byte[] getFSADictionaryInfo(String path)
           
 String[] getLemmas(String word, String tag)
           
 String[] getTags(String word)
           
 List<PairWordPOSTag> getTagsAndLemms(String aWord)
          This is used by rule system
 Iterator<String> iterator()
           
static void main(String[] args)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

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.