Class CoreNLPNERecogniser
java.lang.Object
org.apache.tika.parser.ner.corenlp.CoreNLPNERecogniser
- All Implemented Interfaces:
NERecogniser
@Deprecated(since="2026-04-30")
public class CoreNLPNERecogniser
extends Object
implements NERecogniser
Deprecated.
This version of the Apache Tika library is deprecated. Use your own version of Apache Tika.
This class offers an implementation of
NERecogniser based on
CRF classifiers from Stanford CoreNLP. This NER requires additional setup,
due to runtime binding to Stanford CoreNLP.
See
Tika NER Wiki for configuring this recogniser.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDeprecated.default Model pathDeprecated.static final StringDeprecated.static final StringDeprecated.static final StringDeprecated.static final StringDeprecated.Fields inherited from interface org.apache.tika.parser.ner.NERecogniser
DATE, LOCATION, MISCELLANEOUS, MONEY, ORGANIZATION, PERCENT, PERSON, TIME -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.CoreNLPNERecogniser(String modelPath) Deprecated.Creates a NERecogniser by loading model from given path -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Gets set of entity types recognised by this recogniserbooleanDeprecated.checks if this Named Entity recogniser is available for servicestatic voidDeprecated.Deprecated.recognises names of entities in the text
-
Field Details
-
NER_3CLASS_MODEL
Deprecated.- See Also:
-
NER_4CLASS_MODEL
Deprecated.- See Also:
-
NER_7CLASS_MODEL
Deprecated.- See Also:
-
DEFAULT_MODEL_PATH
Deprecated.default Model path- See Also:
-
MODEL_PROP_NAME
Deprecated.- See Also:
-
ENTITY_TYPES
Deprecated.
-
-
Constructor Details
-
CoreNLPNERecogniser
public CoreNLPNERecogniser()Deprecated. -
CoreNLPNERecogniser
Deprecated.Creates a NERecogniser by loading model from given path- Parameters:
modelPath- path to NER model file
-
-
Method Details
-
isAvailable
public boolean isAvailable()Deprecated.Description copied from interface:NERecogniserchecks if this Named Entity recogniser is available for service- Specified by:
isAvailablein interfaceNERecogniser- Returns:
trueif model was available, valid and was able to initialise the classifier. returnsfalsewhen this recogniser is not available for service.
-
getEntityTypes
Deprecated.Gets set of entity types recognised by this recogniser- Specified by:
getEntityTypesin interfaceNERecogniser- Returns:
- set of entity classes/types
-
recognise
Deprecated.recognises names of entities in the text- Specified by:
recognisein interfaceNERecogniser- Parameters:
text- text which possibly contains names- Returns:
- map of entity type -> set of names
-
main
Deprecated.- Throws:
IOExceptioncom.github.openjson.JSONException
-