From fbfa009855be983a70de241fb08be0375080b7fd Mon Sep 17 00:00:00 2001 From: Lev Date: Tue, 19 Dec 2023 13:53:01 +0200 Subject: [PATCH] jsl tab (#831) --- ...ogrammingLanguageSelectScalaPythonNLU.html | 2 +- .../programmingLanguageSwitcherScalaPython.js | 69 ++++++++++++---- docs/_includes/templates/anno_template.md | 2 +- .../templates/approach_model_template.md | 6 +- .../templates/licensed_anno_template.md | 2 +- .../licensed_approach_model_template.md | 6 +- .../licensed_training_anno_template.md | 2 +- .../licensed_training_dataset_entry.md | 2 +- .../templates/training_anno_template.md | 2 +- .../templates/training_dataset_entry.md | 2 +- .../annotator_entries/SentenceEmbeddings.md | 2 +- docs/en/annotator_entries/StopWordsCleaner.md | 2 +- docs/en/auxiliary.md | 4 +- docs/en/concepts.md | 28 +++---- docs/en/evaluation.md | 20 ++--- docs/en/jsl/nlp_pipelines.md | 4 +- docs/en/ocr.md | 12 +-- docs/en/ocr_object_detection.md | 6 +- docs/en/ocr_pipeline_components.md | 82 +++++++++---------- docs/en/ocr_table_recognition.md | 6 +- docs/en/ocr_visual_document_understanding.md | 8 +- docs/en/third-party-projects.md | 2 +- docs/en/training.md | 2 +- 23 files changed, 156 insertions(+), 117 deletions(-) diff --git a/docs/_includes/programmingLanguageSelectScalaPythonNLU.html b/docs/_includes/programmingLanguageSelectScalaPythonNLU.html index 0b3ec59e9a..0559803a4d 100644 --- a/docs/_includes/programmingLanguageSelectScalaPythonNLU.html +++ b/docs/_includes/programmingLanguageSelectScalaPythonNLU.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/_includes/scripts/programmingLanguageSwitcherScalaPython.js b/docs/_includes/scripts/programmingLanguageSwitcherScalaPython.js index 0c2a7c2cce..b77e167f97 100644 --- a/docs/_includes/scripts/programmingLanguageSwitcherScalaPython.js +++ b/docs/_includes/scripts/programmingLanguageSwitcherScalaPython.js @@ -5,22 +5,49 @@ function tabs({tabsWrapperSelector, tabsParentSelector, tabsSelector, tabsConten const tabsWrapper = document.querySelectorAll(tabsWrapperSelector); + + + //Detecting all tabs tabsWrapper.forEach(tab => { const tabsParent = tab.querySelector(tabsParentSelector), tabsLi = tab.querySelectorAll(tabsSelector), tabsContent = tab.querySelectorAll(tabsContentSelector); + let jslFlag = false; + + + tabsContent.forEach(item => { + if(item.classList.contains('jsl-block')) { + jslFlag = true; + return; + } + }) + + + if(!jslFlag) { + tabsLi.forEach(item => { + if(item.classList.contains('tab-li-jsl')) { + item.remove(); + return; + } + }) + } + + const tabsLiAfter = tab.querySelectorAll(tabsSelector), + tabsContentAfter = tab.querySelectorAll(tabsContentSelector); + + //Hiding all tabs function hideTabsContent() { - if(Array.from(tabsLi).length != 0) { - tabsContent.forEach(item => { - item.style.display = 'none'; + if(Array.from(tabsLiAfter).length != 0) { + tabsContentAfter.forEach(item => { + item.style.display = 'none'; }); } - if(Array.from(tabsLi).length != 0) { - tabsLi.forEach(item => { + if(Array.from(tabsLiAfter).length != 0) { + tabsLiAfter.forEach(item => { item.classList.remove(activeClass); }); } @@ -28,11 +55,11 @@ function tabs({tabsWrapperSelector, tabsParentSelector, tabsSelector, tabsConten //Show active tabs function showTabContent(i = 0) { - if(Array.from(tabsContent).length != 0) { - tabsContent[i].style.display = "block"; + if(Array.from(tabsContentAfter).length != 0) { + tabsContentAfter[i].style.display = "block"; } - if(Array.from(tabsLi).length != 0) { - tabsLi[i].classList.add(activeClass); + if(Array.from(tabsLiAfter).length != 0) { + tabsLiAfter[i].classList.add(activeClass); } } @@ -42,7 +69,7 @@ function tabs({tabsWrapperSelector, tabsParentSelector, tabsSelector, tabsConten const target = event.target; if(target && target.classList.contains(tabsSelector.slice(1))) { - tabsLi.forEach((item, i) => { + tabsLiAfter.forEach((item, i) => { if(target == item) { hideTabsContent(); try{showTabContent(i);}catch(e){} @@ -79,19 +106,30 @@ tabs({ activeClass: 'tabheader_active' }); tabs({ + tabsWrapperSelector: '.tabs-wrapper', + tabsParentSelector: '.tabs-python-scala-head', + tabsSelector: '.tab-python-scala-li', + tabsContentSelector: '.tabs-item', + activeClass: 'tabheader_active' +}); + + + + +/* tabs({ tabsWrapperSelector: '.tabs-box', tabsParentSelector: '.tabs-python-scala-head', tabsSelector: '.tab-python-scala-li', tabsContentSelector: '.tabs-box .highlighter-rouge', activeClass: 'tabheader_active' -}); -tabs({ +}); */ +/* tabs({ tabsWrapperSelector: '.tabs-box', tabsParentSelector: '.tabs-model-aproach-head', tabsSelector: '.tab-li-model-aproach', tabsContentSelector: '.tabs-python-scala-box', activeClass: 'tabheader_active' -}); +}); */ tabs({ tabsWrapperSelector: '.tabs-box', tabsParentSelector: '.tabs-model-aproach-head', @@ -99,10 +137,11 @@ tabs({ tabsContentSelector: '.tabs-box .highlighter-rouge', activeClass: 'tabheader_active' }); + tabs({ - tabsWrapperSelector: '.tabs-wrapper', + tabsWrapperSelector: '.tabs-new', tabsParentSelector: '.tabs-python-scala-head', tabsSelector: '.tab-python-scala-li', - tabsContentSelector: '.tabs-item', + tabsContentSelector: '.tabs-new .highlighter-rouge', activeClass: 'tabheader_active' }); \ No newline at end of file diff --git a/docs/_includes/templates/anno_template.md b/docs/_includes/templates/anno_template.md index 6b8526b95d..ac678d8654 100644 --- a/docs/_includes/templates/anno_template.md +++ b/docs/_includes/templates/anno_template.md @@ -33,7 +33,7 @@ Show Example -
+
{% include programmingLanguageSelectScalaPython.html %} diff --git a/docs/_includes/templates/approach_model_template.md b/docs/_includes/templates/approach_model_template.md index ab8d1769ab..aa38ff3e86 100644 --- a/docs/_includes/templates/approach_model_template.md +++ b/docs/_includes/templates/approach_model_template.md @@ -1,5 +1,5 @@ -
+
## {{include.title}} @@ -36,7 +36,7 @@ Show Example -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -87,7 +87,7 @@ Show Example -
+
{% include programmingLanguageSelectScalaPython.html %} diff --git a/docs/_includes/templates/licensed_anno_template.md b/docs/_includes/templates/licensed_anno_template.md index 959fd6019f..013e11422d 100644 --- a/docs/_includes/templates/licensed_anno_template.md +++ b/docs/_includes/templates/licensed_anno_template.md @@ -33,7 +33,7 @@ Show Example -
+
{% include programmingLanguageSelectScalaPython.html %} diff --git a/docs/_includes/templates/licensed_approach_model_template.md b/docs/_includes/templates/licensed_approach_model_template.md index 84010a1ead..597213a6dd 100644 --- a/docs/_includes/templates/licensed_approach_model_template.md +++ b/docs/_includes/templates/licensed_approach_model_template.md @@ -1,5 +1,5 @@ -
+
## {{include.title}} @@ -36,7 +36,7 @@ Show Example -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -93,7 +93,7 @@ Show Example -
+
{% include programmingLanguageSelectScalaPython.html %} diff --git a/docs/_includes/templates/licensed_training_anno_template.md b/docs/_includes/templates/licensed_training_anno_template.md index 4275ad70c1..806509a03a 100644 --- a/docs/_includes/templates/licensed_training_anno_template.md +++ b/docs/_includes/templates/licensed_training_anno_template.md @@ -23,7 +23,7 @@ Show Example -
+
{% include programmingLanguageSelectScalaPython.html %} diff --git a/docs/_includes/templates/licensed_training_dataset_entry.md b/docs/_includes/templates/licensed_training_dataset_entry.md index e7d368f90f..a91329ad38 100644 --- a/docs/_includes/templates/licensed_training_dataset_entry.md +++ b/docs/_includes/templates/licensed_training_dataset_entry.md @@ -27,7 +27,7 @@ Refer to the documentation for more details on the API: Show Example -
+
{% include programmingLanguageSelectScalaPython.html %} diff --git a/docs/_includes/templates/training_anno_template.md b/docs/_includes/templates/training_anno_template.md index e1e8bae020..b70aefb60d 100644 --- a/docs/_includes/templates/training_anno_template.md +++ b/docs/_includes/templates/training_anno_template.md @@ -33,7 +33,7 @@ Show Example -
+
{% include programmingLanguageSelectScalaPython.html %} diff --git a/docs/_includes/templates/training_dataset_entry.md b/docs/_includes/templates/training_dataset_entry.md index accf390b3c..1d23b67d48 100644 --- a/docs/_includes/templates/training_dataset_entry.md +++ b/docs/_includes/templates/training_dataset_entry.md @@ -27,7 +27,7 @@ Refer to the documentation for more details on the API: Show Example -
+
{% include programmingLanguageSelectScalaPython.html %} diff --git a/docs/en/annotator_entries/SentenceEmbeddings.md b/docs/en/annotator_entries/SentenceEmbeddings.md index cffb6497cd..5babfbb696 100644 --- a/docs/en/annotator_entries/SentenceEmbeddings.md +++ b/docs/en/annotator_entries/SentenceEmbeddings.md @@ -15,7 +15,7 @@ and the [SentenceEmbeddingsTestSpec](https://github.com/JohnSnowLabs/spark-nlp/b **TIP:** Here is how you can explode and convert these embeddings into `Vectors` or what's known as `Feature` column so it can be used in Spark ML regression or clustering functions: -
+
{% include programmingLanguageSelectScalaPython.html %} diff --git a/docs/en/annotator_entries/StopWordsCleaner.md b/docs/en/annotator_entries/StopWordsCleaner.md index 03e760e5bb..28662d40e5 100644 --- a/docs/en/annotator_entries/StopWordsCleaner.md +++ b/docs/en/annotator_entries/StopWordsCleaner.md @@ -26,7 +26,7 @@ and [StopWordsCleanerTestSpec](https://github.com/JohnSnowLabs/spark-nlp/blob/ma > **NOTE:** > If you need to `setStopWords` from a text file, you can first read and convert it into an array of string as follows. -
+
{% include programmingLanguageSelectScalaPython.html %} diff --git a/docs/en/auxiliary.md b/docs/en/auxiliary.md index 636d708308..51891175fd 100644 --- a/docs/en/auxiliary.md +++ b/docs/en/auxiliary.md @@ -49,7 +49,7 @@ In Scala, importing inner functions brings implicits that allow these functions **Imports:** -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -70,7 +70,7 @@ import com.johnsnowlabs.nlp.Annotation Complete usage examples can be seen here: https://github.com/JohnSnowLabs/spark-nlp-workshop/blob/234-release-candidate/jupyter/annotation/english/spark-nlp-basics/spark-nlp-basics-functions.ipynb -
+
{% include programmingLanguageSelectScalaPython.html %} diff --git a/docs/en/concepts.md b/docs/en/concepts.md index 46abd47c44..a7a74dcbbc 100644 --- a/docs/en/concepts.md +++ b/docs/en/concepts.md @@ -84,7 +84,7 @@ You can checkout a demo application of the Explain Document ML pipeline here: Explain Document ML (**explain_document_ml**) is a pretrained pipeline that does a little bit of everything NLP related. Let's try it out in scala. Note that the first time you run the below code it might take longer since it downloads the pretrained pipeline from our servers! -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -154,7 +154,7 @@ different components in a spark dataframe. Remember than when starting jupyter notebook from pyspark or when running the spark-shell for scala, a Spark Session is started in the background by default within the namespace 'scala'. -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -233,7 +233,7 @@ The output of the previous DataFrame was in terms of Annotation objects. This ou running the code: -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -265,7 +265,7 @@ OUTPUT: What if we want to deal with just the resulting annotations? We can use the **Finisher** annotator, retrieve the Explain Document ML pipeline, and add them together in a Spark ML Pipeline. Remember that pretrained pipelines expect the input column to be named "text".
-
+
{% include programmingLanguageSelectScalaPython.html %} ```python @@ -355,7 +355,7 @@ token or a lemma, as both are of type token. Since version 1.5.0 we are making necessary imports easy to reach, **base.\_** will include general Spark NLP transformers and concepts, while **annotator.\_** will include all annotators that we currently provide. We also need Spark ML pipelines. -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -379,7 +379,7 @@ annotated. There is a special **transformer** that does this for us: the **DocumentAssembler**, it creates the first annotation of type **Document** which may be used by annotators down the road. -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -402,7 +402,7 @@ val documentAssembler = new DocumentAssembler(). In this quick example, we now proceed to identify the sentences in the input document. SentenceDetector requires a Document annotation, which is provided by the DocumentAssembler output, and it's itself a Document type token. The Tokenizer requires a Document annotation type. That means it works both with DocumentAssembler or SentenceDetector output. In the following example we use the sentence output. -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -448,7 +448,7 @@ val finisher = new Finisher(). At the end of each pipeline or any stage that was done by Spark NLP, you may want to get results out whether onto another pipeline or simply write them on disk. The `Finisher` annotator helps you to clean the metadata (if it's set to true) and output the results into an array: -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -486,7 +486,7 @@ df.withColumn("tmp", explode(col("chunk"))).select("tmp.*") Now we want to put all this together and retrieve the results, we use a Pipeline for this. We use the same data in fit() that we will use in transform since none of the pipeline stages have a training stage. -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -543,7 +543,7 @@ amounts of data. This means, we do not input a Spark Dataframe, but a string or Pipelines, you need to input an already trained (fit) Spark ML Pipeline. It's transform() stage is converted into annotate() instead. -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -638,7 +638,7 @@ converting them into an AnnotatorModel. **Example:** -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -663,7 +663,7 @@ seamlessly so it is important to have this concept handy. Once a **Example:** -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -687,7 +687,7 @@ maximum). To use them, simply plug in a trained (fitted) pipeline. **Example:** -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -723,7 +723,7 @@ same intention. **Example:** -
+
{% include programmingLanguageSelectScalaPython.html %} diff --git a/docs/en/evaluation.md b/docs/en/evaluation.md index 67679c6582..6268e1a000 100644 --- a/docs/en/evaluation.md +++ b/docs/en/evaluation.md @@ -23,7 +23,7 @@ The results will display on the console or to an [MLflow tracking UI](https://ml **Example:** -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -63,7 +63,7 @@ My sister goes to Munich. **Example for annotator:** -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -91,7 +91,7 @@ norvigSpellEvaluation.computeAccuracyAnnotator(trainFile, spell) **Example for pretrained model:** -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -139,7 +139,7 @@ My sister goes to Munich. **Example for annotator:** -
+
{% include programmingLanguageSelectScalaPython.html %} ```python @@ -165,7 +165,7 @@ symSpellEvaluation.computeAccuracyAnnotator(trainFile, spell) **Example for pretrained model:** -
+
{% include programmingLanguageSelectScalaPython.html %} ```python @@ -195,7 +195,7 @@ to display accuracy for entity I-PER and B-PER set "IOB" whereas just for entity **Example:** -
+
{% include programmingLanguageSelectScalaPython.html %} ```python @@ -237,7 +237,7 @@ nerDLEvaluation.computeAccuracyAnnotator(trainFile, nerApproach, embeddings) **Example for pretrained model:** -
+
{% include programmingLanguageSelectScalaPython.html %} ```python @@ -268,7 +268,7 @@ to display accuracy for entity I-PER and B-PER set "IOB" whereas just for entity **Example:** -
+
{% include programmingLanguageSelectScalaPython.html %} ```python @@ -309,7 +309,7 @@ nerCrfEvaluation.computeAccuracyAnnotator(trainFile, nerTagger, embeddings) **Example for pretrained model:** -
+
{% include programmingLanguageSelectScalaPython.html %} ```python @@ -338,7 +338,7 @@ You can evaluate POS either by training an annotator or by using a pretrained mo **Example for annotator:** -
+
{% include programmingLanguageSelectScalaPython.html %} ```python diff --git a/docs/en/jsl/nlp_pipelines.md b/docs/en/jsl/nlp_pipelines.md index 013223d349..c9a7c57867 100644 --- a/docs/en/jsl/nlp_pipelines.md +++ b/docs/en/jsl/nlp_pipelines.md @@ -124,7 +124,7 @@ different components in a spark dataframe. Remember than when starting jupyter notebook from pyspark or when running the spark-shell for scala, a Spark Session is started in the background by default within the namespace 'scala'. -
+
```python @@ -242,7 +242,7 @@ annotated. There is a special **transformer** that does this for us: the **DocumentAssembler**, it creates the first annotation of type **Document** which may be used by annotators down the road. -
+
```python diff --git a/docs/en/ocr.md b/docs/en/ocr.md index 7ce66af562..115e8d9444 100644 --- a/docs/en/ocr.md +++ b/docs/en/ocr.md @@ -60,7 +60,7 @@ Below, you can follow a more theoretical and thorough quick start guide. The following code example creates an OCR Pipeline for processing image(s). The image file(s) can contain complex layout like columns, tables, images inside. -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -139,7 +139,7 @@ data.show() Next sample provides an example of OCR Pipeline for processing PDF files containing image data. In this case, the [PdfToImage](ocr_pipeline_components#pdftoimage) transformer is used to convert PDF file to a set of images. -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -226,7 +226,7 @@ For each PDF file, this pipeline will: - run OCR and save output to the `text` column -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -326,7 +326,7 @@ data.show() Next code segments provide an example of streaming OCR pipeline. It processes images and stores results to memory table. -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -392,7 +392,7 @@ query = modelPipeline.transform(dataFrame) \ For getting results from memory table following code could be used: -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -429,7 +429,7 @@ In this case OCR transformers would fill _exception_ column that contains _trans Here is an output with exception when try to process js file using OCR pipeline: -
+
{% include programmingLanguageSelectScalaPython.html %} diff --git a/docs/en/ocr_object_detection.md b/docs/en/ocr_object_detection.md index 41b9c789ff..9a825a62d2 100644 --- a/docs/en/ocr_object_detection.md +++ b/docs/en/ocr_object_detection.md @@ -52,7 +52,7 @@ Detector support following labels: **Example:** -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -172,7 +172,7 @@ It's based on CRAFT network architecture. **Example:** -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -305,7 +305,7 @@ Currently, it's available only on Python side. **Example:** -
+
{% include programmingLanguageSelectScalaPython.html %} diff --git a/docs/en/ocr_pipeline_components.md b/docs/en/ocr_pipeline_components.md index 6ee254374c..b7ee4bc83c 100644 --- a/docs/en/ocr_pipeline_components.md +++ b/docs/en/ocr_pipeline_components.md @@ -66,7 +66,7 @@ NOTE: For setting parameters use `setParamName` method. **Example** -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -175,7 +175,7 @@ Number of partitions should be equal to number of cores/executors. **Example:** -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -251,7 +251,7 @@ Read images and store them as single page PDF documents.
-
+
{% include programmingLanguageSelectScalaPython.html %} @@ -343,7 +343,7 @@ Read PDF document, run OCR and render results to PDF document.
-
+
{% include programmingLanguageSelectScalaPython.html %} @@ -472,7 +472,7 @@ muliplepage PDF document. **Example:** -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -600,7 +600,7 @@ println(tmpFile) **Example:** -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -788,7 +788,7 @@ As output generate column with tables and tables text chunks coordinates (rows/c **Example:** -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -893,7 +893,7 @@ NOTE: For setting parameters use `setParamName` method. **Example** -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -959,7 +959,7 @@ NOTE: For setting parameters use `setParamName` method. **Example** -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -1029,7 +1029,7 @@ NOTE: For setting parameters use `setParamName` method. **Example** -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -1099,7 +1099,7 @@ NOTE: For setting parameters use `setParamName` method. **Example** -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -1169,7 +1169,7 @@ NOTE: For setting parameters use `setParamName` method. **Example** -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -1239,7 +1239,7 @@ data.select("pdf").show() **Scala example:** -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -1307,7 +1307,7 @@ data.select("image", "pagenum", "meta").show() **Scala example:** -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -1395,7 +1395,7 @@ data.select("dicom").show() **Example:** -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -1470,7 +1470,7 @@ Next section describes the transformers for image pre-processing: scaling, binar **Scala example:** -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -1563,7 +1563,7 @@ one of the methods with params: **Example:** -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -1661,7 +1661,7 @@ data.storeImage("transformed_image") **Example:** -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -1761,7 +1761,7 @@ Supported Methods: **Example:** -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -1872,7 +1872,7 @@ Supported methods: **Example:** -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -1965,7 +1965,7 @@ It supports keeping original ratio of image by padding the image in case fixed o **Example:** -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -2045,7 +2045,7 @@ data.storeImage("scaled_image") **Example:** -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -2129,7 +2129,7 @@ data.storeImage("scaled_image") **Example:** -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -2232,7 +2232,7 @@ data.storeImage("corrected_image") **Example:** -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -2379,7 +2379,7 @@ It supports removing: **Example:** -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -2461,7 +2461,7 @@ It supports following operation: **Example:** -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -2556,7 +2556,7 @@ for r in result.select("image", "corrected_image").collect(): **Example:** -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -2655,7 +2655,7 @@ data.storeImage("cropped_image") **Example:** -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -2749,7 +2749,7 @@ data.show() **Example:** -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -2865,7 +2865,7 @@ data.show() **Example:** -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -2996,7 +2996,7 @@ val result = modelPipeline.transform(df) **Example:** -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -3129,7 +3129,7 @@ to _outputCol_ and positions with font size to 'positionsCol' column. **Example:** -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -3244,7 +3244,7 @@ others. One could almost say they feed on and grow on ideas. **Example:** -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -3353,7 +3353,7 @@ the PDF as an invisible text layout with an original image. | --- | --- | --- | --- | | outputCol | string | pdf | Recognized text rendered to PDF | -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -3448,7 +3448,7 @@ to _outputCol_ column in HOCR format. **Example:** -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -3625,7 +3625,7 @@ to _outputCol_ and positions with font size to 'positionsCol' column. **Example:** -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -3765,7 +3765,7 @@ Next section describes the extra transformers **Example:** -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -3908,7 +3908,7 @@ results.show() **Example:** -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -4056,7 +4056,7 @@ Output format is json. **Example:** -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -4191,7 +4191,7 @@ Output: **Example:** -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -4305,7 +4305,7 @@ HocrTokenizer puts to metadata coordinates and ocr confidence. **Example:** -
+
{% include programmingLanguageSelectScalaPython.html %} diff --git a/docs/en/ocr_table_recognition.md b/docs/en/ocr_table_recognition.md index f6f97adc8a..e4ac6fce3c 100644 --- a/docs/en/ocr_table_recognition.md +++ b/docs/en/ocr_table_recognition.md @@ -44,7 +44,7 @@ It's based on CascadeTabNet which used Cascade mask Region-based CNN High-Resolu **Example:** -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -167,7 +167,7 @@ Current implementation support few algorithm for extract cells: **Example:** -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -281,7 +281,7 @@ to _outputCol_ as TableContainer structure. **Example:** -
+
{% include programmingLanguageSelectScalaPython.html %} diff --git a/docs/en/ocr_visual_document_understanding.md b/docs/en/ocr_visual_document_understanding.md index 7d757106fe..7f36930500 100644 --- a/docs/en/ocr_visual_document_understanding.md +++ b/docs/en/ocr_visual_document_understanding.md @@ -54,7 +54,7 @@ to 10 different classes (Resume, News, Note, Advertisement, Scientific, Report, **Example:** -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -179,7 +179,7 @@ scanned receipt images. **Example:** -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -301,7 +301,7 @@ Check the Models Hub for available models. **Example:** -
+
{% include programmingLanguageSelectScalaPython.html %} @@ -441,7 +441,7 @@ It can detect relations only for key/value in same line. **Example:** -
+
{% include programmingLanguageSelectScalaPython.html %} diff --git a/docs/en/third-party-projects.md b/docs/en/third-party-projects.md index 58195bc643..ce40135ca7 100644 --- a/docs/en/third-party-projects.md +++ b/docs/en/third-party-projects.md @@ -42,7 +42,7 @@ For more information see the [User Guide](/api/python/third_party/Comet.html) an Show Example -
+
```python # Metrics while training an annotator can be logged with for example: diff --git a/docs/en/training.md b/docs/en/training.md index e3a0bf855f..d30f8227f6 100644 --- a/docs/en/training.md +++ b/docs/en/training.md @@ -29,7 +29,7 @@ In order to train a Norvig or Symmetric Spell Checkers, we need to get corpus da **Example:** -
+
{% include programmingLanguageSelectScalaPython.html %}