Package org.apache.tika.parser.ctakes
Class CTAKESConfig
java.lang.Object
org.apache.tika.parser.ctakes.CTAKESConfig
- All Implemented Interfaces:
Serializable
Configuration for
CTAKESContentHandler.
This class allows to enable cTAKES and set its parameters.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.CTAKESConfig(InputStream stream) Loads properties from InputStream and then tries to close InputStream. -
Method Summary
Modifier and TypeMethodDescriptionReturns the path to XML descriptor for AnalysisEngine.Returns an array ofCTAKESAnnotationProperty's that will be included into cTAKES metadata.Returns a string containing a comma-separated list ofCTAKESAnnotationPropertynames that will be included into cTAKES metadata.String[]Returns an array of metadata whose values will be analyzed using cTAKES.Returns a string containing a comma-separated list of metadata whose values will be analyzed using cTAKES.Returns anOutputStreamobject used write the CAS.charReturns the separator character used for annotation properties.Returns the type of cTAKES (UIMA) serializer used to write the CAS.Returns the UMLS password.Returns the UMLS username.booleanReturnstrueif formatted output is enabled,falseotherwise.booleanReturnstrueif CAS serialization is enabled,falseotherwise.booleanisText()Returnstrueif content text analysis is enabledfalseotherwise.voidsetAeDescriptorPath(String aeDescriptorPath) Sets the path to XML descriptor for AnalysisEngine.voidsetAnnotationProps(String[] annotationProps) ets theCTAKESAnnotationProperty's that will be included into cTAKES metadata.voidsetAnnotationProps(CTAKESAnnotationProperty[] annotationProps) Sets theCTAKESAnnotationProperty's that will be included into cTAKES metadata.voidsetMetadata(String[] metadata) Sets the metadata whose values will be analyzed using cTAKES.voidsetOutputStream(OutputStream stream) Sets theOutputStreamobject used to write the CAS.voidsetPrettyPrint(boolean prettyPrint) Enables the formatted output for serializer.voidsetSeparatorChar(char separatorChar) Sets the separator character used for annotation properties.voidsetSerialize(boolean serialize) Enables CAS serialization.voidsetSerializerType(CTAKESSerializer serializerType) Sets the type of cTAKES (UIMA) serializer used to write CAS.voidsetText(boolean text) Enables content text analysis using cTAKES.voidsetUMLSPass(String uMLSPass) Sets the UMLS password.voidsetUMLSUser(String uMLSUser) Sets the UMLS username.
-
Constructor Details
-
CTAKESConfig
public CTAKESConfig()Default constructor. -
CTAKESConfig
Loads properties from InputStream and then tries to close InputStream.- Parameters:
stream-InputStreamobject used to read properties.
-
-
Method Details
-
getAeDescriptorPath
Returns the path to XML descriptor for AnalysisEngine.- Returns:
- the path to XML descriptor for AnalysisEngine.
-
setAeDescriptorPath
Sets the path to XML descriptor for AnalysisEngine.- Parameters:
aeDescriptorPath- the path to XML descriptor for AnalysisEngine.
-
getUMLSUser
Returns the UMLS username.- Returns:
- the UMLS username.
-
setUMLSUser
Sets the UMLS username.- Parameters:
uMLSUser- the UMLS username.
-
getUMLSPass
Returns the UMLS password.- Returns:
- the UMLS password.
-
setUMLSPass
Sets the UMLS password.- Parameters:
uMLSPass- the UMLS password.
-
isPrettyPrint
public boolean isPrettyPrint()Returnstrueif formatted output is enabled,falseotherwise.- Returns:
trueif formatted output is enabled,falseotherwise.
-
setPrettyPrint
public void setPrettyPrint(boolean prettyPrint) Enables the formatted output for serializer.- Parameters:
prettyPrint-trueto enable formatted output,falseotherwise.
-
getSerializerType
Returns the type of cTAKES (UIMA) serializer used to write the CAS.- Returns:
- the type of cTAKES serializer.
-
setSerializerType
Sets the type of cTAKES (UIMA) serializer used to write CAS.- Parameters:
serializerType- the type of cTAKES serializer.
-
getOutputStream
Returns anOutputStreamobject used write the CAS.- Returns:
OutputStreamobject used write the CAS.
-
setOutputStream
Sets theOutputStreamobject used to write the CAS.- Parameters:
stream- theOutputStreamobject used to write the CAS.
-
isSerialize
public boolean isSerialize()Returnstrueif CAS serialization is enabled,falseotherwise.- Returns:
trueif CAS serialization output is enabled,falseotherwise.
-
setSerialize
public void setSerialize(boolean serialize) Enables CAS serialization.- Parameters:
serialize-trueto enable CAS serialization,falseotherwise.
-
isText
public boolean isText()Returnstrueif content text analysis is enabledfalseotherwise.- Returns:
trueif content text analysis is enabledfalseotherwise.
-
setText
public void setText(boolean text) Enables content text analysis using cTAKES.- Parameters:
text-trueto enable content text analysis,falseotherwise.
-
getMetadata
Returns an array of metadata whose values will be analyzed using cTAKES.- Returns:
- an array of metadata whose values will be analyzed using cTAKES.
-
setMetadata
Sets the metadata whose values will be analyzed using cTAKES.- Parameters:
metadata- the metadata whose values will be analyzed using cTAKES.
-
getMetadataAsString
Returns a string containing a comma-separated list of metadata whose values will be analyzed using cTAKES.- Returns:
- a string containing a comma-separated list of metadata whose values will be analyzed using cTAKES.
-
getAnnotationProps
Returns an array ofCTAKESAnnotationProperty's that will be included into cTAKES metadata.- Returns:
- an array of
CTAKESAnnotationProperty's that will be included into cTAKES metadata.
-
setAnnotationProps
Sets theCTAKESAnnotationProperty's that will be included into cTAKES metadata.- Parameters:
annotationProps- theCTAKESAnnotationProperty's that will be included into cTAKES metadata.
-
setAnnotationProps
ets theCTAKESAnnotationProperty's that will be included into cTAKES metadata.- Parameters:
annotationProps- theCTAKESAnnotationProperty's that will be included into cTAKES metadata.
-
getAnnotationPropsAsString
Returns a string containing a comma-separated list ofCTAKESAnnotationPropertynames that will be included into cTAKES metadata.- Returns:
-
getSeparatorChar
public char getSeparatorChar()Returns the separator character used for annotation properties.- Returns:
- the separator character used for annotation properties.
-
setSeparatorChar
public void setSeparatorChar(char separatorChar) Sets the separator character used for annotation properties.- Parameters:
separatorChar- the separator character used for annotation properties.
-