org.cogroo.analyzer
Class ComponentFactory
java.lang.Object
org.cogroo.analyzer.ComponentFactory
- All Implemented Interfaces:
- ComponentFactoryI
public class ComponentFactory
- extends Object
- implements ComponentFactoryI
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.