org.cogroo.dictionary.impl
Class FSAFeatureDictionary

java.lang.Object
  extended by org.cogroo.dictionary.impl.FSAFeatureDictionary
All Implemented Interfaces:
Iterable<WordTag>, FeatureDictionary

public class FSAFeatureDictionary
extends Object
implements FeatureDictionary, Iterable<WordTag>


Constructor Summary
FSAFeatureDictionary(morfologik.stemming.DictionaryLookup dictLookup)
           
 
Method Summary
static FeatureDictionary create(byte[] dictData, byte[] dictInfo)
           
static FeatureDictionary create(InputStream fsaData, InputStream featuresData)
           
static FeatureDictionary create(String path)
           
static FeatureDictionary createFromResources(String path)
           
 String[] getFeatures(String word, String pos)
           
static byte[] getFSADictionaryData(String path)
           
static byte[] getFSADictionaryInfo(String path)
           
 Iterator<WordTag> iterator()
           
static void main(String[] args)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FSAFeatureDictionary

public FSAFeatureDictionary(morfologik.stemming.DictionaryLookup dictLookup)
Method Detail

getFeatures

public String[] getFeatures(String word,
                            String pos)
Specified by:
getFeatures in interface FeatureDictionary

create

public static FeatureDictionary 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 FeatureDictionary create(InputStream fsaData,
                                       InputStream featuresData)
                                throws IllegalArgumentException,
                                       IOException
Throws:
IllegalArgumentException
IOException

create

public static FeatureDictionary create(byte[] dictData,
                                       byte[] dictInfo)
                                throws IllegalArgumentException,
                                       IOException
Throws:
IllegalArgumentException
IOException

main

public static void main(String[] args)
                 throws IllegalArgumentException,
                        IOException
Throws:
IllegalArgumentException
IOException

iterator

public Iterator<WordTag> iterator()
Specified by:
iterator in interface Iterable<WordTag>

createFromResources

public static FeatureDictionary createFromResources(String path)
                                             throws IllegalArgumentException,
                                                    IOException
Throws:
IllegalArgumentException
IOException


Copyright © 2012-2013 CoGrOO. All Rights Reserved.