org.cogroo.analyzer
Class ComponentFactory

java.lang.Object
  extended by org.cogroo.analyzer.ComponentFactory
All Implemented Interfaces:
ComponentFactoryI

public class ComponentFactory
extends Object
implements ComponentFactoryI


Method Summary
static ComponentFactory create(InputStream configuration)
          Creates a ComponentFactory from a configuration file.
static ComponentFactory create(Locale locale)
           
 Analyzer createChunker()
           
 Analyzer createContractionFinder()
           
 Analyzer createFeaturizer()
           
 Analyzer createHeadFinder()
           
 Analyzer createLemmatizer()
           
 Analyzer createNameFinder()
           
 Analyzer createPipe()
           
 Analyzer createPOSTagger()
           
 Analyzer createSentenceDetector()
           
 Analyzer createShallowParser()
           
 Analyzer createTokenizer()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static ComponentFactory create(Locale locale)

create

public static ComponentFactory create(InputStream configuration)
Creates a ComponentFactory from a configuration file. The stream remains open after execution.

Parameters:
configuration - the configuration XML, that conforms with languageConfiguration.xsd
Returns:
a ComponentFactory

createSentenceDetector

public Analyzer createSentenceDetector()
Specified by:
createSentenceDetector in interface ComponentFactoryI
Returns:
SentenceDetector if this Analyzer in the corresponding language exists, otherwise null.

createTokenizer

public Analyzer createTokenizer()
Specified by:
createTokenizer in interface ComponentFactoryI
Returns:
Tokenizer if this Analyzer in the corresponding language exists, otherwise null.

createNameFinder

public Analyzer createNameFinder()
Specified by:
createNameFinder in interface ComponentFactoryI
Returns:
NameFinder if this Analyzer in the corresponding language exists, otherwise null.

createContractionFinder

public Analyzer createContractionFinder()
Specified by:
createContractionFinder in interface ComponentFactoryI
Returns:
ContractionFinder if this Analyzer in the corresponding language exists, otherwise null.

createPOSTagger

public Analyzer createPOSTagger()
Specified by:
createPOSTagger in interface ComponentFactoryI
Returns:
POSTagger if this Analyzer in the corresponding language exists, otherwise null.

createFeaturizer

public Analyzer createFeaturizer()
Specified by:
createFeaturizer in interface ComponentFactoryI

createLemmatizer

public Analyzer createLemmatizer()

createChunker

public Analyzer createChunker()

createHeadFinder

public Analyzer createHeadFinder()

createShallowParser

public Analyzer createShallowParser()

createPipe

public Analyzer createPipe()
Specified by:
createPipe in interface ComponentFactoryI
Returns:
Pipe according to the corresponding language.


Copyright © 2012-2013 CoGrOO. All Rights Reserved.