sparknlp_jsl.annotator.SentenceResolverParams#
- class sparknlp_jsl.annotator.SentenceResolverParams[source]#
Bases:
HasCaseSensitiveProperties
Class used to have a common interface Sentence Resolver family.
- Parameters:
- distanceFunction
What distance function to use for WMD: ‘EUCLIDEAN’ or ‘COSINE’.
- neighbours
Number of neighbours to consider in the KNN query to calculate WMD
- threshold
Threshold value for the last distance calculated.
- confidenceFunction
What function to use to calculate confidence: INVERSE or SOFTMAX.
- missAsEmpty
Whether or not to return an empty annotation on unmatched chunks.
Methods
__init__
(*args, **kwargs)Gets whether to ignore case in tokens for embeddings matching.
setCaseSensitive
(value)Sets whether to ignore case in tokens for embeddings matching.
What function to use to calculate confidence: INVERSE or SOFTMAX.
setDistanceFunction
(dist)Sets distance function to use for WMD: 'EUCLIDEAN' or 'COSINE'.
setMissAsEmpty
(value)Sets whether or not to return an empty annotation on unmatched chunks.
Sets number of neighbours to consider in the KNN query to calculate WMD.
setThreshold
(thres)Sets Threshold value for the last distance calculated.
Attributes
caseSensitive
confidenceFunction
distanceFunction
missAsEmpty
neighbours
threshold
- getCaseSensitive()#
Gets whether to ignore case in tokens for embeddings matching.
- Returns:
- bool
Whether to ignore case in tokens for embeddings matching
- setCaseSensitive(value)#
Sets whether to ignore case in tokens for embeddings matching.
- Parameters:
- valuebool
Whether to ignore case in tokens for embeddings matching
- setConfidenceFunction(s)[source]#
What function to use to calculate confidence: INVERSE or SOFTMAX.
- Parameters:
- sstr
What function to use to calculate confidence: INVERSE or SOFTMAX.
- setDistanceFunction(dist)[source]#
Sets distance function to use for WMD: ‘EUCLIDEAN’ or ‘COSINE’.
- Parameters:
- diststr
Value that selects what distance function to use for WMD: ‘EUCLIDEAN’ or ‘COSINE’.
- setMissAsEmpty(value)[source]#
Sets whether or not to return an empty annotation on unmatched chunks.
- Parameters:
- valuebool
whether or not to return an empty annotation on unmatched chunks.