Important: CAS creation is expensive, so if at all possible an application should reuse CASes. When a CAS instance is no longer being used, call its {@link CAS#reset()} method, whichwill remove all prior analysis information, and then reuse that same CAS instance for another call to {@link #process(CAS)}.
Note that the CAS allows multiple subjects of analysis (e.g. documents) and defines a separate "view" for each of them. If your application wants to work with a single subject of analysis, call the method {@link CAS#getCurrentView()} and operate on the returned view.
@return a new CAS
appropriate for this AnalysisEngine.
@throws ResourceInitializationException if a CAS could not be created because this AnalysisEngine's CAS metadata (type system, type priorities, or FS indexes) are invalid. Ideally this would be checked at AnalysisEngine initialization time, and it will likely be moved in the future.
|
|