sparknlp_jsl
#
Subpackages#
sparknlp_jsl.annotator
sparknlp_jsl.annotator.assertion
sparknlp_jsl.annotator.chunker
sparknlp_jsl.annotator.classification
sparknlp_jsl.annotator.context
sparknlp_jsl.annotator.deid
sparknlp_jsl.annotator.disambiguation
sparknlp_jsl.annotator.embeddings
sparknlp_jsl.annotator.er
sparknlp_jsl.annotator.generic_classifier
sparknlp_jsl.annotator.matcher
sparknlp_jsl.annotator.medical_llm
sparknlp_jsl.annotator.merge
sparknlp_jsl.annotator.ner
sparknlp_jsl.annotator.normalizer
sparknlp_jsl.annotator.params
sparknlp_jsl.annotator.qa
sparknlp_jsl.annotator.rag
sparknlp_jsl.annotator.re
sparknlp_jsl.annotator.regex
sparknlp_jsl.annotator.resolution
sparknlp_jsl.annotator.seq2seq
sparknlp_jsl.annotator.splitter
sparknlp_jsl.annotator.windowed
sparknlp_jsl.annotator.annotation_merger
sparknlp_jsl.annotator.chunk2_token
sparknlp_jsl.annotator.doc2_chunk_internal
sparknlp_jsl.annotator.document_filterer_by_classifier
sparknlp_jsl.annotator.document_filterer_by_ner
sparknlp_jsl.annotator.feature_assembler
sparknlp_jsl.annotator.filtering_params
sparknlp_jsl.annotator.flattener
sparknlp_jsl.annotator.handle_exception_params
sparknlp_jsl.annotator.multi_chunk2_doc
sparknlp_jsl.annotator.resolution2_chunk
sparknlp_jsl.annotator.router
sparknlp_jsl.annotator.source_tracking_metadata_params
sparknlp_jsl.annotator.tf_graph_builder
sparknlp_jsl.annotator.white_black_list_params
sparknlp_jsl.common
sparknlp_jsl.finance
sparknlp_jsl.legal
sparknlp_jsl.llm
sparknlp_jsl.transpiler
sparknlp_jsl.utils
sparknlp_jsl.utils.alab_utils
sparknlp_jsl.utils.conll_parse
sparknlp_jsl.utils.deidentification_utils
sparknlp_jsl.utils.imports
sparknlp_jsl.utils.java_helper
sparknlp_jsl.utils.licensed_annotator_type
sparknlp_jsl.utils.log_parse
sparknlp_jsl.utils.ner_utils
sparknlp_jsl.utils.ocr_nlp_processor
sparknlp_jsl.utils.ocr_utils
sparknlp_jsl.utils.risk_adjustment_utils
sparknlp_jsl.utils.run_transpiled_code
sparknlp_jsl.utils.training_log_parser_utils
sparknlp_jsl.utils.visualner_annotations_parser
Submodules#
sparknlp_jsl.alab
sparknlp_jsl.base
sparknlp_jsl.compatibility
sparknlp_jsl.custom_transformer
sparknlp_jsl.deidentification_module
sparknlp_jsl.eval
sparknlp_jsl.functions
sparknlp_jsl.internal
sparknlp_jsl.modelTracer
sparknlp_jsl.pipeline_output_parser
sparknlp_jsl.pipeline_tracer
sparknlp_jsl.pretrained
sparknlp_jsl.structured_deidentification
sparknlp_jsl.text_to_documents_columns
sparknlp_jsl.training
sparknlp_jsl.training_log_parser
sparknlp_jsl.updateModels
sparknlp_jsl.util
Package Contents#
Functions#
|
Gets John Snow Labs credentials |
|
Gets the library settings |
Gets the public version of Spark NLP |
|
|
Starts a SparkSession with default parameters for Spark NLP Licensed |
|
Gets the version of Spark NLP |
Attributes#
- get_credentials(spark)#
Gets John Snow Labs credentials
- Parameters:
spark (SparkSession) – SparkSession
- Returns:
(secretKey, keyId, token)
- Return type:
tuple
- library_settings(spark)#
Gets the library settings
- Parameters:
spark (SparkSession) – SparkSession
- Returns:
Library settings
- Return type:
str
- load_license_validator()#
- pub_version()#
Gets the public version of Spark NLP
- Returns:
Public version of Spark NLP
- Return type:
str
- start(secret: str, gpu: bool = False, apple_silicon: bool = False, aarch64=False, public: str = '', params: dict = None)#
Starts a SparkSession with default parameters for Spark NLP Licensed
The default parameters would result in the equivalent of:
SparkSession.builder \ .appName("Spark NLP Licensed") \ .master("local[*]") \ .config("spark.driver.memory", "32G") \ .config("spark.serializer", "org.apache.spark.serializer.KryoSerializer") \ .config("spark.kryoserializer.buffer.max", "2000M") \ .config("spark.driver.maxResultSize", "0") \ .config("spark.files.overwrite", "true") \ .config("spark.extraListeners", "com.johnsnowlabs.license.LicenseLifeCycleManager") \ .config("spark.jars", "https://pypi.johnsnowlabs.com/|secret|/spark-nlp-jsl-|release|.jar") \ .config("spark.jars.packages", "com.johnsnowlabs.nlp:spark-nlp_2.12:|release|") \ .getOrCreate()
- Parameters:
secret (str) – Your secret key
gpu (bool) – Whether to use GPU or not
apple_silicon (bool) – Whether to use M1 or not
aarch64 (bool) – Whether to use aarch64 or not
public (str) – Spark NLP version
params (dict) – SparkSession params
- Returns:
SparkSession with Spark NLP Licensed
- Return type:
SparkSession
- version()#
Gets the version of Spark NLP
- Returns:
Version of Spark NLP
- Return type:
str
- annotators#
- size_regex#
- transformer_seq_classification#
- version_regex#