Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gh140 configure auto build spark #18

Open
wants to merge 29 commits into
base: 160-release-candidate
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
1a566f7
GH140_Configure_auto_build_spark
Aug 7, 2020
e8f8509
GH140_Configure_auto_build_spark
Aug 7, 2020
aea637e
GH140_Configure_auto_build_spark
Aug 9, 2020
0076001
GH140_Configure_auto_build_spark
Aug 9, 2020
fee6c15
GH140_Configure_auto_build_spark
Aug 9, 2020
6338c14
GH140_Configure_auto_build_spark
Aug 9, 2020
cc13c80
GH140_Configure_auto_build_spark
Aug 10, 2020
9579927
GH140_Configure_auto_build_spark
Aug 10, 2020
659fc2e
GH140_Configure_auto_build_spark
Aug 10, 2020
bbf527e
GH140_Configure_auto_build_spark
Aug 10, 2020
89d0f9d
GH140_Configure_auto_build_spark
Aug 10, 2020
104a542
GH140_Configure_auto_build_spark
Aug 10, 2020
1621031
Updated UpdateTextPosition notebook
mykolamelnykml Aug 11, 2020
4584a69
GH140_Configure_auto_build_spark
Aug 11, 2020
fdc6902
GH140_Configure_auto_build_spark
Aug 11, 2020
6e70f6c
GH140_Configure_auto_build_spark
Aug 11, 2020
78ceb1d
GH140_Configure_auto_build_spark
Aug 12, 2020
82db63f
Merge remote-tracking branch 'origin/GH140_Configure_auto_build_spark…
Aug 12, 2020
1bf7bf2
GH140_Configure_auto_build_spark
Aug 12, 2020
a197cd2
GH140_Configure_auto_build_spark
Aug 12, 2020
60a9d3a
GH140_Configure_auto_build_spark
Aug 12, 2020
2ace3e3
GH140_Configure_auto_build_spark
Aug 12, 2020
754889b
GH140_Configure_auto_build_spark
Aug 12, 2020
40230c1
GH140_Configure_auto_build_spark
Aug 12, 2020
549d572
GH140_Configure_auto_build_spark
Aug 12, 2020
a49068b
GH140_Configure_auto_build_spark
Aug 12, 2020
27d6272
GH140_Configure_auto_build_spark
Aug 12, 2020
aa40940
GH140_Configure_auto_build_spark
Aug 12, 2020
d19de54
GH140_Configure_auto_build_spark
Aug 12, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 12 additions & 9 deletions jupyter/SparkOcrDicomDeIdentification.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@
"spark = start(secret=secret,\n",
" nlp_secret=nlp_secret,\n",
" jar_path=spark_ocr_jar_path,\n",
" nlp_version=\"2.5.0\",\n",
" nlp_internal=True)\n",
" nlp_version=\"2.5.5\",\n",
" nlp_internal=\"2.5.5\")\n",
"\n",
"spark"
]
Expand Down Expand Up @@ -212,15 +212,18 @@
}
],
"source": [
"from sparknlp.annotator import *\n",
"from sparknlp.base import *\n",
"import sparknlp_jsl\n",
"from sparknlp_jsl.annotator import *\n",
"\n",
"\n",
"import sparkocr\n",
"from sparkocr.transformers import *\n",
"from sparkocr.utils import display_image\n",
"\n",
"import sparknlp\n",
"import sparknlp_jsl\n",
"from sparknlp.base import *\n",
"from sparknlp.annotator import *\n",
"from sparknlp_jsl.annotator import *\n",
"\n",
"print(f\"Spark NLP version: {sparknlp.version()}\")\n",
"print(f\"Spark NLP internal version: {sparknlp_jsl.version()}\")\n",
"print(f\"Spark OCR version: {sparkocr.version()}\")"
Expand Down Expand Up @@ -1251,11 +1254,11 @@
"dicom_path = '././data/dicom/*.dcm'\n",
"dicom_df = spark.read.format(\"binaryFile\").load(dicom_path)\n",
"\n",
"\n",
"# for image in DicomToImage().transform(dicom_df).collect():\n",
"# print(image.exception)\n",
"# print(image.metadata)\n",
"# display_image(image.image)\n",
" "
"# display_image(image.image)\n"
]
},
{
Expand Down Expand Up @@ -2225,4 +2228,4 @@
},
"nbformat": 4,
"nbformat_minor": 2
}
}
6 changes: 3 additions & 3 deletions jupyter/SparkOcrPositionFinder.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"outputs": [],
"source": [
"# install from PYPI using secret\n",
"%pip install spark-nlp==2.4.3\n",
"%pip install spark-nlp==2.5.5\n",
"%pip install spark-ocr==$version --user --extra-index-url=https://pypi.johnsnowlabs.com/$secret --upgrade"
]
},
Expand Down Expand Up @@ -145,7 +145,7 @@
"if license:\n",
" os.environ['JSL_OCR_LICENSE'] = license\n",
"\n",
"spark = start(secret=secret, jar_path=spark_ocr_jar_path, nlp_version=\"2.4.3\")\n",
"spark = start(secret=secret, jar_path=spark_ocr_jar_path, nlp_version=\"2.5.5\")\n",
"spark"
]
},
Expand Down Expand Up @@ -417,4 +417,4 @@
},
"nbformat": 4,
"nbformat_minor": 2
}
}
11 changes: 6 additions & 5 deletions jupyter/SparkOcrUpdateTextPosition.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"outputs": [],
"source": [
"# install from PYPI using secret\n",
"%pip install spark-nlp==2.4.5\n",
"%pip install spark-nlp==2.5.5\n",
"%pip install spark-ocr==$version --user --extra-index-url=https://pypi.johnsnowlabs.com/$secret --upgrade"
]
},
Expand Down Expand Up @@ -144,7 +144,7 @@
"if license:\n",
" os.environ['JSL_OCR_LICENSE'] = license\n",
"\n",
"spark = start(secret=secret, jar_path=spark_ocr_jar_path, nlp_version=\"2.4.5\")\n",
"spark = start(secret=secret, jar_path=spark_ocr_jar_path, nlp_version=\"2.5.5\")\n",
"spark"
]
},
Expand Down Expand Up @@ -190,13 +190,14 @@
" .setOutputCol(\"tokens\")\n",
"\n",
" spell = NorvigSweetingModel().pretrained(\"spellcheck_norvig\", \"en\") \\\n",
" .setInputCols(\"tokens\") \\\n",
" .setInputCols([\"tokens\"]) \\\n",
" .setOutputCol(\"spell\")\n",
" \n",
" tokenAssem = TokenAssembler() \\\n",
" .setInputCols(\"spell\") \\\n",
" .setInputCols([\"document\",\"spell\"]) \\\n",
" .setOutputCol(\"newDocs\")\n",
"\n",
"\n",
" updatedText = UpdateTextPosition() \\\n",
" .setInputCol(\"positions\") \\\n",
" .setOutputCol(\"output_positions\") \\\n",
Expand Down Expand Up @@ -346,4 +347,4 @@
},
"nbformat": 4,
"nbformat_minor": 2
}
}
Loading