Replies: 2 comments 15 replies
-
Hi,
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi,
* The operating system is macOS Catalina
* I used "pip install spark-nlp==3.2.3 pyspark" to install spark-nlp
* source code: (I follow exact link: https://github.com/JohnSnowLabs/spark-nlp)
# Import Spark NLP
from sparknlp.base import *
from sparknlp.annotator import *
from sparknlp.pretrained import PretrainedPipeline
import sparknlp
# Start SparkSession with Spark NLP
spark = sparknlp.start()
# Download a pre-trained pipeline
pipeline = PretrainedPipeline('explain_document_dl', lang='en')
# Your testing dataset
text = """
The Mona Lisa is a 16th century oil painting created by Leonardo.
It's held at the Louvre in Paris.
"""
# Annotate your testing dataset
result = pipeline.annotate(text)
Thanks,
Will
…On Fri, Sep 24, 2021 at 1:26 AM Maziyar Panahi ***@***.***> wrote:
Hi,
Could you please share
- what is your operating system?
- how do you install PyPI spark-nlp (conda or pypi)
- and please provide your full code?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#6152 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADKXE33YSQDKOLMCE2JVHYLUDQY2LANCNFSM5EUV53CQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Beta Was this translation helpful? Give feedback.
15 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I tried to use Spark NLP with jupyter notebook, following instructions and sample code in the NLP link: https://github.com/JohnSnowLabs/spark-nlp. However, i found errors "Py4JJavaError: An error occurred while calling z:com.johnsnowlabs.nlp.pretrained.PythonResourceDownloader.getDownloadSize.
: java.lang.NullPointerException". in calling PretrainedPipeline as below: Any help? Thank you very much.
My system settings:
java version "1.8.0_211"
Java(TM) SE Runtime Environment (build 1.8.0_211-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.211-b12, mixed mode)
Spark version: 3.1.2
SparkNLP version: 3.2.3
python version: 3.7.5
Beta Was this translation helpful? Give feedback.
All reactions