diff --git a/docs/_posts/ahmedlone127/2023-05-19-match_pattern_en.md b/docs/_posts/ahmedlone127/2023-05-19-match_pattern_en.md index 4865e422088735..bfb5f90b83c92c 100644 --- a/docs/_posts/ahmedlone127/2023-05-19-match_pattern_en.md +++ b/docs/_posts/ahmedlone127/2023-05-19-match_pattern_en.md @@ -33,16 +33,7 @@ The match_pattern is a pretrained pipeline that we can use to process text with ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("match_pattern", "en", "clinical/models") - result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-05-20-analyze_sentiment_en.md b/docs/_posts/ahmedlone127/2023-05-20-analyze_sentiment_en.md index 16f8004a7107ae..b7d0aa182eb859 100644 --- a/docs/_posts/ahmedlone127/2023-05-20-analyze_sentiment_en.md +++ b/docs/_posts/ahmedlone127/2023-05-20-analyze_sentiment_en.md @@ -34,39 +34,7 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} - -```python - -from sparknlp.pretrained import PretrainedPipeline - -pipeline = PretrainedPipeline('analyze_sentiment', lang = 'en') - -result = pipeline.fullAnnotate("""Demonicus is a movie turned into a video game! I just love the story and the things that goes on in the film.It is a B-film ofcourse but that doesn`t bother one bit because its made just right and the music was rad! Horror and sword fight freaks,buy this movie now!""") - - -``` -```scala - -import com.johnsnowlabs.nlp.pretrained.PretrainedPipeline -val pipeline = new PretrainedPipeline("analyze_sentiment", lang = "en") - -val result = pipeline.fullAnnotate("""Demonicus is a movie turned into a video game! I just love the story and the things that goes on in the film.It is a B-film ofcourse but that doesn`t bother one bit because its made just right and the music was rad! Horror and sword fight freaks,buy this movie now!""") - -``` - -{:.nlu-block} -```python - -import nlu -text = ["""Demonicus is a movie turned into a video game! I just love the story and the things that goes on in the film.It is a B-film ofcourse but that doesn`t bother one bit because its made just right and the music was rad! Horror and sword fight freaks,buy this movie now!"""] -result_df = nlu.load('en.classify').predict(text) -result_df - -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-20-clean_pattern_en.md b/docs/_posts/ahmedlone127/2023-05-20-clean_pattern_en.md index 87defa5ce1ce92..7c68325df1b011 100644 --- a/docs/_posts/ahmedlone127/2023-05-20-clean_pattern_en.md +++ b/docs/_posts/ahmedlone127/2023-05-20-clean_pattern_en.md @@ -34,33 +34,7 @@ The clean_pattern is a pretrained pipeline that we can use to process text with ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('clean_pattern', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() -``` -```scala - - -val pipeline = new PretrainedPipeline("clean_pattern", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.clean.pattern').predict(text) -result_df -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-20-clean_stop_en.md b/docs/_posts/ahmedlone127/2023-05-20-clean_stop_en.md index 2cafdec0c1da18..949f6dbcb9d8f1 100644 --- a/docs/_posts/ahmedlone127/2023-05-20-clean_stop_en.md +++ b/docs/_posts/ahmedlone127/2023-05-20-clean_stop_en.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('clean_stop', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("clean_stop", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.clean.stop').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-20-entity_recognizer_lg_fr.md b/docs/_posts/ahmedlone127/2023-05-20-entity_recognizer_lg_fr.md index 5786fc442e5e44..9ddbf5591d4d9d 100644 --- a/docs/_posts/ahmedlone127/2023-05-20-entity_recognizer_lg_fr.md +++ b/docs/_posts/ahmedlone127/2023-05-20-entity_recognizer_lg_fr.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_lg', lang = 'fr') -annotations = pipeline.fullAnnotate(""Bonjour de John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_lg", lang = "fr") -val result = pipeline.fullAnnotate("Bonjour de John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Bonjour de John Snow Labs! ""] -result_df = nlu.load('fr.ner').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-20-entity_recognizer_md_fr.md b/docs/_posts/ahmedlone127/2023-05-20-entity_recognizer_md_fr.md index 1ddb38d5994928..ed2b3c47d29a5d 100644 --- a/docs/_posts/ahmedlone127/2023-05-20-entity_recognizer_md_fr.md +++ b/docs/_posts/ahmedlone127/2023-05-20-entity_recognizer_md_fr.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_md', lang = 'fr') -annotations = pipeline.fullAnnotate(""Bonjour de John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_md", lang = "fr") -val result = pipeline.fullAnnotate("Bonjour de John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Bonjour de John Snow Labs! ""] -result_df = nlu.load('fr.ner.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-20-explain_document_dl_en.md b/docs/_posts/ahmedlone127/2023-05-20-explain_document_dl_en.md index 2cb06faa2f8753..a904a73ca50847 100644 --- a/docs/_posts/ahmedlone127/2023-05-20-explain_document_dl_en.md +++ b/docs/_posts/ahmedlone127/2023-05-20-explain_document_dl_en.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline('explain_document_dl', lang = 'en') -annotations = pipeline.fullAnnotate("The Mona Lisa is an oil painting from the 16th century.")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_dl", lang = "en") -val result = pipeline.fullAnnotate("The Mona Lisa is an oil painting from the 16th century.")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = ["The Mona Lisa is an oil painting from the 16th century."] -result_df = nlu.load('en.explain.dl').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-20-explain_document_md_de.md b/docs/_posts/ahmedlone127/2023-05-20-explain_document_md_de.md index 716a8c7ef93bda..df429bdeeaa112 100644 --- a/docs/_posts/ahmedlone127/2023-05-20-explain_document_md_de.md +++ b/docs/_posts/ahmedlone127/2023-05-20-explain_document_md_de.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_md', lang = 'de') -annotations = pipeline.fullAnnotate(""Hallo aus John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_md", lang = "de") -val result = pipeline.fullAnnotate("Hallo aus John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hallo aus John Snow Labs! ""] -result_df = nlu.load('de.explain.document').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-20-explain_document_md_fr.md b/docs/_posts/ahmedlone127/2023-05-20-explain_document_md_fr.md index 7242cd87aba84a..80db50d9153398 100644 --- a/docs/_posts/ahmedlone127/2023-05-20-explain_document_md_fr.md +++ b/docs/_posts/ahmedlone127/2023-05-20-explain_document_md_fr.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_md', lang = 'fr') -annotations = pipeline.fullAnnotate(""Bonjour de John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_md", lang = "fr") -val result = pipeline.fullAnnotate("Bonjour de John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Bonjour de John Snow Labs! ""] -result_df = nlu.load('fr.explain.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-20-explain_document_ml_en.md b/docs/_posts/ahmedlone127/2023-05-20-explain_document_ml_en.md index 710aa1f053ff23..a74f8c38d2ff18 100644 --- a/docs/_posts/ahmedlone127/2023-05-20-explain_document_ml_en.md +++ b/docs/_posts/ahmedlone127/2023-05-20-explain_document_ml_en.md @@ -34,33 +34,7 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline('explain_document_ml', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() -``` -```scala - - -val pipeline = new PretrainedPipeline("explain_document_ml", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.explain').predict(text) -result_df -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-20-match_datetime_en.md b/docs/_posts/ahmedlone127/2023-05-20-match_datetime_en.md index 3fcefb1d7eb349..c26ea7dd887e84 100644 --- a/docs/_posts/ahmedlone127/2023-05-20-match_datetime_en.md +++ b/docs/_posts/ahmedlone127/2023-05-20-match_datetime_en.md @@ -32,35 +32,7 @@ DateMatcher based on yyyy/MM/dd ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -pipeline_local = PretrainedPipeline('match_datetime') - -tres = pipeline_local.fullAnnotate(input_list)[0] -for dte in tres['date']: - sent = tres['sentence'][int(dte.metadata['sentence'])] - print (f'text/chunk {sent.result[dte.begin:dte.end+1]} | mapped_date: {dte.result}') -``` -```scala - -import com.johnsnowlabs.nlp.pretrained.PretrainedPipeline import com.johnsnowlabs.nlp.SparkNLP -SparkNLP.version() - -val testData = spark.createDataFrame(Seq( (1, "David visited the restaurant yesterday with his family. -He also visited and the day before, but at that time he was alone. -David again visited today with his colleagues. -He and his friends really liked the food and hoped to visit again tomorrow."))).toDF("id", "text") - -val pipeline = PretrainedPipeline("match_datetime", lang="en") - -val annotation = pipeline.transform(testData) - -annotation.show() -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-20-match_pattern_en.md b/docs/_posts/ahmedlone127/2023-05-20-match_pattern_en.md index 055d160c31f8bf..0e48aa6ecbea9d 100644 --- a/docs/_posts/ahmedlone127/2023-05-20-match_pattern_en.md +++ b/docs/_posts/ahmedlone127/2023-05-20-match_pattern_en.md @@ -33,16 +33,7 @@ The match_pattern is a pretrained pipeline that we can use to process text with ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("match_pattern", "en", "clinical/models") - result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-05-20-movies_sentiment_analysis_en.md b/docs/_posts/ahmedlone127/2023-05-20-movies_sentiment_analysis_en.md index 95b2ce6a9e50d9..fe6a089067f250 100644 --- a/docs/_posts/ahmedlone127/2023-05-20-movies_sentiment_analysis_en.md +++ b/docs/_posts/ahmedlone127/2023-05-20-movies_sentiment_analysis_en.md @@ -33,16 +33,7 @@ The movies_sentiment_analysis is a pretrained pipeline that we can use to proces ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("movies_sentiment_analysis", "en") -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-05-20-recognize_entities_bert_en.md b/docs/_posts/ahmedlone127/2023-05-20-recognize_entities_bert_en.md index 926f24a29a77c3..069a6fcfad8eec 100644 --- a/docs/_posts/ahmedlone127/2023-05-20-recognize_entities_bert_en.md +++ b/docs/_posts/ahmedlone127/2023-05-20-recognize_entities_bert_en.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('recognize_entities_bert', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("recognize_entities_bert", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.ner.bert').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-20-recognize_entities_dl_en.md b/docs/_posts/ahmedlone127/2023-05-20-recognize_entities_dl_en.md index fd6967e6b74e1c..4487b2ba269aad 100644 --- a/docs/_posts/ahmedlone127/2023-05-20-recognize_entities_dl_en.md +++ b/docs/_posts/ahmedlone127/2023-05-20-recognize_entities_dl_en.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('recognize_entities_dl', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("recognize_entities_dl", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.ner').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-21-albert_base_token_classifier_conll03_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-21-albert_base_token_classifier_conll03_pipeline_en.md index c67e8675e84d6b..6b0e05370f8273 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-albert_base_token_classifier_conll03_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-21-albert_base_token_classifier_conll03_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [albert_base_token_classifier_co ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("albert_base_token_classifier_conll03_pipeline", lang = "en") - -pipeline.annotate("My name is John and I work at John Snow Labs.") -``` -```scala - - -val pipeline = new PretrainedPipeline("albert_base_token_classifier_conll03_pipeline", lang = "en") -pipeline.annotate("My name is John and I work at John Snow Labs.")) -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-21-albert_large_token_classifier_conll03_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-21-albert_large_token_classifier_conll03_pipeline_en.md index d1d0a027101f98..b8021add1f0219 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-albert_large_token_classifier_conll03_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-21-albert_large_token_classifier_conll03_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [albert_large_token_classifier_c ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("albert_large_token_classifier_conll03_pipeline", lang = "en") - -pipeline.annotate("My name is John and I work at John Snow Labs.") -``` -```scala - - -val pipeline = new PretrainedPipeline("albert_large_token_classifier_conll03_pipeline", lang = "en") -pipeline.annotate("My name is John and I work at John Snow Labs.")) -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-21-albert_xlarge_token_classifier_conll03_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-21-albert_xlarge_token_classifier_conll03_pipeline_en.md index 1e109782e0404e..1231adcb2910fc 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-albert_xlarge_token_classifier_conll03_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-21-albert_xlarge_token_classifier_conll03_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [albert_xlarge_token_classifier_ ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("albert_xlarge_token_classifier_conll03_pipeline", lang = "en") - -pipeline.annotate("My name is John and I work at John Snow Labs.") -``` -```scala - - -val pipeline = new PretrainedPipeline("albert_xlarge_token_classifier_conll03_pipeline", lang = "en") -pipeline.annotate("My name is John and I work at John Snow Labs.")) -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-21-analyze_sentimentdl_glove_imdb_en.md b/docs/_posts/ahmedlone127/2023-05-21-analyze_sentimentdl_glove_imdb_en.md index bb3533370321b9..e28d3e58a4d962 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-analyze_sentimentdl_glove_imdb_en.md +++ b/docs/_posts/ahmedlone127/2023-05-21-analyze_sentimentdl_glove_imdb_en.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('analyze_sentimentdl_glove_imdb', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("analyze_sentimentdl_glove_imdb", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.sentiment.glove').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-21-bert_sequence_classifier_age_news_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-21-bert_sequence_classifier_age_news_pipeline_en.md index 5d271a57a015e8..1b2d289850778c 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-bert_sequence_classifier_age_news_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-21-bert_sequence_classifier_age_news_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [bert_sequence_classifier_age_ne ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -news_pipeline = PretrainedPipeline("bert_sequence_classifier_age_news_pipeline", lang = "en") - -news_pipeline.annotate("Microsoft has taken its first step into the metaverse.") -``` -```scala - - -val news_pipeline = new PretrainedPipeline("bert_sequence_classifier_age_news_pipeline", lang = "en") -news_pipeline.annotate("Microsoft has taken its first step into the metaverse.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-21-bert_sequence_classifier_trec_coarse_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-21-bert_sequence_classifier_trec_coarse_pipeline_en.md index 52cb640bdcccfa..262f0a71cba827 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-bert_sequence_classifier_trec_coarse_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-21-bert_sequence_classifier_trec_coarse_pipeline_en.md @@ -34,23 +34,7 @@ The TREC dataset for question classification consists of open-domain, fact-based ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -trec_pipeline = PretrainedPipeline("bert_sequence_classifier_trec_coarse_pipeline", lang = "en") - -trec_pipeline.annotate("Germany is the largest country in Europe economically.") -``` -```scala - - -val trec_pipeline = new PretrainedPipeline("bert_sequence_classifier_trec_coarse_pipeline", lang = "en") -trec_pipeline.annotate("Germany is the largest country in Europe economically.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-21-bert_token_classifier_dutch_udlassy_ner_pipeline_nl.md b/docs/_posts/ahmedlone127/2023-05-21-bert_token_classifier_dutch_udlassy_ner_pipeline_nl.md index 49ca3e37d26312..a5e2d2b07c75a4 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-bert_token_classifier_dutch_udlassy_ner_pipeline_nl.md +++ b/docs/_posts/ahmedlone127/2023-05-21-bert_token_classifier_dutch_udlassy_ner_pipeline_nl.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on the top of [bert_token_classifier_dutch_udl ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -pipeline = PretrainedPipeline("bert_token_classifier_dutch_udlassy_ner_pipeline", lang = "nl") - -pipeline.annotate("Mijn naam is Peter Fergusson. Ik woon sinds oktober 2011 in New York en werk 5 jaar bij Tesla Motor.") -``` -```scala - -val pipeline = new PretrainedPipeline("bert_token_classifier_dutch_udlassy_ner_pipeline", lang = "nl") -pipeline.annotate("Mijn naam is Peter Fergusson. Ik woon sinds oktober 2011 in New York en werk 5 jaar bij Tesla Motor.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-21-bert_token_classifier_hi_en_ner_pipeline_hi.md b/docs/_posts/ahmedlone127/2023-05-21-bert_token_classifier_hi_en_ner_pipeline_hi.md index 0b61c71f04caf9..727f842171f4f4 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-bert_token_classifier_hi_en_ner_pipeline_hi.md +++ b/docs/_posts/ahmedlone127/2023-05-21-bert_token_classifier_hi_en_ner_pipeline_hi.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on [bert_token_classifier_hi_en_ner](https://n ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -pipeline = PretrainedPipeline("bert_token_classifier_hi_en_ner_pipeline", lang = "hi") - -pipeline.annotate("रिलायंस इंडस्ट्रीज़ लिमिटेड (Reliance Industries Limited) एक भारतीय संगुटिका नियंत्रक कंपनी है, जिसका मुख्यालय मुंबई, महाराष्ट्र (Maharashtra) में स्थित है।रतन नवल टाटा (28 दिसंबर 1937, को मुम्बई (Mumbai), में जन्मे) टाटा समुह के वर्तमान अध्यक्ष, जो भारत की सबसे बड़ी व्यापारिक समूह है, जिसकी स्थापना जमशेदजी टाटा ने की और उनके परिवार की पीढियों ने इसका विस्तार किया और इसे दृढ़ बनाया।") -``` -```scala - -val pipeline = new PretrainedPipeline("bert_token_classifier_hi_en_ner_pipeline", lang = "hi") -val pipeline.annotate("रिलायंस इंडस्ट्रीज़ लिमिटेड (Reliance Industries Limited) एक भारतीय संगुटिका नियंत्रक कंपनी है, जिसका मुख्यालय मुंबई, महाराष्ट्र (Maharashtra) में स्थित है।रतन नवल टाटा (28 दिसंबर 1937, को मुम्बई (Mumbai), में जन्मे) टाटा समुह के वर्तमान अध्यक्ष, जो भारत की सबसे बड़ी व्यापारिक समूह है, जिसकी स्थापना जमशेदजी टाटा ने की और उनके परिवार की पीढियों ने इसका विस्तार किया और इसे दृढ़ बनाया।") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-21-bert_token_classifier_scandi_ner_pipeline_xx.md b/docs/_posts/ahmedlone127/2023-05-21-bert_token_classifier_scandi_ner_pipeline_xx.md index e87e9642c6170b..62139e7aaf7e8c 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-bert_token_classifier_scandi_ner_pipeline_xx.md +++ b/docs/_posts/ahmedlone127/2023-05-21-bert_token_classifier_scandi_ner_pipeline_xx.md @@ -32,20 +32,7 @@ This pretrained pipeline is built on [bert_token_classifier_scandi_ner](https:// ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -scandiner_pipeline = PretrainedPipeline("bert_token_classifier_scandi_ner_pipeline", lang = "xx") -scandiner_pipeline.annotate("Hans er professor ved Statens Universitet, som ligger i København, og han er en rigtig københavner.") -``` -```scala - -val scandiner_pipeline = new PretrainedPipeline("bert_token_classifier_scandi_ner_pipeline", lang = "xx") - -val scandiner_pipeline.annotate("Hans er professor ved Statens Universitet, som ligger i København, og han er en rigtig københavner.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-21-distilbert_base_token_classifier_masakhaner_pipeline_xx.md b/docs/_posts/ahmedlone127/2023-05-21-distilbert_base_token_classifier_masakhaner_pipeline_xx.md index d0bc40acb6ec8d..49b6b871c0b531 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-distilbert_base_token_classifier_masakhaner_pipeline_xx.md +++ b/docs/_posts/ahmedlone127/2023-05-21-distilbert_base_token_classifier_masakhaner_pipeline_xx.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on the top of [distilbert_base_token_classifie ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -masakhaner_pipeline = PretrainedPipeline("distilbert_base_token_classifier_masakhaner_pipeline", lang = "xx") - -masakhaner_pipeline.annotate("Ilé-iṣẹ́ẹ Mohammed Sani Musa, Activate Technologies Limited, ni ó kó ẹ̀rọ Ìwé-pélébé Ìdìbò Alálòpẹ́ (PVCs) tí a lò fún ìbò ọdún-un 2019, ígbà tí ó jẹ́ òǹdíjedupò lábẹ́ ẹgbẹ́ olóṣèlúu tí ó ń tukọ̀ ètò ìṣèlú lọ́wọ́ All rogressives Congress (APC) fún Aṣojú Ìlà-Oòrùn Niger, ìyẹn gẹ́gẹ́ bí ilé iṣẹ́ aṣèwádìí, Premium Times ṣe tẹ̀ ẹ́ jáde.") -``` -```scala - -val masakhaner_pipeline = new PretrainedPipeline("distilbert_base_token_classifier_masakhaner_pipeline", lang = "xx") -masakhaner_pipeline.annotate("Ilé-iṣẹ́ẹ Mohammed Sani Musa, Activate Technologies Limited, ni ó kó ẹ̀rọ Ìwé-pélébé Ìdìbò Alálòpẹ́ (PVCs) tí a lò fún ìbò ọdún-un 2019, ígbà tí ó jẹ́ òǹdíjedupò lábẹ́ ẹgbẹ́ olóṣèlúu tí ó ń tukọ̀ ètò ìṣèlú lọ́wọ́ All rogressives Congress (APC) fún Aṣojú Ìlà-Oòrùn Niger, ìyẹn gẹ́gẹ́ bí ilé iṣẹ́ aṣèwádìí, Premium Times ṣe tẹ̀ ẹ́ jáde.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-21-distilbert_token_classifier_typo_detector_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-21-distilbert_token_classifier_typo_detector_pipeline_en.md index cfeb1b836428a1..498f3354ec4a19 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-distilbert_token_classifier_typo_detector_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-21-distilbert_token_classifier_typo_detector_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [distilbert_token_classifier_typ ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -typo_pipeline = PretrainedPipeline("distilbert_token_classifier_typo_detector_pipeline", lang = "en") - -typo_pipeline.annotate("He had also stgruggled with addiction during his tine in Congress.") -``` -```scala - - -val typo_pipeline = new PretrainedPipeline("distilbert_token_classifier_typo_detector_pipeline", lang = "en") -typo_pipeline.annotate("He had also stgruggled with addiction during his tine in Congress.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-21-distilbert_token_classifier_typo_detector_pipeline_is.md b/docs/_posts/ahmedlone127/2023-05-21-distilbert_token_classifier_typo_detector_pipeline_is.md index f71f8d6fbd6c55..92700cc73669fa 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-distilbert_token_classifier_typo_detector_pipeline_is.md +++ b/docs/_posts/ahmedlone127/2023-05-21-distilbert_token_classifier_typo_detector_pipeline_is.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on the top of [distilbert_token_classifier_typ ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -typo_pipeline = PretrainedPipeline("distilbert_token_classifier_typo_detector_pipeline", lang = "is") - -typo_pipeline.annotate("Það er miög auðvelt að draga marktækar álykanir af texta með Spark NLP.") -``` -```scala - -val typo_pipeline = new PretrainedPipeline("distilbert_token_classifier_typo_detector_pipeline", lang = "is") -typo_pipeline.annotate("Það er miög auðvelt að draga marktækar álykanir af texta með Spark NLP.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-21-distilroberta_base_token_classifier_ontonotes_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-21-distilroberta_base_token_classifier_ontonotes_pipeline_en.md index 4213fa76ba1ff2..7c3088631df4db 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-distilroberta_base_token_classifier_ontonotes_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-21-distilroberta_base_token_classifier_ontonotes_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [distilroberta_base_token_classi ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("distilroberta_base_token_classifier_ontonotes_pipeline", lang = "en") - -pipeline.annotate("My name is John and I have been working at John Snow Labs since November 2020.") -``` -```scala - - -val pipeline = new PretrainedPipeline("distilroberta_base_token_classifier_ontonotes_pipeline", lang = "en") -pipeline.annotate("My name is John and I have been working at John Snow Labs since November 2020.")) -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_lg_da.md b/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_lg_da.md index 8955e9f3dade76..d99e3609165658 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_lg_da.md +++ b/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_lg_da.md @@ -33,25 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("entity_recognizer_lg", "da") - -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -{:.nlu-block} -```python -import nlu -nlu.load("da.ner.lg").predict("""I love johnsnowlabs! """) -``` - -
- {:.model-param}
diff --git a/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_lg_de.md b/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_lg_de.md index cc54bb0dab8119..36e9fcacdab55b 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_lg_de.md +++ b/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_lg_de.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_lg', lang = 'de') -annotations = pipeline.fullAnnotate(""Hallo aus John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_lg", lang = "de") -val result = pipeline.fullAnnotate("Hallo aus John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hallo aus John Snow Labs! ""] -result_df = nlu.load('de.ner.recognizer.lg').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_lg_es.md b/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_lg_es.md index 75475181299702..2b71e0b7426164 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_lg_es.md +++ b/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_lg_es.md @@ -33,25 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("entity_recognizer_lg", "es") - -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -{:.nlu-block} -```python -import nlu -nlu.load("es.ner.lg").predict("""I love johnsnowlabs! """) -``` - -
- {:.model-param}
diff --git a/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_lg_fi.md b/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_lg_fi.md index 55ebf123c1df74..993586c78c5028 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_lg_fi.md +++ b/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_lg_fi.md @@ -33,26 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("entity_recognizer_lg", "fi") - -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -{:.nlu-block} -```python -import nlu -nlu.load("fi.ner.lg").predict("""I love johnsnowlabs! """) -``` - -
- {:.model-param}
diff --git a/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_lg_nl.md b/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_lg_nl.md index dff7cd9661e907..1c5d740b65f070 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_lg_nl.md +++ b/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_lg_nl.md @@ -33,25 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("entity_recognizer_lg", "nl") - -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -{:.nlu-block} -```python -import nlu -nlu.load("nl.ner.lg").predict("""I love johnsnowlabs! """) -``` - -
- {:.model-param}
diff --git a/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_lg_no.md b/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_lg_no.md index 8699ac760ad0f3..37a59b0796c4cf 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_lg_no.md +++ b/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_lg_no.md @@ -33,25 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("entity_recognizer_lg", "no") - -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -{:.nlu-block} -```python -import nlu -nlu.load("no.ner.lg").predict("""I love johnsnowlabs! """) -``` - -
- {:.model-param}
diff --git a/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_lg_pl.md b/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_lg_pl.md index b25eb321ead9c0..322cf40e2bc802 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_lg_pl.md +++ b/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_lg_pl.md @@ -33,25 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("entity_recognizer_lg", "pl") - -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -{:.nlu-block} -```python -import nlu -nlu.load("pl.ner.lg").predict("""I love johnsnowlabs! """) -``` - -
- {:.model-param}
diff --git a/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_lg_pt.md b/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_lg_pt.md index 141a06d8077ec9..80deb5025851cb 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_lg_pt.md +++ b/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_lg_pt.md @@ -33,25 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("entity_recognizer_lg", "pt") - -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -{:.nlu-block} -```python -import nlu -nlu.load("pt.ner.lg").predict("""I love johnsnowlabs! """) -``` - -
- {:.model-param}
diff --git a/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_lg_ru.md b/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_lg_ru.md index fcf058e50dc668..39a1c27dfc0fe5 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_lg_ru.md +++ b/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_lg_ru.md @@ -33,25 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("entity_recognizer_lg", "ru") - -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -{:.nlu-block} -```python -import nlu -nlu.load("ru.ner.lg").predict("""I love johnsnowlabs! """) -``` - -
- {:.model-param}
diff --git a/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_lg_sv.md b/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_lg_sv.md index 7f3490502e1367..0a1a16fac9b1f8 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_lg_sv.md +++ b/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_lg_sv.md @@ -33,25 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("entity_recognizer_lg", "sv") - -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -{:.nlu-block} -```python -import nlu -nlu.load("sv.ner.lg").predict("""I love johnsnowlabs! """) -``` - -
- {:.model-param}
diff --git a/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_md_da.md b/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_md_da.md index 65da905933269c..9a242227e8641f 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_md_da.md +++ b/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_md_da.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_md', lang = 'da') -annotations = pipeline.fullAnnotate(""Hej fra John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_md", lang = "da") -val result = pipeline.fullAnnotate("Hej fra John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hej fra John Snow Labs! ""] -result_df = nlu.load('da.ner.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_md_de.md b/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_md_de.md index a9a6c2bdd55d90..3661a875c83343 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_md_de.md +++ b/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_md_de.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_md', lang = 'de') -annotations = pipeline.fullAnnotate(""Hallo aus John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_md", lang = "de") -val result = pipeline.fullAnnotate("Hallo aus John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hallo aus John Snow Labs! ""] -result_df = nlu.load('de.ner.recognizer').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_md_es.md b/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_md_es.md index 3529cfbc437fe0..4c8aaa9f5a64b1 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_md_es.md +++ b/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_md_es.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_md', lang = 'es') -annotations = pipeline.fullAnnotate(""Hola de John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_md", lang = "es") -val result = pipeline.fullAnnotate("Hola de John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hola de John Snow Labs! ""] -result_df = nlu.load('es.ner.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_md_fi.md b/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_md_fi.md index e67072c399a524..1dcc4094f5f962 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_md_fi.md +++ b/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_md_fi.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_md', lang = 'fi') -annotations = pipeline.fullAnnotate(""Hei John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_md", lang = "fi") -val result = pipeline.fullAnnotate("Hei John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hei John Snow Labs! ""] -result_df = nlu.load('fi.ner.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_md_no.md b/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_md_no.md index 3f575cab2d81aa..f5a70f9e33b688 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_md_no.md +++ b/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_md_no.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_md', lang = 'no') -annotations = pipeline.fullAnnotate(""Hei fra John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_md", lang = "no") -val result = pipeline.fullAnnotate("Hei fra John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hei fra John Snow Labs! ""] -result_df = nlu.load('no.ner.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_md_ru.md b/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_md_ru.md index 0c1f23aa64fe70..73c4520e8fca99 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_md_ru.md +++ b/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_md_ru.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_md', lang = 'ru') -annotations = pipeline.fullAnnotate(""Здравствуйте из Джона Снежных Лабораторий! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_md", lang = "ru") -val result = pipeline.fullAnnotate("Здравствуйте из Джона Снежных Лабораторий! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Здравствуйте из Джона Снежных Лабораторий! ""] -result_df = nlu.load('ru.ner.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_md_sv.md b/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_md_sv.md index a3be16bd99c74f..bb39d3e3d8c00e 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_md_sv.md +++ b/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_md_sv.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_md', lang = 'sv') -annotations = pipeline.fullAnnotate(""Hej från John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_md", lang = "sv") -val result = pipeline.fullAnnotate("Hej från John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hej från John Snow Labs! ""] -result_df = nlu.load('sv.ner.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_sm_da.md b/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_sm_da.md index 303ae0989da47d..7081936b631e6e 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_sm_da.md +++ b/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_sm_da.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_sm', lang = 'da') -annotations = pipeline.fullAnnotate(""Hej fra John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_sm", lang = "da") -val result = pipeline.fullAnnotate("Hej fra John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hej fra John Snow Labs! ""] -result_df = nlu.load('da.ner').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_sm_es.md b/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_sm_es.md index 481dbe7d2460cc..fd22b0474f3d2e 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_sm_es.md +++ b/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_sm_es.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_sm', lang = 'es') -annotations = pipeline.fullAnnotate(""Hola de John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_sm", lang = "es") -val result = pipeline.fullAnnotate("Hola de John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hola de John Snow Labs! ""] -result_df = nlu.load('es.ner').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_sm_fi.md b/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_sm_fi.md index 793d02168e2078..6af5cfc1cef5f4 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_sm_fi.md +++ b/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_sm_fi.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_sm', lang = 'fi') -annotations = pipeline.fullAnnotate(""Hei John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_sm", lang = "fi") -val result = pipeline.fullAnnotate("Hei John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hei John Snow Labs! ""] -result_df = nlu.load('fi.ner').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_sm_no.md b/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_sm_no.md index 40887242a00edb..84e09d742e4dca 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_sm_no.md +++ b/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_sm_no.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_sm', lang = 'no') -annotations = pipeline.fullAnnotate(""Hei fra John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_sm", lang = "no") -val result = pipeline.fullAnnotate("Hei fra John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hei fra John Snow Labs! ""] -result_df = nlu.load('no.ner').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_sm_ru.md b/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_sm_ru.md index 2077b8eb5eaf1e..af79802db59e34 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_sm_ru.md +++ b/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_sm_ru.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_sm', lang = 'ru') -annotations = pipeline.fullAnnotate(""Здравствуйте из Джона Снежных Лабораторий! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_sm", lang = "ru") -val result = pipeline.fullAnnotate("Здравствуйте из Джона Снежных Лабораторий! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Здравствуйте из Джона Снежных Лабораторий! ""] -result_df = nlu.load('ru.ner').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_sm_sv.md b/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_sm_sv.md index 26691aca25af85..2063746c4cfcb9 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_sm_sv.md +++ b/docs/_posts/ahmedlone127/2023-05-21-entity_recognizer_sm_sv.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_sm', lang = 'sv') -annotations = pipeline.fullAnnotate(""Hej från John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_sm", lang = "sv") -val result = pipeline.fullAnnotate("Hej från John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hej från John Snow Labs! ""] -result_df = nlu.load('sv.ner').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-21-explain_document_lg_da.md b/docs/_posts/ahmedlone127/2023-05-21-explain_document_lg_da.md index 8084d8e7b4fee4..0138947598d5b3 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-explain_document_lg_da.md +++ b/docs/_posts/ahmedlone127/2023-05-21-explain_document_lg_da.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_lg', lang = 'da') -annotations = pipeline.fullAnnotate(""Hej fra John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_lg", lang = "da") -val result = pipeline.fullAnnotate("Hej fra John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hej fra John Snow Labs! ""] -result_df = nlu.load('da.explain.lg').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-21-explain_document_lg_es.md b/docs/_posts/ahmedlone127/2023-05-21-explain_document_lg_es.md index 440ff38002a317..6c3399bbfcba89 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-explain_document_lg_es.md +++ b/docs/_posts/ahmedlone127/2023-05-21-explain_document_lg_es.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_lg', lang = 'es') -annotations = pipeline.fullAnnotate(""Hola de John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_lg", lang = "es") -val result = pipeline.fullAnnotate("Hola de John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hola de John Snow Labs! ""] -result_df = nlu.load('es.explain.lg').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-21-explain_document_lg_fi.md b/docs/_posts/ahmedlone127/2023-05-21-explain_document_lg_fi.md index dcf425acc83419..dabde7c5fd2afa 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-explain_document_lg_fi.md +++ b/docs/_posts/ahmedlone127/2023-05-21-explain_document_lg_fi.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_lg', lang = 'fi') -annotations = pipeline.fullAnnotate(""Hei John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_lg", lang = "fi") -val result = pipeline.fullAnnotate("Hei John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hei John Snow Labs! ""] -result_df = nlu.load('fi.explain.lg').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-21-explain_document_lg_no.md b/docs/_posts/ahmedlone127/2023-05-21-explain_document_lg_no.md index 5a2c307dbda354..9ad3c6690fa89c 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-explain_document_lg_no.md +++ b/docs/_posts/ahmedlone127/2023-05-21-explain_document_lg_no.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_lg', lang = 'no') -annotations = pipeline.fullAnnotate(""Hei fra John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_lg", lang = "no") -val result = pipeline.fullAnnotate("Hei fra John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hei fra John Snow Labs! ""] -result_df = nlu.load('no.explain.lg').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-21-explain_document_lg_ru.md b/docs/_posts/ahmedlone127/2023-05-21-explain_document_lg_ru.md index a72929290d4ee7..a3e48901c38a09 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-explain_document_lg_ru.md +++ b/docs/_posts/ahmedlone127/2023-05-21-explain_document_lg_ru.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_lg', lang = 'ru') -annotations = pipeline.fullAnnotate(""Здравствуйте из Джона Снежных Лабораторий! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_lg", lang = "ru") -val result = pipeline.fullAnnotate("Здравствуйте из Джона Снежных Лабораторий! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Здравствуйте из Джона Снежных Лабораторий! ""] -result_df = nlu.load('ru.explain.lg').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-21-explain_document_lg_sv.md b/docs/_posts/ahmedlone127/2023-05-21-explain_document_lg_sv.md index 916e0c895d7905..e4d4e3628e32f1 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-explain_document_lg_sv.md +++ b/docs/_posts/ahmedlone127/2023-05-21-explain_document_lg_sv.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_lg', lang = 'sv') -annotations = pipeline.fullAnnotate(""Hej från John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_lg", lang = "sv") -val result = pipeline.fullAnnotate("Hej från John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hej från John Snow Labs! ""] -result_df = nlu.load('sv.explain.lg').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-21-explain_document_md_da.md b/docs/_posts/ahmedlone127/2023-05-21-explain_document_md_da.md index 2ea14f5b2331cd..cfb05e3e471108 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-explain_document_md_da.md +++ b/docs/_posts/ahmedlone127/2023-05-21-explain_document_md_da.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_md', lang = 'da') -annotations = pipeline.fullAnnotate(""Hej fra John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_md", lang = "da") -val result = pipeline.fullAnnotate("Hej fra John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hej fra John Snow Labs! ""] -result_df = nlu.load('da.explain.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-21-explain_document_md_es.md b/docs/_posts/ahmedlone127/2023-05-21-explain_document_md_es.md index 2907d7a7c35f51..d67a50a8102529 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-explain_document_md_es.md +++ b/docs/_posts/ahmedlone127/2023-05-21-explain_document_md_es.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_md', lang = 'es') -annotations = pipeline.fullAnnotate(""Hola de John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_md", lang = "es") -val result = pipeline.fullAnnotate("Hola de John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hola de John Snow Labs! ""] -result_df = nlu.load('es.explain.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-21-explain_document_md_fi.md b/docs/_posts/ahmedlone127/2023-05-21-explain_document_md_fi.md index 71b87ab1245b42..348e59f61e688e 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-explain_document_md_fi.md +++ b/docs/_posts/ahmedlone127/2023-05-21-explain_document_md_fi.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_md', lang = 'fi') -annotations = pipeline.fullAnnotate(""Hei John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_md", lang = "fi") -val result = pipeline.fullAnnotate("Hei John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hei John Snow Labs! ""] -result_df = nlu.load('fi.explain.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-21-explain_document_md_no.md b/docs/_posts/ahmedlone127/2023-05-21-explain_document_md_no.md index 8558af1efebade..02d37c89023037 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-explain_document_md_no.md +++ b/docs/_posts/ahmedlone127/2023-05-21-explain_document_md_no.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_md', lang = 'no') -annotations = pipeline.fullAnnotate(""Hei fra John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_md", lang = "no") -val result = pipeline.fullAnnotate("Hei fra John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hei fra John Snow Labs! ""] -result_df = nlu.load('no.explain.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-21-explain_document_md_ru.md b/docs/_posts/ahmedlone127/2023-05-21-explain_document_md_ru.md index c679540f9b0387..6ba65fd95a81b5 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-explain_document_md_ru.md +++ b/docs/_posts/ahmedlone127/2023-05-21-explain_document_md_ru.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_md', lang = 'ru') -annotations = pipeline.fullAnnotate(""Здравствуйте из Джона Снежных Лабораторий! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_md", lang = "ru") -val result = pipeline.fullAnnotate("Здравствуйте из Джона Снежных Лабораторий! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Здравствуйте из Джона Снежных Лабораторий! ""] -result_df = nlu.load('ru.explain.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-21-explain_document_md_sv.md b/docs/_posts/ahmedlone127/2023-05-21-explain_document_md_sv.md index 0483eb82713997..e278d418a550e7 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-explain_document_md_sv.md +++ b/docs/_posts/ahmedlone127/2023-05-21-explain_document_md_sv.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_md', lang = 'sv') -annotations = pipeline.fullAnnotate(""Hej från John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_md", lang = "sv") -val result = pipeline.fullAnnotate("Hej från John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hej från John Snow Labs! ""] -result_df = nlu.load('sv.explain.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-21-explain_document_sm_da.md b/docs/_posts/ahmedlone127/2023-05-21-explain_document_sm_da.md index 9d60898c5ec6d1..4ac55e5f37dfdb 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-explain_document_sm_da.md +++ b/docs/_posts/ahmedlone127/2023-05-21-explain_document_sm_da.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_sm', lang = 'da') -annotations = pipeline.fullAnnotate(""Hej fra John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_sm", lang = "da") -val result = pipeline.fullAnnotate("Hej fra John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hej fra John Snow Labs! ""] -result_df = nlu.load('da.explain').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-21-explain_document_sm_es.md b/docs/_posts/ahmedlone127/2023-05-21-explain_document_sm_es.md index 9fb4075ae18c3c..29316f66d38b22 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-explain_document_sm_es.md +++ b/docs/_posts/ahmedlone127/2023-05-21-explain_document_sm_es.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_sm', lang = 'es') -annotations = pipeline.fullAnnotate(""Hola de John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_sm", lang = "es") -val result = pipeline.fullAnnotate("Hola de John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hola de John Snow Labs! ""] -result_df = nlu.load('es.explain').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-21-explain_document_sm_fi.md b/docs/_posts/ahmedlone127/2023-05-21-explain_document_sm_fi.md index 85d99ba6092594..fe2f1eaf97840a 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-explain_document_sm_fi.md +++ b/docs/_posts/ahmedlone127/2023-05-21-explain_document_sm_fi.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_sm', lang = 'fi') -annotations = pipeline.fullAnnotate(""Hei John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_sm", lang = "fi") -val result = pipeline.fullAnnotate("Hei John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hei John Snow Labs! ""] -result_df = nlu.load('fi.explain').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-21-explain_document_sm_no.md b/docs/_posts/ahmedlone127/2023-05-21-explain_document_sm_no.md index 21fbb60d5981b6..7d5627c90b13b3 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-explain_document_sm_no.md +++ b/docs/_posts/ahmedlone127/2023-05-21-explain_document_sm_no.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_sm', lang = 'no') -annotations = pipeline.fullAnnotate(""Hei fra John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_sm", lang = "no") -val result = pipeline.fullAnnotate("Hei fra John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hei fra John Snow Labs! ""] -result_df = nlu.load('no.explain').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-21-explain_document_sm_ru.md b/docs/_posts/ahmedlone127/2023-05-21-explain_document_sm_ru.md index 38585aedaa18ff..d12e29fd113830 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-explain_document_sm_ru.md +++ b/docs/_posts/ahmedlone127/2023-05-21-explain_document_sm_ru.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_sm', lang = 'ru') -annotations = pipeline.fullAnnotate(""Здравствуйте из Джона Снежных Лабораторий! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_sm", lang = "ru") -val result = pipeline.fullAnnotate("Здравствуйте из Джона Снежных Лабораторий! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Здравствуйте из Джона Снежных Лабораторий! ""] -result_df = nlu.load('ru.explain').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-21-explain_document_sm_sv.md b/docs/_posts/ahmedlone127/2023-05-21-explain_document_sm_sv.md index ec8aec2971da3f..42da296e420cd1 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-explain_document_sm_sv.md +++ b/docs/_posts/ahmedlone127/2023-05-21-explain_document_sm_sv.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_sm', lang = 'sv') -annotations = pipeline.fullAnnotate(""Hej från John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_sm", lang = "sv") -val result = pipeline.fullAnnotate("Hej från John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hej från John Snow Labs! ""] -result_df = nlu.load('sv.explain').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-21-longformer_base_token_classifier_conll03_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-21-longformer_base_token_classifier_conll03_pipeline_en.md index 23ff94d863572b..c400941b4d06b3 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-longformer_base_token_classifier_conll03_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-21-longformer_base_token_classifier_conll03_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [longformer_base_token_classifie ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("longformer_base_token_classifier_conll03_pipeline", lang = "en") - -pipeline.annotate("My name is John and I am working at John Snow Labs.") -``` -```scala - - -val pipeline = new PretrainedPipeline("longformer_base_token_classifier_conll03_pipeline", lang = "en") -pipeline.annotate("My name is John and I am working at John Snow Labs.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-21-longformer_large_token_classifier_conll03_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-21-longformer_large_token_classifier_conll03_pipeline_en.md index 1172ee55ae06b5..fee32be7ddc148 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-longformer_large_token_classifier_conll03_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-21-longformer_large_token_classifier_conll03_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [longformer_large_token_classifi ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("longformer_large_token_classifier_conll03_pipeline", lang = "en") - -pipeline.annotate("My name is John and I am working at John Snow Labs.") -``` -```scala - - -val pipeline = new PretrainedPipeline("longformer_large_token_classifier_conll03_pipeline", lang = "en") -pipeline.annotate("My name is John and I am working at John Snow Labs.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-21-match_chunks_en.md b/docs/_posts/ahmedlone127/2023-05-21-match_chunks_en.md index 0e7bb1cabc639e..37d5b30f676a40 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-match_chunks_en.md +++ b/docs/_posts/ahmedlone127/2023-05-21-match_chunks_en.md @@ -32,41 +32,7 @@ The pipeline uses regex `
?/*+` ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipeline - -pipeline_local = PretrainedPipeline('match_chunks') - -result = pipeline_local.annotate("David visited the restaurant yesterday with his family. He also visited and the day before, but at that time he was alone. David again visited today with his colleagues. He and his friends really liked the food and hoped to visit again tomorrow.") - -result['chunk'] -``` -```scala - -import com.johnsnowlabs.nlp.pretrained.PretrainedPipeline import com.johnsnowlabs.nlp.SparkNLP - -SparkNLP.version() -val testData = spark.createDataFrame(Seq( (1, "David visited the restaurant yesterday with his family. He also visited and the day before, but at that time he was alone. David again visited today with his colleagues. He and his friends really liked the food and hoped to visit again tomorrow."))).toDF("id", "text") - -val pipeline = PretrainedPipeline("match_chunks", lang="en") - -val annotation = pipeline.transform(testData) - -annotation.show() -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("en.match.chunks").predict("""David visited the restaurant yesterday with his family. He also visited and the day before, but at that time he was alone. David again visited today with his colleagues. He and his friends really liked the food and hoped to visit again tomorrow.""") -``` - -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-21-nerdl_fewnerd_100d_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-21-nerdl_fewnerd_100d_pipeline_en.md index a400d3f53f1cfb..fdb8a8575de607 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-nerdl_fewnerd_100d_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-21-nerdl_fewnerd_100d_pipeline_en.md @@ -34,21 +34,7 @@ This pretrained pipeline is built on Few-NERD model and it detects : ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -fewnerd_pipeline = PretrainedPipeline("nerdl_fewnerd_subentity_100d_pipeline", lang = "en") - -fewnerd_pipeline.annotate("""The Double Down is a sandwich offered by Kentucky Fried Chicken restaurants. He did not see active service again until 1882, when he took part in the Anglo-Egyptian War, and was present at the battle of Tell El Kebir (September 1882), for which he was mentioned in dispatches, received the Egypt Medal with clasp and the 3rd class of the Order of Medjidie, and was appointed a Companion of the Order of the Bath (CB).""") -``` -```scala - -val pipeline = new PretrainedPipeline("nerdl_fewnerd_subentity_100d_pipeline", lang = "en") -val result = pipeline.fullAnnotate("The Double Down is a sandwich offered by Kentucky Fried Chicken restaurants. He did not see active service again until 1882, when he took part in the Anglo-Egyptian War, and was present at the battle of Tell El Kebir (September 1882), for which he was mentioned in dispatches, received the Egypt Medal with clasp and the 3rd class of the Order of Medjidie, and was appointed a Companion of the Order of the Bath (CB).")(0) -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-21-nerdl_fewnerd_subentity_100d_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-21-nerdl_fewnerd_subentity_100d_pipeline_en.md index 6e5bda94df3f1b..f2354f3df356c0 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-nerdl_fewnerd_subentity_100d_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-21-nerdl_fewnerd_subentity_100d_pipeline_en.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on Few-NERD/inter public dataset and it extrac ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -fewnerd_pipeline = PretrainedPipeline("nerdl_fewnerd_subentity_100d_pipeline", lang = "en") - -fewnerd_pipeline.annotate("""12 Corazones ('12 Hearts') is Spanish-language dating game show produced in the United States for the television network Telemundo since January 2005, based on its namesake Argentine TV show format. The show is filmed in Los Angeles and revolves around the twelve Zodiac signs that identify each contestant. In 2008, Ho filmed a cameo in the Steven Spielberg feature film The Cloverfield Paradox, as a news pundit.""") -``` -```scala - -val pipeline = new PretrainedPipeline("nerdl_fewnerd_subentity_100d_pipeline", lang = "en") -val result = pipeline.fullAnnotate("12 Corazones ('12 Hearts') is Spanish-language dating game show produced in the United States for the television network Telemundo since January 2005, based on its namesake Argentine TV show format. The show is filmed in Los Angeles and revolves around the twelve Zodiac signs that identify each contestant. In 2008, Ho filmed a cameo in the Steven Spielberg feature film The Cloverfield Paradox, as a news pundit.")(0) -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-21-nerdl_restaurant_100d_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-21-nerdl_restaurant_100d_pipeline_en.md index b0d7072f07eb69..7998bd9d1a518a 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-nerdl_restaurant_100d_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-21-nerdl_restaurant_100d_pipeline_en.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on the top of [nerdl_restaurant_100d](https:// ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -restaurant_pipeline = PretrainedPipeline("nerdl_restaurant_100d_pipeline", lang = "en") - -restaurant_pipeline.annotate("Hong Kong’s favourite pasta bar also offers one of the most reasonably priced lunch sets in town! With locations spread out all over the territory Sha Tin – Pici’s formidable lunch menu reads like a highlight reel of the restaurant. Choose from starters like the burrata and arugula salad or freshly tossed tuna tartare, and reliable handmade pasta dishes like pappardelle. Finally, round out your effortless Italian meal with a tidy one-pot tiramisu, of course, an espresso to power you through the rest of the day.") -``` -```scala - -val restaurant_pipeline = new PretrainedPipeline("nerdl_restaurant_100d_pipeline", lang = "en") -restaurant_pipeline.annotate("Hong Kong’s favourite pasta bar also offers one of the most reasonably priced lunch sets in town! With locations spread out all over the territory Sha Tin – Pici’s formidable lunch menu reads like a highlight reel of the restaurant. Choose from starters like the burrata and arugula salad or freshly tossed tuna tartare, and reliable handmade pasta dishes like pappardelle. Finally, round out your effortless Italian meal with a tidy one-pot tiramisu, of course, an espresso to power you through the rest of the day.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-21-onto_recognize_entities_bert_base_en.md b/docs/_posts/ahmedlone127/2023-05-21-onto_recognize_entities_bert_base_en.md index 87e96cf134ef92..a5c5ef53878afb 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-onto_recognize_entities_bert_base_en.md +++ b/docs/_posts/ahmedlone127/2023-05-21-onto_recognize_entities_bert_base_en.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('onto_recognize_entities_bert_base', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("onto_recognize_entities_bert_base", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.ner.onto.bert.base').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-21-onto_recognize_entities_bert_large_en.md b/docs/_posts/ahmedlone127/2023-05-21-onto_recognize_entities_bert_large_en.md index b922543e2b7a56..846f9fe71c573f 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-onto_recognize_entities_bert_large_en.md +++ b/docs/_posts/ahmedlone127/2023-05-21-onto_recognize_entities_bert_large_en.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('onto_recognize_entities_bert_large', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("onto_recognize_entities_bert_large", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.ner.onto.bert.large').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-21-onto_recognize_entities_bert_medium_en.md b/docs/_posts/ahmedlone127/2023-05-21-onto_recognize_entities_bert_medium_en.md index 3bc0840d862e29..55dec840aeb4b7 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-onto_recognize_entities_bert_medium_en.md +++ b/docs/_posts/ahmedlone127/2023-05-21-onto_recognize_entities_bert_medium_en.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('onto_recognize_entities_bert_medium', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("onto_recognize_entities_bert_medium", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.ner.onto.bert.medium').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-21-onto_recognize_entities_bert_mini_en.md b/docs/_posts/ahmedlone127/2023-05-21-onto_recognize_entities_bert_mini_en.md index 14b73191a94566..65282f7e045389 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-onto_recognize_entities_bert_mini_en.md +++ b/docs/_posts/ahmedlone127/2023-05-21-onto_recognize_entities_bert_mini_en.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('onto_recognize_entities_bert_mini', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("onto_recognize_entities_bert_mini", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.ner.onto.bert.mini').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-21-onto_recognize_entities_bert_small_en.md b/docs/_posts/ahmedlone127/2023-05-21-onto_recognize_entities_bert_small_en.md index d1cccd62c63532..35c56706a58ffc 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-onto_recognize_entities_bert_small_en.md +++ b/docs/_posts/ahmedlone127/2023-05-21-onto_recognize_entities_bert_small_en.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('onto_recognize_entities_bert_small', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("onto_recognize_entities_bert_small", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.ner.onto.bert.small').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-21-onto_recognize_entities_bert_tiny_en.md b/docs/_posts/ahmedlone127/2023-05-21-onto_recognize_entities_bert_tiny_en.md index 558a056a497f46..f6bf639757575b 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-onto_recognize_entities_bert_tiny_en.md +++ b/docs/_posts/ahmedlone127/2023-05-21-onto_recognize_entities_bert_tiny_en.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('onto_recognize_entities_bert_tiny', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("onto_recognize_entities_bert_tiny", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.ner.onto.bert.tiny').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-21-onto_recognize_entities_electra_base_en.md b/docs/_posts/ahmedlone127/2023-05-21-onto_recognize_entities_electra_base_en.md index fe1c34d91f31e8..946c3f59fb77b7 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-onto_recognize_entities_electra_base_en.md +++ b/docs/_posts/ahmedlone127/2023-05-21-onto_recognize_entities_electra_base_en.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('onto_recognize_entities_electra_base', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("onto_recognize_entities_electra_base", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.ner.onto.electra.base').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-21-onto_recognize_entities_electra_large_en.md b/docs/_posts/ahmedlone127/2023-05-21-onto_recognize_entities_electra_large_en.md index ac1128949d45af..f0603b75a24ed2 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-onto_recognize_entities_electra_large_en.md +++ b/docs/_posts/ahmedlone127/2023-05-21-onto_recognize_entities_electra_large_en.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline('onto_recognize_entities_electra_large', lang = 'en') -annotations = pipeline.fullAnnotate("Hello from John Snow Labs!")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("onto_recognize_entities_electra_large", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.ner.onto.large').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-21-onto_recognize_entities_electra_small_en.md b/docs/_posts/ahmedlone127/2023-05-21-onto_recognize_entities_electra_small_en.md index 3dda6bffca3e74..7946e1c2b4e515 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-onto_recognize_entities_electra_small_en.md +++ b/docs/_posts/ahmedlone127/2023-05-21-onto_recognize_entities_electra_small_en.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('onto_recognize_entities_electra_small', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("onto_recognize_entities_electra_small", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.ner.onto.electra.small').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-21-onto_recognize_entities_lg_en.md b/docs/_posts/ahmedlone127/2023-05-21-onto_recognize_entities_lg_en.md index ed9a31526cc8be..09b5d8473ac50a 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-onto_recognize_entities_lg_en.md +++ b/docs/_posts/ahmedlone127/2023-05-21-onto_recognize_entities_lg_en.md @@ -33,25 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("onto_recognize_entities_lg", "en") - -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -{:.nlu-block} -```python -import nlu -nlu.load("en.ner.onto.lg").predict("""I love johnsnowlabs! """) -``` - -
- {:.model-param}
diff --git a/docs/_posts/ahmedlone127/2023-05-21-onto_recognize_entities_sm_en.md b/docs/_posts/ahmedlone127/2023-05-21-onto_recognize_entities_sm_en.md index 973ef3cece1364..22848bb5a595ca 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-onto_recognize_entities_sm_en.md +++ b/docs/_posts/ahmedlone127/2023-05-21-onto_recognize_entities_sm_en.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('onto_recognize_entities_sm', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("onto_recognize_entities_sm", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.ner.onto.sm').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-21-pos_ud_bokmaal_nb.md b/docs/_posts/ahmedlone127/2023-05-21-pos_ud_bokmaal_nb.md index 0d388eff34fad8..9678e18b957057 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-pos_ud_bokmaal_nb.md +++ b/docs/_posts/ahmedlone127/2023-05-21-pos_ud_bokmaal_nb.md @@ -34,39 +34,7 @@ This model was trained using the dataset available at https://universaldependenc ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -pos = PerceptronModel.pretrained("pos_ud_bokmaal", "nb") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("pos") - -nlp_pipeline = Pipeline(stages=[document_assembler, sentence_detector, tokenizer, pos]) -light_pipeline = LightPipeline(nlp_pipeline.fit(spark.createDataFrame([['']]).toDF("text"))) -results = light_pipeline.fullAnnotate("Annet enn å være kongen i nord, er John Snow en engelsk lege og en leder innen utvikling av anestesi og medisinsk hygiene.") -``` -```scala - -val pos = PerceptronModel.pretrained("pos_ud_bokmaal", "nb") - .setInputCols(Array("document", "token")) - .setOutputCol("pos") - -val pipeline = new Pipeline().setStages(Array(document_assembler, sentence_detector, tokenizer, pos)) -val data = Seq("Annet enn å være kongen i nord, er John Snow en engelsk lege og en leder innen utvikling av anestesi og medisinsk hygiene.").toDF("text") -val result = pipeline.fit(data).transform(data) -``` - -{:.nlu-block} -```python - -import nlu -text = ["""Annet enn å være kongen i nord, er John Snow en engelsk lege og en leder innen utvikling av anestesi og medisinsk hygiene."""] -pos_df = nlu.load('nb.pos.ud_bokmaal').predict(text) -pos_df -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-21-recognize_entities_dl_fa.md b/docs/_posts/ahmedlone127/2023-05-21-recognize_entities_dl_fa.md index 9e6cd9bc8b4e0a..4ee3fa20cb8b34 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-recognize_entities_dl_fa.md +++ b/docs/_posts/ahmedlone127/2023-05-21-recognize_entities_dl_fa.md @@ -32,37 +32,7 @@ The explain_document_dl is a pretrained pipeline that we can use to process text ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipeline - -pipeline = PretrainedPipeline('recognize_entities_dl', lang = 'fa') - -annotations = pipeline.fullAnnotate("""به گزارش خبرنگار ایرنا ، بر اساس تصمیم این مجمع ، محمد قمی نماینده مردم پاکدشت به عنوان رئیس و علی‌اکبر موسوی خوئینی و شمس‌الدین وهابی نمایندگان مردم تهران به عنوان نواب رئیس انتخاب شدند""")[0] - -annotations.keys() -``` -```scala - -val pipeline = new PretrainedPipeline("recognize_entities_dl", lang = "fa") -val result = pipeline.fullAnnotate("""به گزارش خبرنگار ایرنا ، بر اساس تصمیم این مجمع ، محمد قمی نماینده مردم پاکدشت به عنوان رئیس و علی‌اکبر موسوی خوئینی و شمس‌الدین وهابی نمایندگان مردم تهران به عنوان نواب رئیس انتخاب شدند""")(0) -``` - -{:.nlu-block} -```python - -import nlu - -text = ["""به گزارش خبرنگار ایرنا ، بر اساس تصمیم این مجمع ، محمد قمی نماینده مردم پاکدشت به عنوان رئیس و علی‌اکبر موسوی خوئینی و شمس‌الدین وهابی نمایندگان مردم تهران به عنوان نواب رئیس انتخاب شدند"""] - -result_df = nlu.load('fa.recognize_entities_dl').predict(text) - -result_df -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-21-roberta_base_token_classifier_ontonotes_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-21-roberta_base_token_classifier_ontonotes_pipeline_en.md index 0778fc9a699292..dd1ac545aea6fe 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-roberta_base_token_classifier_ontonotes_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-21-roberta_base_token_classifier_ontonotes_pipeline_en.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on the top of [roberta_base_token_classifier_o ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -pipeline = PretrainedPipeline("roberta_base_token_classifier_ontonotes_pipeline", lang = "en") - -pipeline.annotate("My name is John and I have been working at John Snow Labs since November 2020.") -``` -```scala - -val pipeline = new PretrainedPipeline("roberta_base_token_classifier_ontonotes_pipeline", lang = "en") -pipeline.annotate("My name is John and I have been working at John Snow Labs since November 2020.")) -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-21-roberta_large_token_classifier_conll03_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-21-roberta_large_token_classifier_conll03_pipeline_en.md index 896a3bee6473e6..7a0f8c97829685 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-roberta_large_token_classifier_conll03_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-21-roberta_large_token_classifier_conll03_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [roberta_large_token_classifier_ ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("roberta_large_token_classifier_conll03_pipeline", lang = "en") - -pipeline.annotate("My name is John and I work at John Snow Labs.") -``` -```scala - - -val pipeline = new PretrainedPipeline("roberta_large_token_classifier_conll03_pipeline", lang = "en") -pipeline.annotate("My name is John and I work at John Snow Labs.")) -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-21-roberta_token_classifier_bne_capitel_ner_pipeline_es.md b/docs/_posts/ahmedlone127/2023-05-21-roberta_token_classifier_bne_capitel_ner_pipeline_es.md index 43d61d82783359..96214182883b38 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-roberta_token_classifier_bne_capitel_ner_pipeline_es.md +++ b/docs/_posts/ahmedlone127/2023-05-21-roberta_token_classifier_bne_capitel_ner_pipeline_es.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on the top of [roberta_token_classifier_bne_ca ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -pipeline = PretrainedPipeline("roberta_token_classifier_bne_capitel_ner_pipeline", lang = "es") - -pipeline.annotate("Me llamo Antonio y trabajo en la fábrica de Mercedes-Benz en Madrid.") -``` -```scala - -val pipeline = new PretrainedPipeline("roberta_token_classifier_bne_capitel_ner_pipeline", lang = "es") -pipeline.annotate("Me llamo Antonio y trabajo en la fábrica de Mercedes-Benz en Madrid.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-21-roberta_token_classifier_icelandic_ner_pipeline_is.md b/docs/_posts/ahmedlone127/2023-05-21-roberta_token_classifier_icelandic_ner_pipeline_is.md index 5636ff0f7d2ac6..1f694d0f8887f5 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-roberta_token_classifier_icelandic_ner_pipeline_is.md +++ b/docs/_posts/ahmedlone127/2023-05-21-roberta_token_classifier_icelandic_ner_pipeline_is.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on the top of [roberta_token_classifier_icelan ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -pipeline = PretrainedPipeline("roberta_token_classifier_icelandic_ner_pipeline", lang = "is") - -pipeline.annotate("Ég heiti Peter Fergusson. Ég hef búið í New York síðan í október 2011 og unnið hjá Tesla Motor og þénað 100K $ á ári.") -``` -```scala - -val pipeline = new PretrainedPipeline("roberta_token_classifier_icelandic_ner_pipeline", lang = "is") -pipeline.annotate("Ég heiti Peter Fergusson. Ég hef búið í New York síðan í október 2011 og unnið hjá Tesla Motor og þénað 100K $ á ári.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-21-roberta_token_classifier_timex_semeval_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-21-roberta_token_classifier_timex_semeval_pipeline_en.md index f49f81cfbb1ea6..f7dfb7c4cebb80 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-roberta_token_classifier_timex_semeval_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-21-roberta_token_classifier_timex_semeval_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [roberta_token_classifier_timex_ ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -timex_pipeline = PretrainedPipeline("roberta_token_classifier_timex_semeval_pipeline", lang = "en") - -timex_pipeline.annotate("Model training was started at 22:12C and it took 3 days from Tuesday to Friday.") -``` -```scala - - -val timex_pipeline = new PretrainedPipeline("roberta_token_classifier_timex_semeval_pipeline", lang = "en") -timex_pipeline.annotate("Model training was started at 22:12C and it took 3 days from Tuesday to Friday.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-21-spellcheck_dl_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-21-spellcheck_dl_pipeline_en.md index 50b9658933ce7d..f217407e8318b7 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-spellcheck_dl_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-21-spellcheck_dl_pipeline_en.md @@ -32,27 +32,7 @@ This pretrained spellchecker pipeline is built on the top of [spellcheck_dl](htt ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("spellcheck_dl_pipeline", lang = "en") - -text = ["During the summer we have the best ueather.", "I have a black ueather jacket, so nice."] - -pipeline.annotate(text) -``` -```scala - - -val pipeline = new PretrainedPipeline("spellcheck_dl_pipeline", lang = "en") -val example = Array("During the summer we have the best ueather.", "I have a black ueather jacket, so nice.") - -pipeline.annotate(example) -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-21-text_cleaning_en.md b/docs/_posts/ahmedlone127/2023-05-21-text_cleaning_en.md index 2450fe258fcc9a..b81b2b80ac2b22 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-text_cleaning_en.md +++ b/docs/_posts/ahmedlone127/2023-05-21-text_cleaning_en.md @@ -33,16 +33,7 @@ The text_cleaning is a pretrained pipeline that we can use to process text with ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("text_cleaning", "en") -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-05-21-xlm_roberta_base_token_classifier_conll03_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-21-xlm_roberta_base_token_classifier_conll03_pipeline_en.md index 66efd285422515..ee5036f57a4ac9 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-xlm_roberta_base_token_classifier_conll03_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-21-xlm_roberta_base_token_classifier_conll03_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [xlm_roberta_base_token_classifi ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("xlm_roberta_base_token_classifier_conll03_pipeline", lang = "en") - -pipeline.annotate("My name is John and I work at John Snow Labs.") -``` -```scala - - -val pipeline = new PretrainedPipeline("xlm_roberta_base_token_classifier_conll03_pipeline", lang = "en") -pipeline.annotate("My name is John and I work at John Snow Labs.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-21-xlm_roberta_base_token_classifier_ontonotes_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-21-xlm_roberta_base_token_classifier_ontonotes_pipeline_en.md index 61da217d710f2d..79f5241292024c 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-xlm_roberta_base_token_classifier_ontonotes_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-21-xlm_roberta_base_token_classifier_ontonotes_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [xlm_roberta_base_token_classifi ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("xlm_roberta_base_token_classifier_ontonotes_pipeline", lang = "en") - -pipeline.annotate("My name is John and I have been working at John Snow Labs since November 2020.") -``` -```scala - - -val pipeline = new PretrainedPipeline("xlm_roberta_base_token_classifier_ontonotes_pipeline", lang = "en") -pipeline.annotate("My name is John and I have been working at John Snow Labs since November 2020.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-21-xlm_roberta_large_token_classifier_conll03_pipeline_de.md b/docs/_posts/ahmedlone127/2023-05-21-xlm_roberta_large_token_classifier_conll03_pipeline_de.md index bb9753961cb0a7..9faccd3fc16704 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-xlm_roberta_large_token_classifier_conll03_pipeline_de.md +++ b/docs/_posts/ahmedlone127/2023-05-21-xlm_roberta_large_token_classifier_conll03_pipeline_de.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on the top of [xlm_roberta_large_token_classif ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -pipeline = PretrainedPipeline("xlm_roberta_large_token_classifier_conll03_pipeline", lang = "de") - -pipeline.annotate("Ibser begann seine Karriere beim ASK Ebreichsdorf. 2004 wechselte er zu Admira Wacker Mödling, wo er auch in der Akademie spielte.") -``` -```scala - -val pipeline = new PretrainedPipeline("xlm_roberta_large_token_classifier_conll03_pipeline", lang = "de") -pipeline.annotate("Ibser begann seine Karriere beim ASK Ebreichsdorf. 2004 wechselte er zu Admira Wacker Mödling, wo er auch in der Akademie spielte.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-21-xlm_roberta_large_token_classifier_hrl_pipeline_xx.md b/docs/_posts/ahmedlone127/2023-05-21-xlm_roberta_large_token_classifier_hrl_pipeline_xx.md index 549d4b28e9709b..49e146c5ca5a42 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-xlm_roberta_large_token_classifier_hrl_pipeline_xx.md +++ b/docs/_posts/ahmedlone127/2023-05-21-xlm_roberta_large_token_classifier_hrl_pipeline_xx.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on the top of [xlm_roberta_large_token_classif ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -pipeline = PretrainedPipeline("xlm_roberta_large_token_classifier_hrl_pipeline", lang = "xx") - -pipeline.annotate("يمكنكم مشاهدة أمير منطقة الرياض الأمير فيصل بن بندر بن عبد العزيز في كل مناسبة وافتتاح تتعلق بمشاريع التعليم والصحة وخدمة الطرق والمشاريع الثقافية في منطقة الرياض.") -``` -```scala - -val pipeline = new PretrainedPipeline("xlm_roberta_large_token_classifier_hrl_pipeline", lang = "xx") -pipeline.annotate("يمكنكم مشاهدة أمير منطقة الرياض الأمير فيصل بن بندر بن عبد العزيز في كل مناسبة وافتتاح تتعلق بمشاريع التعليم والصحة وخدمة الطرق والمشاريع الثقافية في منطقة الرياض.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-21-xlm_roberta_large_token_classifier_masakhaner_pipeline_xx.md b/docs/_posts/ahmedlone127/2023-05-21-xlm_roberta_large_token_classifier_masakhaner_pipeline_xx.md index 4f77ba5205735f..f5bcba0621a95f 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-xlm_roberta_large_token_classifier_masakhaner_pipeline_xx.md +++ b/docs/_posts/ahmedlone127/2023-05-21-xlm_roberta_large_token_classifier_masakhaner_pipeline_xx.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on [xlm_roberta_large_token_classifier_masakha ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -masakhaner_pipeline = PretrainedPipeline("xlm_roberta_large_token_classifier_masakhaner_pipeline", lang = "xx") - -masakhaner_pipeline.annotate("አህመድ ቫንዳ ከ3-10-2000 ጀምሮ በአዲስ አበባ ኖሯል።") -``` -```scala - -val masakhaner_pipeline = new PretrainedPipeline("xlm_roberta_large_token_classifier_masakhaner_pipeline", lang = "xx") -val masakhaner_pipeline.annotate("አህመድ ቫንዳ ከ3-10-2000 ጀምሮ በአዲስ አበባ ኖሯል።") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-21-xlnet_base_token_classifier_conll03_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-21-xlnet_base_token_classifier_conll03_pipeline_en.md index 74dfe5133cd1c1..b1406aa89850cf 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-xlnet_base_token_classifier_conll03_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-21-xlnet_base_token_classifier_conll03_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [xlnet_base_token_classifier_con ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("xlnet_base_token_classifier_conll03_pipeline", lang = "en") - -pipeline.annotate("My name is John and I work at John Snow Labs.") -``` -```scala - - -val pipeline = new PretrainedPipeline("xlnet_base_token_classifier_conll03_pipeline", lang = "en") -pipeline.annotate("My name is John and I work at John Snow Labs.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-21-xlnet_large_token_classifier_conll03_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-21-xlnet_large_token_classifier_conll03_pipeline_en.md index 8fa9ae510aa17e..ac0910cc8e9009 100644 --- a/docs/_posts/ahmedlone127/2023-05-21-xlnet_large_token_classifier_conll03_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-21-xlnet_large_token_classifier_conll03_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [xlnet_large_token_classifier_co ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("xlnet_large_token_classifier_conll03_pipeline", lang = "en") - -pipeline.annotate("My name is John and I work at John Snow Labs.") -``` -```scala - - -val pipeline = new PretrainedPipeline("xlnet_large_token_classifier_conll03_pipeline", lang = "en") -pipeline.annotate("My name is John and I work at John Snow Labs.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-22-albert_base_token_classifier_conll03_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-22-albert_base_token_classifier_conll03_pipeline_en.md index 15bc10dee1a55d..023b1c2b54cdac 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-albert_base_token_classifier_conll03_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-22-albert_base_token_classifier_conll03_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [albert_base_token_classifier_co ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("albert_base_token_classifier_conll03_pipeline", lang = "en") - -pipeline.annotate("My name is John and I work at John Snow Labs.") -``` -```scala - - -val pipeline = new PretrainedPipeline("albert_base_token_classifier_conll03_pipeline", lang = "en") -pipeline.annotate("My name is John and I work at John Snow Labs.")) -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-22-albert_large_token_classifier_conll03_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-22-albert_large_token_classifier_conll03_pipeline_en.md index 491f9477630b3a..4e65d749a60991 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-albert_large_token_classifier_conll03_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-22-albert_large_token_classifier_conll03_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [albert_large_token_classifier_c ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("albert_large_token_classifier_conll03_pipeline", lang = "en") - -pipeline.annotate("My name is John and I work at John Snow Labs.") -``` -```scala - - -val pipeline = new PretrainedPipeline("albert_large_token_classifier_conll03_pipeline", lang = "en") -pipeline.annotate("My name is John and I work at John Snow Labs.")) -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-22-albert_xlarge_token_classifier_conll03_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-22-albert_xlarge_token_classifier_conll03_pipeline_en.md index f941f83ee783e6..0ffc760b94d81d 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-albert_xlarge_token_classifier_conll03_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-22-albert_xlarge_token_classifier_conll03_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [albert_xlarge_token_classifier_ ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("albert_xlarge_token_classifier_conll03_pipeline", lang = "en") - -pipeline.annotate("My name is John and I work at John Snow Labs.") -``` -```scala - - -val pipeline = new PretrainedPipeline("albert_xlarge_token_classifier_conll03_pipeline", lang = "en") -pipeline.annotate("My name is John and I work at John Snow Labs.")) -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-22-analyze_sentiment_en.md b/docs/_posts/ahmedlone127/2023-05-22-analyze_sentiment_en.md index b28842b096cb8f..60d3a66eb5ce9d 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-analyze_sentiment_en.md +++ b/docs/_posts/ahmedlone127/2023-05-22-analyze_sentiment_en.md @@ -34,39 +34,7 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} - -```python - -from sparknlp.pretrained import PretrainedPipeline - -pipeline = PretrainedPipeline('analyze_sentiment', lang = 'en') - -result = pipeline.fullAnnotate("""Demonicus is a movie turned into a video game! I just love the story and the things that goes on in the film.It is a B-film ofcourse but that doesn`t bother one bit because its made just right and the music was rad! Horror and sword fight freaks,buy this movie now!""") - - -``` -```scala - -import com.johnsnowlabs.nlp.pretrained.PretrainedPipeline -val pipeline = new PretrainedPipeline("analyze_sentiment", lang = "en") - -val result = pipeline.fullAnnotate("""Demonicus is a movie turned into a video game! I just love the story and the things that goes on in the film.It is a B-film ofcourse but that doesn`t bother one bit because its made just right and the music was rad! Horror and sword fight freaks,buy this movie now!""") - -``` - -{:.nlu-block} -```python - -import nlu -text = ["""Demonicus is a movie turned into a video game! I just love the story and the things that goes on in the film.It is a B-film ofcourse but that doesn`t bother one bit because its made just right and the music was rad! Horror and sword fight freaks,buy this movie now!"""] -result_df = nlu.load('en.classify').predict(text) -result_df - -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-22-analyze_sentimentdl_glove_imdb_en.md b/docs/_posts/ahmedlone127/2023-05-22-analyze_sentimentdl_glove_imdb_en.md index 12dad070707716..7caae5228343f6 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-analyze_sentimentdl_glove_imdb_en.md +++ b/docs/_posts/ahmedlone127/2023-05-22-analyze_sentimentdl_glove_imdb_en.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('analyze_sentimentdl_glove_imdb', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("analyze_sentimentdl_glove_imdb", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.sentiment.glove').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-22-bert_sequence_classifier_age_news_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-22-bert_sequence_classifier_age_news_pipeline_en.md index 9a8e3fb42796b3..00e876b279f9b4 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-bert_sequence_classifier_age_news_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-22-bert_sequence_classifier_age_news_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [bert_sequence_classifier_age_ne ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -news_pipeline = PretrainedPipeline("bert_sequence_classifier_age_news_pipeline", lang = "en") - -news_pipeline.annotate("Microsoft has taken its first step into the metaverse.") -``` -```scala - - -val news_pipeline = new PretrainedPipeline("bert_sequence_classifier_age_news_pipeline", lang = "en") -news_pipeline.annotate("Microsoft has taken its first step into the metaverse.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-22-bert_sequence_classifier_trec_coarse_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-22-bert_sequence_classifier_trec_coarse_pipeline_en.md index 42d4d0ad25c7db..388e8693da5e98 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-bert_sequence_classifier_trec_coarse_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-22-bert_sequence_classifier_trec_coarse_pipeline_en.md @@ -34,23 +34,7 @@ The TREC dataset for question classification consists of open-domain, fact-based ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -trec_pipeline = PretrainedPipeline("bert_sequence_classifier_trec_coarse_pipeline", lang = "en") - -trec_pipeline.annotate("Germany is the largest country in Europe economically.") -``` -```scala - - -val trec_pipeline = new PretrainedPipeline("bert_sequence_classifier_trec_coarse_pipeline", lang = "en") -trec_pipeline.annotate("Germany is the largest country in Europe economically.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-22-bert_token_classifier_dutch_udlassy_ner_pipeline_nl.md b/docs/_posts/ahmedlone127/2023-05-22-bert_token_classifier_dutch_udlassy_ner_pipeline_nl.md index e344aa5f0b4f91..dce7d90f75101e 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-bert_token_classifier_dutch_udlassy_ner_pipeline_nl.md +++ b/docs/_posts/ahmedlone127/2023-05-22-bert_token_classifier_dutch_udlassy_ner_pipeline_nl.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on the top of [bert_token_classifier_dutch_udl ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -pipeline = PretrainedPipeline("bert_token_classifier_dutch_udlassy_ner_pipeline", lang = "nl") - -pipeline.annotate("Mijn naam is Peter Fergusson. Ik woon sinds oktober 2011 in New York en werk 5 jaar bij Tesla Motor.") -``` -```scala - -val pipeline = new PretrainedPipeline("bert_token_classifier_dutch_udlassy_ner_pipeline", lang = "nl") -pipeline.annotate("Mijn naam is Peter Fergusson. Ik woon sinds oktober 2011 in New York en werk 5 jaar bij Tesla Motor.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-22-bert_token_classifier_hi_en_ner_pipeline_hi.md b/docs/_posts/ahmedlone127/2023-05-22-bert_token_classifier_hi_en_ner_pipeline_hi.md index 0dbde13ed54557..2dea52a19b93a7 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-bert_token_classifier_hi_en_ner_pipeline_hi.md +++ b/docs/_posts/ahmedlone127/2023-05-22-bert_token_classifier_hi_en_ner_pipeline_hi.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on [bert_token_classifier_hi_en_ner](https://n ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -pipeline = PretrainedPipeline("bert_token_classifier_hi_en_ner_pipeline", lang = "hi") - -pipeline.annotate("रिलायंस इंडस्ट्रीज़ लिमिटेड (Reliance Industries Limited) एक भारतीय संगुटिका नियंत्रक कंपनी है, जिसका मुख्यालय मुंबई, महाराष्ट्र (Maharashtra) में स्थित है।रतन नवल टाटा (28 दिसंबर 1937, को मुम्बई (Mumbai), में जन्मे) टाटा समुह के वर्तमान अध्यक्ष, जो भारत की सबसे बड़ी व्यापारिक समूह है, जिसकी स्थापना जमशेदजी टाटा ने की और उनके परिवार की पीढियों ने इसका विस्तार किया और इसे दृढ़ बनाया।") -``` -```scala - -val pipeline = new PretrainedPipeline("bert_token_classifier_hi_en_ner_pipeline", lang = "hi") -val pipeline.annotate("रिलायंस इंडस्ट्रीज़ लिमिटेड (Reliance Industries Limited) एक भारतीय संगुटिका नियंत्रक कंपनी है, जिसका मुख्यालय मुंबई, महाराष्ट्र (Maharashtra) में स्थित है।रतन नवल टाटा (28 दिसंबर 1937, को मुम्बई (Mumbai), में जन्मे) टाटा समुह के वर्तमान अध्यक्ष, जो भारत की सबसे बड़ी व्यापारिक समूह है, जिसकी स्थापना जमशेदजी टाटा ने की और उनके परिवार की पीढियों ने इसका विस्तार किया और इसे दृढ़ बनाया।") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-22-bert_token_classifier_scandi_ner_pipeline_xx.md b/docs/_posts/ahmedlone127/2023-05-22-bert_token_classifier_scandi_ner_pipeline_xx.md index 96ecea3ee6a270..ba899a9e474383 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-bert_token_classifier_scandi_ner_pipeline_xx.md +++ b/docs/_posts/ahmedlone127/2023-05-22-bert_token_classifier_scandi_ner_pipeline_xx.md @@ -32,20 +32,7 @@ This pretrained pipeline is built on [bert_token_classifier_scandi_ner](https:// ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -scandiner_pipeline = PretrainedPipeline("bert_token_classifier_scandi_ner_pipeline", lang = "xx") -scandiner_pipeline.annotate("Hans er professor ved Statens Universitet, som ligger i København, og han er en rigtig københavner.") -``` -```scala - -val scandiner_pipeline = new PretrainedPipeline("bert_token_classifier_scandi_ner_pipeline", lang = "xx") - -val scandiner_pipeline.annotate("Hans er professor ved Statens Universitet, som ligger i København, og han er en rigtig københavner.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-22-clean_pattern_en.md b/docs/_posts/ahmedlone127/2023-05-22-clean_pattern_en.md index d1a29a03fad8ab..19adf6f1233737 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-clean_pattern_en.md +++ b/docs/_posts/ahmedlone127/2023-05-22-clean_pattern_en.md @@ -34,33 +34,7 @@ The clean_pattern is a pretrained pipeline that we can use to process text with ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('clean_pattern', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() -``` -```scala - - -val pipeline = new PretrainedPipeline("clean_pattern", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.clean.pattern').predict(text) -result_df -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-22-clean_stop_en.md b/docs/_posts/ahmedlone127/2023-05-22-clean_stop_en.md index d3ce8b84318824..2e4ddf5910551a 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-clean_stop_en.md +++ b/docs/_posts/ahmedlone127/2023-05-22-clean_stop_en.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('clean_stop', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("clean_stop", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.clean.stop').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-22-distilbert_base_token_classifier_masakhaner_pipeline_xx.md b/docs/_posts/ahmedlone127/2023-05-22-distilbert_base_token_classifier_masakhaner_pipeline_xx.md index b9e9ad4659bce5..8f5cbc8c1a479a 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-distilbert_base_token_classifier_masakhaner_pipeline_xx.md +++ b/docs/_posts/ahmedlone127/2023-05-22-distilbert_base_token_classifier_masakhaner_pipeline_xx.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on the top of [distilbert_base_token_classifie ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -masakhaner_pipeline = PretrainedPipeline("distilbert_base_token_classifier_masakhaner_pipeline", lang = "xx") - -masakhaner_pipeline.annotate("Ilé-iṣẹ́ẹ Mohammed Sani Musa, Activate Technologies Limited, ni ó kó ẹ̀rọ Ìwé-pélébé Ìdìbò Alálòpẹ́ (PVCs) tí a lò fún ìbò ọdún-un 2019, ígbà tí ó jẹ́ òǹdíjedupò lábẹ́ ẹgbẹ́ olóṣèlúu tí ó ń tukọ̀ ètò ìṣèlú lọ́wọ́ All rogressives Congress (APC) fún Aṣojú Ìlà-Oòrùn Niger, ìyẹn gẹ́gẹ́ bí ilé iṣẹ́ aṣèwádìí, Premium Times ṣe tẹ̀ ẹ́ jáde.") -``` -```scala - -val masakhaner_pipeline = new PretrainedPipeline("distilbert_base_token_classifier_masakhaner_pipeline", lang = "xx") -masakhaner_pipeline.annotate("Ilé-iṣẹ́ẹ Mohammed Sani Musa, Activate Technologies Limited, ni ó kó ẹ̀rọ Ìwé-pélébé Ìdìbò Alálòpẹ́ (PVCs) tí a lò fún ìbò ọdún-un 2019, ígbà tí ó jẹ́ òǹdíjedupò lábẹ́ ẹgbẹ́ olóṣèlúu tí ó ń tukọ̀ ètò ìṣèlú lọ́wọ́ All rogressives Congress (APC) fún Aṣojú Ìlà-Oòrùn Niger, ìyẹn gẹ́gẹ́ bí ilé iṣẹ́ aṣèwádìí, Premium Times ṣe tẹ̀ ẹ́ jáde.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-22-distilbert_token_classifier_typo_detector_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-22-distilbert_token_classifier_typo_detector_pipeline_en.md index 68fd4a0067cb56..f1baf41eafd85a 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-distilbert_token_classifier_typo_detector_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-22-distilbert_token_classifier_typo_detector_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [distilbert_token_classifier_typ ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -typo_pipeline = PretrainedPipeline("distilbert_token_classifier_typo_detector_pipeline", lang = "en") - -typo_pipeline.annotate("He had also stgruggled with addiction during his tine in Congress.") -``` -```scala - - -val typo_pipeline = new PretrainedPipeline("distilbert_token_classifier_typo_detector_pipeline", lang = "en") -typo_pipeline.annotate("He had also stgruggled with addiction during his tine in Congress.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-22-distilbert_token_classifier_typo_detector_pipeline_is.md b/docs/_posts/ahmedlone127/2023-05-22-distilbert_token_classifier_typo_detector_pipeline_is.md index 5264facb573761..a9c358bb015517 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-distilbert_token_classifier_typo_detector_pipeline_is.md +++ b/docs/_posts/ahmedlone127/2023-05-22-distilbert_token_classifier_typo_detector_pipeline_is.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on the top of [distilbert_token_classifier_typ ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -typo_pipeline = PretrainedPipeline("distilbert_token_classifier_typo_detector_pipeline", lang = "is") - -typo_pipeline.annotate("Það er miög auðvelt að draga marktækar álykanir af texta með Spark NLP.") -``` -```scala - -val typo_pipeline = new PretrainedPipeline("distilbert_token_classifier_typo_detector_pipeline", lang = "is") -typo_pipeline.annotate("Það er miög auðvelt að draga marktækar álykanir af texta með Spark NLP.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-22-distilroberta_base_token_classifier_ontonotes_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-22-distilroberta_base_token_classifier_ontonotes_pipeline_en.md index 27235c5826115d..fbbcda43681094 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-distilroberta_base_token_classifier_ontonotes_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-22-distilroberta_base_token_classifier_ontonotes_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [distilroberta_base_token_classi ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("distilroberta_base_token_classifier_ontonotes_pipeline", lang = "en") - -pipeline.annotate("My name is John and I have been working at John Snow Labs since November 2020.") -``` -```scala - - -val pipeline = new PretrainedPipeline("distilroberta_base_token_classifier_ontonotes_pipeline", lang = "en") -pipeline.annotate("My name is John and I have been working at John Snow Labs since November 2020.")) -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_lg_da.md b/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_lg_da.md index 3db719c608008b..e5e389ac248f0f 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_lg_da.md +++ b/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_lg_da.md @@ -33,25 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("entity_recognizer_lg", "da") - -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -{:.nlu-block} -```python -import nlu -nlu.load("da.ner.lg").predict("""I love johnsnowlabs! """) -``` - -
- {:.model-param}
diff --git a/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_lg_de.md b/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_lg_de.md index e610fe29fc9466..d83f24ea8fde84 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_lg_de.md +++ b/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_lg_de.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_lg', lang = 'de') -annotations = pipeline.fullAnnotate(""Hallo aus John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_lg", lang = "de") -val result = pipeline.fullAnnotate("Hallo aus John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hallo aus John Snow Labs! ""] -result_df = nlu.load('de.ner.recognizer.lg').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_lg_es.md b/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_lg_es.md index 3379529b426ecc..7b40c5992a64fc 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_lg_es.md +++ b/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_lg_es.md @@ -33,25 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("entity_recognizer_lg", "es") - -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -{:.nlu-block} -```python -import nlu -nlu.load("es.ner.lg").predict("""I love johnsnowlabs! """) -``` - -
- {:.model-param}
diff --git a/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_lg_fi.md b/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_lg_fi.md index 19276be9edc20f..b1d5ba6252fba6 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_lg_fi.md +++ b/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_lg_fi.md @@ -33,26 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("entity_recognizer_lg", "fi") - -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -{:.nlu-block} -```python -import nlu -nlu.load("fi.ner.lg").predict("""I love johnsnowlabs! """) -``` - -
- {:.model-param}
diff --git a/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_lg_fr.md b/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_lg_fr.md index b0724b67df638f..6d5482fe230e86 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_lg_fr.md +++ b/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_lg_fr.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_lg', lang = 'fr') -annotations = pipeline.fullAnnotate(""Bonjour de John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_lg", lang = "fr") -val result = pipeline.fullAnnotate("Bonjour de John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Bonjour de John Snow Labs! ""] -result_df = nlu.load('fr.ner').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_lg_nl.md b/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_lg_nl.md index a833bd49ae918d..cc03ff7f2e57c6 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_lg_nl.md +++ b/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_lg_nl.md @@ -33,25 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("entity_recognizer_lg", "nl") - -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -{:.nlu-block} -```python -import nlu -nlu.load("nl.ner.lg").predict("""I love johnsnowlabs! """) -``` - -
- {:.model-param}
diff --git a/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_lg_pl.md b/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_lg_pl.md index 9b7cfa38872a5e..de431938a6d564 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_lg_pl.md +++ b/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_lg_pl.md @@ -33,25 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("entity_recognizer_lg", "pl") - -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -{:.nlu-block} -```python -import nlu -nlu.load("pl.ner.lg").predict("""I love johnsnowlabs! """) -``` - -
- {:.model-param}
diff --git a/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_lg_pt.md b/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_lg_pt.md index b62f280417de8a..4b560929e248f1 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_lg_pt.md +++ b/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_lg_pt.md @@ -33,25 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("entity_recognizer_lg", "pt") - -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -{:.nlu-block} -```python -import nlu -nlu.load("pt.ner.lg").predict("""I love johnsnowlabs! """) -``` - -
- {:.model-param}
diff --git a/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_lg_ru.md b/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_lg_ru.md index 592f8f3daee790..610bc6930f7097 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_lg_ru.md +++ b/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_lg_ru.md @@ -33,25 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("entity_recognizer_lg", "ru") - -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -{:.nlu-block} -```python -import nlu -nlu.load("ru.ner.lg").predict("""I love johnsnowlabs! """) -``` - -
- {:.model-param}
diff --git a/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_lg_sv.md b/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_lg_sv.md index ea42724fa41ac2..4d24f5823ec969 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_lg_sv.md +++ b/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_lg_sv.md @@ -33,25 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("entity_recognizer_lg", "sv") - -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -{:.nlu-block} -```python -import nlu -nlu.load("sv.ner.lg").predict("""I love johnsnowlabs! """) -``` - -
- {:.model-param}
diff --git a/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_md_da.md b/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_md_da.md index 250bce40234d48..453bd325ccbacb 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_md_da.md +++ b/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_md_da.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_md', lang = 'da') -annotations = pipeline.fullAnnotate(""Hej fra John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_md", lang = "da") -val result = pipeline.fullAnnotate("Hej fra John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hej fra John Snow Labs! ""] -result_df = nlu.load('da.ner.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_md_de.md b/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_md_de.md index f65fb8fc1941c5..f84017805ca409 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_md_de.md +++ b/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_md_de.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_md', lang = 'de') -annotations = pipeline.fullAnnotate(""Hallo aus John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_md", lang = "de") -val result = pipeline.fullAnnotate("Hallo aus John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hallo aus John Snow Labs! ""] -result_df = nlu.load('de.ner.recognizer').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_md_es.md b/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_md_es.md index 481e6272b3ea80..f49762c331985b 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_md_es.md +++ b/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_md_es.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_md', lang = 'es') -annotations = pipeline.fullAnnotate(""Hola de John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_md", lang = "es") -val result = pipeline.fullAnnotate("Hola de John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hola de John Snow Labs! ""] -result_df = nlu.load('es.ner.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_md_fi.md b/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_md_fi.md index a136eb2862bb2a..2f49e226c74d32 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_md_fi.md +++ b/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_md_fi.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_md', lang = 'fi') -annotations = pipeline.fullAnnotate(""Hei John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_md", lang = "fi") -val result = pipeline.fullAnnotate("Hei John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hei John Snow Labs! ""] -result_df = nlu.load('fi.ner.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_md_fr.md b/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_md_fr.md index f1cc75df9acfff..ab5d71f95242e8 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_md_fr.md +++ b/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_md_fr.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_md', lang = 'fr') -annotations = pipeline.fullAnnotate(""Bonjour de John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_md", lang = "fr") -val result = pipeline.fullAnnotate("Bonjour de John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Bonjour de John Snow Labs! ""] -result_df = nlu.load('fr.ner.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_md_no.md b/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_md_no.md index ce25923c56e400..53a78a0f6fa6eb 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_md_no.md +++ b/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_md_no.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_md', lang = 'no') -annotations = pipeline.fullAnnotate(""Hei fra John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_md", lang = "no") -val result = pipeline.fullAnnotate("Hei fra John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hei fra John Snow Labs! ""] -result_df = nlu.load('no.ner.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_md_ru.md b/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_md_ru.md index 99598085e1433e..e475a3407c8c83 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_md_ru.md +++ b/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_md_ru.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_md', lang = 'ru') -annotations = pipeline.fullAnnotate(""Здравствуйте из Джона Снежных Лабораторий! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_md", lang = "ru") -val result = pipeline.fullAnnotate("Здравствуйте из Джона Снежных Лабораторий! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Здравствуйте из Джона Снежных Лабораторий! ""] -result_df = nlu.load('ru.ner.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_md_sv.md b/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_md_sv.md index d4099b83261023..900f51c5e137ed 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_md_sv.md +++ b/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_md_sv.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_md', lang = 'sv') -annotations = pipeline.fullAnnotate(""Hej från John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_md", lang = "sv") -val result = pipeline.fullAnnotate("Hej från John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hej från John Snow Labs! ""] -result_df = nlu.load('sv.ner.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_sm_da.md b/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_sm_da.md index 01a6ba6a68fa5f..e09667a5dba079 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_sm_da.md +++ b/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_sm_da.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_sm', lang = 'da') -annotations = pipeline.fullAnnotate(""Hej fra John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_sm", lang = "da") -val result = pipeline.fullAnnotate("Hej fra John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hej fra John Snow Labs! ""] -result_df = nlu.load('da.ner').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_sm_es.md b/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_sm_es.md index c034fd3a3a45f3..7d383507125bb6 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_sm_es.md +++ b/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_sm_es.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_sm', lang = 'es') -annotations = pipeline.fullAnnotate(""Hola de John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_sm", lang = "es") -val result = pipeline.fullAnnotate("Hola de John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hola de John Snow Labs! ""] -result_df = nlu.load('es.ner').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_sm_fi.md b/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_sm_fi.md index a31fd716168455..642498faf5473e 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_sm_fi.md +++ b/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_sm_fi.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_sm', lang = 'fi') -annotations = pipeline.fullAnnotate(""Hei John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_sm", lang = "fi") -val result = pipeline.fullAnnotate("Hei John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hei John Snow Labs! ""] -result_df = nlu.load('fi.ner').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_sm_no.md b/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_sm_no.md index 59ff12c659a006..cf937ac1b7f4ae 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_sm_no.md +++ b/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_sm_no.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_sm', lang = 'no') -annotations = pipeline.fullAnnotate(""Hei fra John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_sm", lang = "no") -val result = pipeline.fullAnnotate("Hei fra John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hei fra John Snow Labs! ""] -result_df = nlu.load('no.ner').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_sm_ru.md b/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_sm_ru.md index d791648f8b3f4a..0fc73579028494 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_sm_ru.md +++ b/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_sm_ru.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_sm', lang = 'ru') -annotations = pipeline.fullAnnotate(""Здравствуйте из Джона Снежных Лабораторий! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_sm", lang = "ru") -val result = pipeline.fullAnnotate("Здравствуйте из Джона Снежных Лабораторий! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Здравствуйте из Джона Снежных Лабораторий! ""] -result_df = nlu.load('ru.ner').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_sm_sv.md b/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_sm_sv.md index be54bafe49fec0..dac74a420ff9b5 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_sm_sv.md +++ b/docs/_posts/ahmedlone127/2023-05-22-entity_recognizer_sm_sv.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_sm', lang = 'sv') -annotations = pipeline.fullAnnotate(""Hej från John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_sm", lang = "sv") -val result = pipeline.fullAnnotate("Hej från John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hej från John Snow Labs! ""] -result_df = nlu.load('sv.ner').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-22-explain_document_dl_en.md b/docs/_posts/ahmedlone127/2023-05-22-explain_document_dl_en.md index 22525f8c0909a0..214aa7846e4dc7 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-explain_document_dl_en.md +++ b/docs/_posts/ahmedlone127/2023-05-22-explain_document_dl_en.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline('explain_document_dl', lang = 'en') -annotations = pipeline.fullAnnotate("The Mona Lisa is an oil painting from the 16th century.")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_dl", lang = "en") -val result = pipeline.fullAnnotate("The Mona Lisa is an oil painting from the 16th century.")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = ["The Mona Lisa is an oil painting from the 16th century."] -result_df = nlu.load('en.explain.dl').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-22-explain_document_lg_da.md b/docs/_posts/ahmedlone127/2023-05-22-explain_document_lg_da.md index b763647ec89c5f..a79791781db4e3 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-explain_document_lg_da.md +++ b/docs/_posts/ahmedlone127/2023-05-22-explain_document_lg_da.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_lg', lang = 'da') -annotations = pipeline.fullAnnotate(""Hej fra John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_lg", lang = "da") -val result = pipeline.fullAnnotate("Hej fra John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hej fra John Snow Labs! ""] -result_df = nlu.load('da.explain.lg').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-22-explain_document_lg_es.md b/docs/_posts/ahmedlone127/2023-05-22-explain_document_lg_es.md index 76a63466d126db..08106ad6c587b9 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-explain_document_lg_es.md +++ b/docs/_posts/ahmedlone127/2023-05-22-explain_document_lg_es.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_lg', lang = 'es') -annotations = pipeline.fullAnnotate(""Hola de John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_lg", lang = "es") -val result = pipeline.fullAnnotate("Hola de John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hola de John Snow Labs! ""] -result_df = nlu.load('es.explain.lg').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-22-explain_document_lg_fi.md b/docs/_posts/ahmedlone127/2023-05-22-explain_document_lg_fi.md index 84e43520c89a9e..a721a749078cd9 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-explain_document_lg_fi.md +++ b/docs/_posts/ahmedlone127/2023-05-22-explain_document_lg_fi.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_lg', lang = 'fi') -annotations = pipeline.fullAnnotate(""Hei John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_lg", lang = "fi") -val result = pipeline.fullAnnotate("Hei John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hei John Snow Labs! ""] -result_df = nlu.load('fi.explain.lg').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-22-explain_document_lg_no.md b/docs/_posts/ahmedlone127/2023-05-22-explain_document_lg_no.md index 58e772adc29637..902f7a21a48eda 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-explain_document_lg_no.md +++ b/docs/_posts/ahmedlone127/2023-05-22-explain_document_lg_no.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_lg', lang = 'no') -annotations = pipeline.fullAnnotate(""Hei fra John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_lg", lang = "no") -val result = pipeline.fullAnnotate("Hei fra John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hei fra John Snow Labs! ""] -result_df = nlu.load('no.explain.lg').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-22-explain_document_lg_ru.md b/docs/_posts/ahmedlone127/2023-05-22-explain_document_lg_ru.md index b323facb0ee86b..36c0ec6e88a21c 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-explain_document_lg_ru.md +++ b/docs/_posts/ahmedlone127/2023-05-22-explain_document_lg_ru.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_lg', lang = 'ru') -annotations = pipeline.fullAnnotate(""Здравствуйте из Джона Снежных Лабораторий! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_lg", lang = "ru") -val result = pipeline.fullAnnotate("Здравствуйте из Джона Снежных Лабораторий! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Здравствуйте из Джона Снежных Лабораторий! ""] -result_df = nlu.load('ru.explain.lg').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-22-explain_document_lg_sv.md b/docs/_posts/ahmedlone127/2023-05-22-explain_document_lg_sv.md index 0d05cd01531234..1cad18e958ed5e 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-explain_document_lg_sv.md +++ b/docs/_posts/ahmedlone127/2023-05-22-explain_document_lg_sv.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_lg', lang = 'sv') -annotations = pipeline.fullAnnotate(""Hej från John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_lg", lang = "sv") -val result = pipeline.fullAnnotate("Hej från John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hej från John Snow Labs! ""] -result_df = nlu.load('sv.explain.lg').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-22-explain_document_md_da.md b/docs/_posts/ahmedlone127/2023-05-22-explain_document_md_da.md index d0511eec69f4f3..5fc96f5b076353 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-explain_document_md_da.md +++ b/docs/_posts/ahmedlone127/2023-05-22-explain_document_md_da.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_md', lang = 'da') -annotations = pipeline.fullAnnotate(""Hej fra John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_md", lang = "da") -val result = pipeline.fullAnnotate("Hej fra John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hej fra John Snow Labs! ""] -result_df = nlu.load('da.explain.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-22-explain_document_md_de.md b/docs/_posts/ahmedlone127/2023-05-22-explain_document_md_de.md index 7d8c9d76430d9d..59ef17f80c2bba 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-explain_document_md_de.md +++ b/docs/_posts/ahmedlone127/2023-05-22-explain_document_md_de.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_md', lang = 'de') -annotations = pipeline.fullAnnotate(""Hallo aus John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_md", lang = "de") -val result = pipeline.fullAnnotate("Hallo aus John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hallo aus John Snow Labs! ""] -result_df = nlu.load('de.explain.document').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-22-explain_document_md_es.md b/docs/_posts/ahmedlone127/2023-05-22-explain_document_md_es.md index dd22a740c2dade..f82936d3997551 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-explain_document_md_es.md +++ b/docs/_posts/ahmedlone127/2023-05-22-explain_document_md_es.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_md', lang = 'es') -annotations = pipeline.fullAnnotate(""Hola de John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_md", lang = "es") -val result = pipeline.fullAnnotate("Hola de John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hola de John Snow Labs! ""] -result_df = nlu.load('es.explain.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-22-explain_document_md_fi.md b/docs/_posts/ahmedlone127/2023-05-22-explain_document_md_fi.md index 90c527826353da..4db986c415269b 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-explain_document_md_fi.md +++ b/docs/_posts/ahmedlone127/2023-05-22-explain_document_md_fi.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_md', lang = 'fi') -annotations = pipeline.fullAnnotate(""Hei John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_md", lang = "fi") -val result = pipeline.fullAnnotate("Hei John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hei John Snow Labs! ""] -result_df = nlu.load('fi.explain.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-22-explain_document_md_fr.md b/docs/_posts/ahmedlone127/2023-05-22-explain_document_md_fr.md index 914f74e1b22ebc..127f4e84947072 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-explain_document_md_fr.md +++ b/docs/_posts/ahmedlone127/2023-05-22-explain_document_md_fr.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_md', lang = 'fr') -annotations = pipeline.fullAnnotate(""Bonjour de John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_md", lang = "fr") -val result = pipeline.fullAnnotate("Bonjour de John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Bonjour de John Snow Labs! ""] -result_df = nlu.load('fr.explain.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-22-explain_document_md_no.md b/docs/_posts/ahmedlone127/2023-05-22-explain_document_md_no.md index 5d10909e8fc22a..808da2a4fd7051 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-explain_document_md_no.md +++ b/docs/_posts/ahmedlone127/2023-05-22-explain_document_md_no.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_md', lang = 'no') -annotations = pipeline.fullAnnotate(""Hei fra John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_md", lang = "no") -val result = pipeline.fullAnnotate("Hei fra John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hei fra John Snow Labs! ""] -result_df = nlu.load('no.explain.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-22-explain_document_md_ru.md b/docs/_posts/ahmedlone127/2023-05-22-explain_document_md_ru.md index cbc9c302074826..042dba72cb5b43 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-explain_document_md_ru.md +++ b/docs/_posts/ahmedlone127/2023-05-22-explain_document_md_ru.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_md', lang = 'ru') -annotations = pipeline.fullAnnotate(""Здравствуйте из Джона Снежных Лабораторий! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_md", lang = "ru") -val result = pipeline.fullAnnotate("Здравствуйте из Джона Снежных Лабораторий! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Здравствуйте из Джона Снежных Лабораторий! ""] -result_df = nlu.load('ru.explain.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-22-explain_document_md_sv.md b/docs/_posts/ahmedlone127/2023-05-22-explain_document_md_sv.md index 994633443fdff2..1abbbc466e56c1 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-explain_document_md_sv.md +++ b/docs/_posts/ahmedlone127/2023-05-22-explain_document_md_sv.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_md', lang = 'sv') -annotations = pipeline.fullAnnotate(""Hej från John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_md", lang = "sv") -val result = pipeline.fullAnnotate("Hej från John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hej från John Snow Labs! ""] -result_df = nlu.load('sv.explain.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-22-explain_document_ml_en.md b/docs/_posts/ahmedlone127/2023-05-22-explain_document_ml_en.md index c172b6ae4150d9..888875a101b20e 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-explain_document_ml_en.md +++ b/docs/_posts/ahmedlone127/2023-05-22-explain_document_ml_en.md @@ -34,33 +34,7 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline('explain_document_ml', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() -``` -```scala - - -val pipeline = new PretrainedPipeline("explain_document_ml", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.explain').predict(text) -result_df -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-22-explain_document_sm_da.md b/docs/_posts/ahmedlone127/2023-05-22-explain_document_sm_da.md index 099cacbd81241c..2affd7493ff6b3 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-explain_document_sm_da.md +++ b/docs/_posts/ahmedlone127/2023-05-22-explain_document_sm_da.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_sm', lang = 'da') -annotations = pipeline.fullAnnotate(""Hej fra John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_sm", lang = "da") -val result = pipeline.fullAnnotate("Hej fra John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hej fra John Snow Labs! ""] -result_df = nlu.load('da.explain').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-22-explain_document_sm_es.md b/docs/_posts/ahmedlone127/2023-05-22-explain_document_sm_es.md index bd110694edd184..d49491a5616876 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-explain_document_sm_es.md +++ b/docs/_posts/ahmedlone127/2023-05-22-explain_document_sm_es.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_sm', lang = 'es') -annotations = pipeline.fullAnnotate(""Hola de John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_sm", lang = "es") -val result = pipeline.fullAnnotate("Hola de John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hola de John Snow Labs! ""] -result_df = nlu.load('es.explain').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-22-explain_document_sm_fi.md b/docs/_posts/ahmedlone127/2023-05-22-explain_document_sm_fi.md index 8d69d6805b998c..590230eb640bbb 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-explain_document_sm_fi.md +++ b/docs/_posts/ahmedlone127/2023-05-22-explain_document_sm_fi.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_sm', lang = 'fi') -annotations = pipeline.fullAnnotate(""Hei John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_sm", lang = "fi") -val result = pipeline.fullAnnotate("Hei John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hei John Snow Labs! ""] -result_df = nlu.load('fi.explain').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-22-explain_document_sm_no.md b/docs/_posts/ahmedlone127/2023-05-22-explain_document_sm_no.md index 9a66e31df60fac..100d65667cca69 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-explain_document_sm_no.md +++ b/docs/_posts/ahmedlone127/2023-05-22-explain_document_sm_no.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_sm', lang = 'no') -annotations = pipeline.fullAnnotate(""Hei fra John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_sm", lang = "no") -val result = pipeline.fullAnnotate("Hei fra John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hei fra John Snow Labs! ""] -result_df = nlu.load('no.explain').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-22-explain_document_sm_ru.md b/docs/_posts/ahmedlone127/2023-05-22-explain_document_sm_ru.md index a81133879157b3..0cf0116a1bb190 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-explain_document_sm_ru.md +++ b/docs/_posts/ahmedlone127/2023-05-22-explain_document_sm_ru.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_sm', lang = 'ru') -annotations = pipeline.fullAnnotate(""Здравствуйте из Джона Снежных Лабораторий! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_sm", lang = "ru") -val result = pipeline.fullAnnotate("Здравствуйте из Джона Снежных Лабораторий! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Здравствуйте из Джона Снежных Лабораторий! ""] -result_df = nlu.load('ru.explain').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-22-explain_document_sm_sv.md b/docs/_posts/ahmedlone127/2023-05-22-explain_document_sm_sv.md index f401f38e1a3a09..27e5174316912a 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-explain_document_sm_sv.md +++ b/docs/_posts/ahmedlone127/2023-05-22-explain_document_sm_sv.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_sm', lang = 'sv') -annotations = pipeline.fullAnnotate(""Hej från John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_sm", lang = "sv") -val result = pipeline.fullAnnotate("Hej från John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hej från John Snow Labs! ""] -result_df = nlu.load('sv.explain').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-22-longformer_base_token_classifier_conll03_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-22-longformer_base_token_classifier_conll03_pipeline_en.md index 3878cb8b993593..d0e9e735bcc0b8 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-longformer_base_token_classifier_conll03_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-22-longformer_base_token_classifier_conll03_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [longformer_base_token_classifie ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("longformer_base_token_classifier_conll03_pipeline", lang = "en") - -pipeline.annotate("My name is John and I am working at John Snow Labs.") -``` -```scala - - -val pipeline = new PretrainedPipeline("longformer_base_token_classifier_conll03_pipeline", lang = "en") -pipeline.annotate("My name is John and I am working at John Snow Labs.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-22-longformer_large_token_classifier_conll03_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-22-longformer_large_token_classifier_conll03_pipeline_en.md index d22ba6ca506a8a..3a0765bd9fde78 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-longformer_large_token_classifier_conll03_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-22-longformer_large_token_classifier_conll03_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [longformer_large_token_classifi ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("longformer_large_token_classifier_conll03_pipeline", lang = "en") - -pipeline.annotate("My name is John and I am working at John Snow Labs.") -``` -```scala - - -val pipeline = new PretrainedPipeline("longformer_large_token_classifier_conll03_pipeline", lang = "en") -pipeline.annotate("My name is John and I am working at John Snow Labs.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-22-match_chunks_en.md b/docs/_posts/ahmedlone127/2023-05-22-match_chunks_en.md index cfb0fd4d59d7de..06c2b74410b28a 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-match_chunks_en.md +++ b/docs/_posts/ahmedlone127/2023-05-22-match_chunks_en.md @@ -32,41 +32,7 @@ The pipeline uses regex `
?/*+` ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipeline - -pipeline_local = PretrainedPipeline('match_chunks') - -result = pipeline_local.annotate("David visited the restaurant yesterday with his family. He also visited and the day before, but at that time he was alone. David again visited today with his colleagues. He and his friends really liked the food and hoped to visit again tomorrow.") - -result['chunk'] -``` -```scala - -import com.johnsnowlabs.nlp.pretrained.PretrainedPipeline import com.johnsnowlabs.nlp.SparkNLP - -SparkNLP.version() -val testData = spark.createDataFrame(Seq( (1, "David visited the restaurant yesterday with his family. He also visited and the day before, but at that time he was alone. David again visited today with his colleagues. He and his friends really liked the food and hoped to visit again tomorrow."))).toDF("id", "text") - -val pipeline = PretrainedPipeline("match_chunks", lang="en") - -val annotation = pipeline.transform(testData) - -annotation.show() -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("en.match.chunks").predict("""David visited the restaurant yesterday with his family. He also visited and the day before, but at that time he was alone. David again visited today with his colleagues. He and his friends really liked the food and hoped to visit again tomorrow.""") -``` - -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-22-match_datetime_en.md b/docs/_posts/ahmedlone127/2023-05-22-match_datetime_en.md index 57932b42257f82..f80a11e7fa7852 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-match_datetime_en.md +++ b/docs/_posts/ahmedlone127/2023-05-22-match_datetime_en.md @@ -32,35 +32,7 @@ DateMatcher based on yyyy/MM/dd ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -pipeline_local = PretrainedPipeline('match_datetime') - -tres = pipeline_local.fullAnnotate(input_list)[0] -for dte in tres['date']: - sent = tres['sentence'][int(dte.metadata['sentence'])] - print (f'text/chunk {sent.result[dte.begin:dte.end+1]} | mapped_date: {dte.result}') -``` -```scala - -import com.johnsnowlabs.nlp.pretrained.PretrainedPipeline import com.johnsnowlabs.nlp.SparkNLP -SparkNLP.version() - -val testData = spark.createDataFrame(Seq( (1, "David visited the restaurant yesterday with his family. -He also visited and the day before, but at that time he was alone. -David again visited today with his colleagues. -He and his friends really liked the food and hoped to visit again tomorrow."))).toDF("id", "text") - -val pipeline = PretrainedPipeline("match_datetime", lang="en") - -val annotation = pipeline.transform(testData) - -annotation.show() -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-22-match_pattern_en.md b/docs/_posts/ahmedlone127/2023-05-22-match_pattern_en.md index 4c55bc1f6ce271..481caef65b1f88 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-match_pattern_en.md +++ b/docs/_posts/ahmedlone127/2023-05-22-match_pattern_en.md @@ -33,16 +33,7 @@ The match_pattern is a pretrained pipeline that we can use to process text with ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("match_pattern", "en", "clinical/models") - result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-05-22-movies_sentiment_analysis_en.md b/docs/_posts/ahmedlone127/2023-05-22-movies_sentiment_analysis_en.md index cc0ac4fc6f624c..560156c89d760a 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-movies_sentiment_analysis_en.md +++ b/docs/_posts/ahmedlone127/2023-05-22-movies_sentiment_analysis_en.md @@ -33,16 +33,7 @@ The movies_sentiment_analysis is a pretrained pipeline that we can use to proces ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("movies_sentiment_analysis", "en") -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-05-22-nerdl_fewnerd_100d_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-22-nerdl_fewnerd_100d_pipeline_en.md index 9ca480fccdef9d..0b5111e8d0f896 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-nerdl_fewnerd_100d_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-22-nerdl_fewnerd_100d_pipeline_en.md @@ -34,21 +34,7 @@ This pretrained pipeline is built on Few-NERD model and it detects : ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -fewnerd_pipeline = PretrainedPipeline("nerdl_fewnerd_subentity_100d_pipeline", lang = "en") - -fewnerd_pipeline.annotate("""The Double Down is a sandwich offered by Kentucky Fried Chicken restaurants. He did not see active service again until 1882, when he took part in the Anglo-Egyptian War, and was present at the battle of Tell El Kebir (September 1882), for which he was mentioned in dispatches, received the Egypt Medal with clasp and the 3rd class of the Order of Medjidie, and was appointed a Companion of the Order of the Bath (CB).""") -``` -```scala - -val pipeline = new PretrainedPipeline("nerdl_fewnerd_subentity_100d_pipeline", lang = "en") -val result = pipeline.fullAnnotate("The Double Down is a sandwich offered by Kentucky Fried Chicken restaurants. He did not see active service again until 1882, when he took part in the Anglo-Egyptian War, and was present at the battle of Tell El Kebir (September 1882), for which he was mentioned in dispatches, received the Egypt Medal with clasp and the 3rd class of the Order of Medjidie, and was appointed a Companion of the Order of the Bath (CB).")(0) -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-22-nerdl_fewnerd_subentity_100d_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-22-nerdl_fewnerd_subentity_100d_pipeline_en.md index 6337f0136a984d..86920d4eef13a9 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-nerdl_fewnerd_subentity_100d_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-22-nerdl_fewnerd_subentity_100d_pipeline_en.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on Few-NERD/inter public dataset and it extrac ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -fewnerd_pipeline = PretrainedPipeline("nerdl_fewnerd_subentity_100d_pipeline", lang = "en") - -fewnerd_pipeline.annotate("""12 Corazones ('12 Hearts') is Spanish-language dating game show produced in the United States for the television network Telemundo since January 2005, based on its namesake Argentine TV show format. The show is filmed in Los Angeles and revolves around the twelve Zodiac signs that identify each contestant. In 2008, Ho filmed a cameo in the Steven Spielberg feature film The Cloverfield Paradox, as a news pundit.""") -``` -```scala - -val pipeline = new PretrainedPipeline("nerdl_fewnerd_subentity_100d_pipeline", lang = "en") -val result = pipeline.fullAnnotate("12 Corazones ('12 Hearts') is Spanish-language dating game show produced in the United States for the television network Telemundo since January 2005, based on its namesake Argentine TV show format. The show is filmed in Los Angeles and revolves around the twelve Zodiac signs that identify each contestant. In 2008, Ho filmed a cameo in the Steven Spielberg feature film The Cloverfield Paradox, as a news pundit.")(0) -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-22-nerdl_restaurant_100d_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-22-nerdl_restaurant_100d_pipeline_en.md index 15f6f43e5b8103..a40cc0735dda25 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-nerdl_restaurant_100d_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-22-nerdl_restaurant_100d_pipeline_en.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on the top of [nerdl_restaurant_100d](https:// ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -restaurant_pipeline = PretrainedPipeline("nerdl_restaurant_100d_pipeline", lang = "en") - -restaurant_pipeline.annotate("Hong Kong’s favourite pasta bar also offers one of the most reasonably priced lunch sets in town! With locations spread out all over the territory Sha Tin – Pici’s formidable lunch menu reads like a highlight reel of the restaurant. Choose from starters like the burrata and arugula salad or freshly tossed tuna tartare, and reliable handmade pasta dishes like pappardelle. Finally, round out your effortless Italian meal with a tidy one-pot tiramisu, of course, an espresso to power you through the rest of the day.") -``` -```scala - -val restaurant_pipeline = new PretrainedPipeline("nerdl_restaurant_100d_pipeline", lang = "en") -restaurant_pipeline.annotate("Hong Kong’s favourite pasta bar also offers one of the most reasonably priced lunch sets in town! With locations spread out all over the territory Sha Tin – Pici’s formidable lunch menu reads like a highlight reel of the restaurant. Choose from starters like the burrata and arugula salad or freshly tossed tuna tartare, and reliable handmade pasta dishes like pappardelle. Finally, round out your effortless Italian meal with a tidy one-pot tiramisu, of course, an espresso to power you through the rest of the day.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-22-onto_recognize_entities_bert_base_en.md b/docs/_posts/ahmedlone127/2023-05-22-onto_recognize_entities_bert_base_en.md index d63528bb521f24..9bf91e1036a342 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-onto_recognize_entities_bert_base_en.md +++ b/docs/_posts/ahmedlone127/2023-05-22-onto_recognize_entities_bert_base_en.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('onto_recognize_entities_bert_base', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("onto_recognize_entities_bert_base", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.ner.onto.bert.base').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-22-onto_recognize_entities_bert_large_en.md b/docs/_posts/ahmedlone127/2023-05-22-onto_recognize_entities_bert_large_en.md index f362f3d323a62b..7b6ec2cf54212f 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-onto_recognize_entities_bert_large_en.md +++ b/docs/_posts/ahmedlone127/2023-05-22-onto_recognize_entities_bert_large_en.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('onto_recognize_entities_bert_large', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("onto_recognize_entities_bert_large", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.ner.onto.bert.large').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-22-onto_recognize_entities_bert_medium_en.md b/docs/_posts/ahmedlone127/2023-05-22-onto_recognize_entities_bert_medium_en.md index 519d1c16b5c60a..6d53255765848b 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-onto_recognize_entities_bert_medium_en.md +++ b/docs/_posts/ahmedlone127/2023-05-22-onto_recognize_entities_bert_medium_en.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('onto_recognize_entities_bert_medium', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("onto_recognize_entities_bert_medium", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.ner.onto.bert.medium').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-22-onto_recognize_entities_bert_mini_en.md b/docs/_posts/ahmedlone127/2023-05-22-onto_recognize_entities_bert_mini_en.md index 9bb36244046f97..e3e30b745e284e 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-onto_recognize_entities_bert_mini_en.md +++ b/docs/_posts/ahmedlone127/2023-05-22-onto_recognize_entities_bert_mini_en.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('onto_recognize_entities_bert_mini', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("onto_recognize_entities_bert_mini", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.ner.onto.bert.mini').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-22-onto_recognize_entities_bert_small_en.md b/docs/_posts/ahmedlone127/2023-05-22-onto_recognize_entities_bert_small_en.md index 07de2dd5f53614..6fa55447acd74c 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-onto_recognize_entities_bert_small_en.md +++ b/docs/_posts/ahmedlone127/2023-05-22-onto_recognize_entities_bert_small_en.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('onto_recognize_entities_bert_small', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("onto_recognize_entities_bert_small", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.ner.onto.bert.small').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-22-onto_recognize_entities_bert_tiny_en.md b/docs/_posts/ahmedlone127/2023-05-22-onto_recognize_entities_bert_tiny_en.md index 1a722c34fa70bd..d7f03e348d7154 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-onto_recognize_entities_bert_tiny_en.md +++ b/docs/_posts/ahmedlone127/2023-05-22-onto_recognize_entities_bert_tiny_en.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('onto_recognize_entities_bert_tiny', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("onto_recognize_entities_bert_tiny", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.ner.onto.bert.tiny').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-22-onto_recognize_entities_electra_base_en.md b/docs/_posts/ahmedlone127/2023-05-22-onto_recognize_entities_electra_base_en.md index 905ff995657472..31f126c38a1bac 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-onto_recognize_entities_electra_base_en.md +++ b/docs/_posts/ahmedlone127/2023-05-22-onto_recognize_entities_electra_base_en.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('onto_recognize_entities_electra_base', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("onto_recognize_entities_electra_base", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.ner.onto.electra.base').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-22-onto_recognize_entities_electra_large_en.md b/docs/_posts/ahmedlone127/2023-05-22-onto_recognize_entities_electra_large_en.md index 1e68b4e623705d..7fd51a3c25d637 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-onto_recognize_entities_electra_large_en.md +++ b/docs/_posts/ahmedlone127/2023-05-22-onto_recognize_entities_electra_large_en.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline('onto_recognize_entities_electra_large', lang = 'en') -annotations = pipeline.fullAnnotate("Hello from John Snow Labs!")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("onto_recognize_entities_electra_large", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.ner.onto.large').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-22-onto_recognize_entities_electra_small_en.md b/docs/_posts/ahmedlone127/2023-05-22-onto_recognize_entities_electra_small_en.md index 1177daf831daf2..4a212a1ced1461 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-onto_recognize_entities_electra_small_en.md +++ b/docs/_posts/ahmedlone127/2023-05-22-onto_recognize_entities_electra_small_en.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('onto_recognize_entities_electra_small', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("onto_recognize_entities_electra_small", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.ner.onto.electra.small').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-22-onto_recognize_entities_lg_en.md b/docs/_posts/ahmedlone127/2023-05-22-onto_recognize_entities_lg_en.md index a03017071dfa89..b0832c47fbf9bc 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-onto_recognize_entities_lg_en.md +++ b/docs/_posts/ahmedlone127/2023-05-22-onto_recognize_entities_lg_en.md @@ -33,25 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("onto_recognize_entities_lg", "en") - -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -{:.nlu-block} -```python -import nlu -nlu.load("en.ner.onto.lg").predict("""I love johnsnowlabs! """) -``` - -
- {:.model-param}
diff --git a/docs/_posts/ahmedlone127/2023-05-22-onto_recognize_entities_sm_en.md b/docs/_posts/ahmedlone127/2023-05-22-onto_recognize_entities_sm_en.md index 9895cd6398d85c..74528f8b336b37 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-onto_recognize_entities_sm_en.md +++ b/docs/_posts/ahmedlone127/2023-05-22-onto_recognize_entities_sm_en.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('onto_recognize_entities_sm', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("onto_recognize_entities_sm", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.ner.onto.sm').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-22-pos_ud_bokmaal_nb.md b/docs/_posts/ahmedlone127/2023-05-22-pos_ud_bokmaal_nb.md index e5c889d05ef3a7..690fbfa93c7bfe 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-pos_ud_bokmaal_nb.md +++ b/docs/_posts/ahmedlone127/2023-05-22-pos_ud_bokmaal_nb.md @@ -34,39 +34,7 @@ This model was trained using the dataset available at https://universaldependenc ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -pos = PerceptronModel.pretrained("pos_ud_bokmaal", "nb") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("pos") - -nlp_pipeline = Pipeline(stages=[document_assembler, sentence_detector, tokenizer, pos]) -light_pipeline = LightPipeline(nlp_pipeline.fit(spark.createDataFrame([['']]).toDF("text"))) -results = light_pipeline.fullAnnotate("Annet enn å være kongen i nord, er John Snow en engelsk lege og en leder innen utvikling av anestesi og medisinsk hygiene.") -``` -```scala - -val pos = PerceptronModel.pretrained("pos_ud_bokmaal", "nb") - .setInputCols(Array("document", "token")) - .setOutputCol("pos") - -val pipeline = new Pipeline().setStages(Array(document_assembler, sentence_detector, tokenizer, pos)) -val data = Seq("Annet enn å være kongen i nord, er John Snow en engelsk lege og en leder innen utvikling av anestesi og medisinsk hygiene.").toDF("text") -val result = pipeline.fit(data).transform(data) -``` - -{:.nlu-block} -```python - -import nlu -text = ["""Annet enn å være kongen i nord, er John Snow en engelsk lege og en leder innen utvikling av anestesi og medisinsk hygiene."""] -pos_df = nlu.load('nb.pos.ud_bokmaal').predict(text) -pos_df -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-22-recognize_entities_bert_en.md b/docs/_posts/ahmedlone127/2023-05-22-recognize_entities_bert_en.md index ac7290c2c2f439..ad32d266f1e076 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-recognize_entities_bert_en.md +++ b/docs/_posts/ahmedlone127/2023-05-22-recognize_entities_bert_en.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('recognize_entities_bert', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("recognize_entities_bert", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.ner.bert').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-22-recognize_entities_dl_en.md b/docs/_posts/ahmedlone127/2023-05-22-recognize_entities_dl_en.md index ee25fc3f75a502..9c02e144ca8c26 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-recognize_entities_dl_en.md +++ b/docs/_posts/ahmedlone127/2023-05-22-recognize_entities_dl_en.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('recognize_entities_dl', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("recognize_entities_dl", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.ner').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-22-recognize_entities_dl_fa.md b/docs/_posts/ahmedlone127/2023-05-22-recognize_entities_dl_fa.md index 722e3d58623246..51a551c4114919 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-recognize_entities_dl_fa.md +++ b/docs/_posts/ahmedlone127/2023-05-22-recognize_entities_dl_fa.md @@ -32,37 +32,7 @@ The explain_document_dl is a pretrained pipeline that we can use to process text ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipeline - -pipeline = PretrainedPipeline('recognize_entities_dl', lang = 'fa') - -annotations = pipeline.fullAnnotate("""به گزارش خبرنگار ایرنا ، بر اساس تصمیم این مجمع ، محمد قمی نماینده مردم پاکدشت به عنوان رئیس و علی‌اکبر موسوی خوئینی و شمس‌الدین وهابی نمایندگان مردم تهران به عنوان نواب رئیس انتخاب شدند""")[0] - -annotations.keys() -``` -```scala - -val pipeline = new PretrainedPipeline("recognize_entities_dl", lang = "fa") -val result = pipeline.fullAnnotate("""به گزارش خبرنگار ایرنا ، بر اساس تصمیم این مجمع ، محمد قمی نماینده مردم پاکدشت به عنوان رئیس و علی‌اکبر موسوی خوئینی و شمس‌الدین وهابی نمایندگان مردم تهران به عنوان نواب رئیس انتخاب شدند""")(0) -``` - -{:.nlu-block} -```python - -import nlu - -text = ["""به گزارش خبرنگار ایرنا ، بر اساس تصمیم این مجمع ، محمد قمی نماینده مردم پاکدشت به عنوان رئیس و علی‌اکبر موسوی خوئینی و شمس‌الدین وهابی نمایندگان مردم تهران به عنوان نواب رئیس انتخاب شدند"""] - -result_df = nlu.load('fa.recognize_entities_dl').predict(text) - -result_df -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-22-roberta_base_token_classifier_ontonotes_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-22-roberta_base_token_classifier_ontonotes_pipeline_en.md index 0ec192b82de752..5fab17c3b9af2b 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-roberta_base_token_classifier_ontonotes_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-22-roberta_base_token_classifier_ontonotes_pipeline_en.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on the top of [roberta_base_token_classifier_o ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -pipeline = PretrainedPipeline("roberta_base_token_classifier_ontonotes_pipeline", lang = "en") - -pipeline.annotate("My name is John and I have been working at John Snow Labs since November 2020.") -``` -```scala - -val pipeline = new PretrainedPipeline("roberta_base_token_classifier_ontonotes_pipeline", lang = "en") -pipeline.annotate("My name is John and I have been working at John Snow Labs since November 2020.")) -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-22-roberta_large_token_classifier_conll03_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-22-roberta_large_token_classifier_conll03_pipeline_en.md index a7d710875988c0..1ea8fa9a308f8d 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-roberta_large_token_classifier_conll03_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-22-roberta_large_token_classifier_conll03_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [roberta_large_token_classifier_ ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("roberta_large_token_classifier_conll03_pipeline", lang = "en") - -pipeline.annotate("My name is John and I work at John Snow Labs.") -``` -```scala - - -val pipeline = new PretrainedPipeline("roberta_large_token_classifier_conll03_pipeline", lang = "en") -pipeline.annotate("My name is John and I work at John Snow Labs.")) -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-22-roberta_token_classifier_bne_capitel_ner_pipeline_es.md b/docs/_posts/ahmedlone127/2023-05-22-roberta_token_classifier_bne_capitel_ner_pipeline_es.md index ff1f64782cf1ee..3afc986f076815 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-roberta_token_classifier_bne_capitel_ner_pipeline_es.md +++ b/docs/_posts/ahmedlone127/2023-05-22-roberta_token_classifier_bne_capitel_ner_pipeline_es.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on the top of [roberta_token_classifier_bne_ca ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -pipeline = PretrainedPipeline("roberta_token_classifier_bne_capitel_ner_pipeline", lang = "es") - -pipeline.annotate("Me llamo Antonio y trabajo en la fábrica de Mercedes-Benz en Madrid.") -``` -```scala - -val pipeline = new PretrainedPipeline("roberta_token_classifier_bne_capitel_ner_pipeline", lang = "es") -pipeline.annotate("Me llamo Antonio y trabajo en la fábrica de Mercedes-Benz en Madrid.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-22-roberta_token_classifier_icelandic_ner_pipeline_is.md b/docs/_posts/ahmedlone127/2023-05-22-roberta_token_classifier_icelandic_ner_pipeline_is.md index 61688280e98e16..9920b51285fa58 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-roberta_token_classifier_icelandic_ner_pipeline_is.md +++ b/docs/_posts/ahmedlone127/2023-05-22-roberta_token_classifier_icelandic_ner_pipeline_is.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on the top of [roberta_token_classifier_icelan ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -pipeline = PretrainedPipeline("roberta_token_classifier_icelandic_ner_pipeline", lang = "is") - -pipeline.annotate("Ég heiti Peter Fergusson. Ég hef búið í New York síðan í október 2011 og unnið hjá Tesla Motor og þénað 100K $ á ári.") -``` -```scala - -val pipeline = new PretrainedPipeline("roberta_token_classifier_icelandic_ner_pipeline", lang = "is") -pipeline.annotate("Ég heiti Peter Fergusson. Ég hef búið í New York síðan í október 2011 og unnið hjá Tesla Motor og þénað 100K $ á ári.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-22-roberta_token_classifier_timex_semeval_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-22-roberta_token_classifier_timex_semeval_pipeline_en.md index 93eb4f1b9a89a0..846081aa6031da 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-roberta_token_classifier_timex_semeval_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-22-roberta_token_classifier_timex_semeval_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [roberta_token_classifier_timex_ ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -timex_pipeline = PretrainedPipeline("roberta_token_classifier_timex_semeval_pipeline", lang = "en") - -timex_pipeline.annotate("Model training was started at 22:12C and it took 3 days from Tuesday to Friday.") -``` -```scala - - -val timex_pipeline = new PretrainedPipeline("roberta_token_classifier_timex_semeval_pipeline", lang = "en") -timex_pipeline.annotate("Model training was started at 22:12C and it took 3 days from Tuesday to Friday.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-22-spellcheck_dl_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-22-spellcheck_dl_pipeline_en.md index 02d60cf8b49fa2..9d2b944659aaf8 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-spellcheck_dl_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-22-spellcheck_dl_pipeline_en.md @@ -32,27 +32,7 @@ This pretrained spellchecker pipeline is built on the top of [spellcheck_dl](htt ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("spellcheck_dl_pipeline", lang = "en") - -text = ["During the summer we have the best ueather.", "I have a black ueather jacket, so nice."] - -pipeline.annotate(text) -``` -```scala - - -val pipeline = new PretrainedPipeline("spellcheck_dl_pipeline", lang = "en") -val example = Array("During the summer we have the best ueather.", "I have a black ueather jacket, so nice.") - -pipeline.annotate(example) -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-22-text_cleaning_en.md b/docs/_posts/ahmedlone127/2023-05-22-text_cleaning_en.md index bd21c3c74648b7..191bb5e3da0837 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-text_cleaning_en.md +++ b/docs/_posts/ahmedlone127/2023-05-22-text_cleaning_en.md @@ -33,16 +33,7 @@ The text_cleaning is a pretrained pipeline that we can use to process text with ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("text_cleaning", "en") -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-05-22-xlm_roberta_base_token_classifier_conll03_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-22-xlm_roberta_base_token_classifier_conll03_pipeline_en.md index b01501066476f8..bd7c77c8df7002 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-xlm_roberta_base_token_classifier_conll03_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-22-xlm_roberta_base_token_classifier_conll03_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [xlm_roberta_base_token_classifi ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("xlm_roberta_base_token_classifier_conll03_pipeline", lang = "en") - -pipeline.annotate("My name is John and I work at John Snow Labs.") -``` -```scala - - -val pipeline = new PretrainedPipeline("xlm_roberta_base_token_classifier_conll03_pipeline", lang = "en") -pipeline.annotate("My name is John and I work at John Snow Labs.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-22-xlm_roberta_base_token_classifier_ontonotes_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-22-xlm_roberta_base_token_classifier_ontonotes_pipeline_en.md index 9b0a4e00a3cbec..c62562d48e60ad 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-xlm_roberta_base_token_classifier_ontonotes_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-22-xlm_roberta_base_token_classifier_ontonotes_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [xlm_roberta_base_token_classifi ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("xlm_roberta_base_token_classifier_ontonotes_pipeline", lang = "en") - -pipeline.annotate("My name is John and I have been working at John Snow Labs since November 2020.") -``` -```scala - - -val pipeline = new PretrainedPipeline("xlm_roberta_base_token_classifier_ontonotes_pipeline", lang = "en") -pipeline.annotate("My name is John and I have been working at John Snow Labs since November 2020.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-22-xlm_roberta_large_token_classifier_conll03_pipeline_de.md b/docs/_posts/ahmedlone127/2023-05-22-xlm_roberta_large_token_classifier_conll03_pipeline_de.md index a5cde6f39d05a4..ee9bd6e7dc8675 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-xlm_roberta_large_token_classifier_conll03_pipeline_de.md +++ b/docs/_posts/ahmedlone127/2023-05-22-xlm_roberta_large_token_classifier_conll03_pipeline_de.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on the top of [xlm_roberta_large_token_classif ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -pipeline = PretrainedPipeline("xlm_roberta_large_token_classifier_conll03_pipeline", lang = "de") - -pipeline.annotate("Ibser begann seine Karriere beim ASK Ebreichsdorf. 2004 wechselte er zu Admira Wacker Mödling, wo er auch in der Akademie spielte.") -``` -```scala - -val pipeline = new PretrainedPipeline("xlm_roberta_large_token_classifier_conll03_pipeline", lang = "de") -pipeline.annotate("Ibser begann seine Karriere beim ASK Ebreichsdorf. 2004 wechselte er zu Admira Wacker Mödling, wo er auch in der Akademie spielte.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-22-xlm_roberta_large_token_classifier_hrl_pipeline_xx.md b/docs/_posts/ahmedlone127/2023-05-22-xlm_roberta_large_token_classifier_hrl_pipeline_xx.md index b50cc0a119e8ce..33c74c86cfb92d 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-xlm_roberta_large_token_classifier_hrl_pipeline_xx.md +++ b/docs/_posts/ahmedlone127/2023-05-22-xlm_roberta_large_token_classifier_hrl_pipeline_xx.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on the top of [xlm_roberta_large_token_classif ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -pipeline = PretrainedPipeline("xlm_roberta_large_token_classifier_hrl_pipeline", lang = "xx") - -pipeline.annotate("يمكنكم مشاهدة أمير منطقة الرياض الأمير فيصل بن بندر بن عبد العزيز في كل مناسبة وافتتاح تتعلق بمشاريع التعليم والصحة وخدمة الطرق والمشاريع الثقافية في منطقة الرياض.") -``` -```scala - -val pipeline = new PretrainedPipeline("xlm_roberta_large_token_classifier_hrl_pipeline", lang = "xx") -pipeline.annotate("يمكنكم مشاهدة أمير منطقة الرياض الأمير فيصل بن بندر بن عبد العزيز في كل مناسبة وافتتاح تتعلق بمشاريع التعليم والصحة وخدمة الطرق والمشاريع الثقافية في منطقة الرياض.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-22-xlm_roberta_large_token_classifier_masakhaner_pipeline_xx.md b/docs/_posts/ahmedlone127/2023-05-22-xlm_roberta_large_token_classifier_masakhaner_pipeline_xx.md index 33594be3b84966..a0a6092a8e4336 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-xlm_roberta_large_token_classifier_masakhaner_pipeline_xx.md +++ b/docs/_posts/ahmedlone127/2023-05-22-xlm_roberta_large_token_classifier_masakhaner_pipeline_xx.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on [xlm_roberta_large_token_classifier_masakha ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -masakhaner_pipeline = PretrainedPipeline("xlm_roberta_large_token_classifier_masakhaner_pipeline", lang = "xx") - -masakhaner_pipeline.annotate("አህመድ ቫንዳ ከ3-10-2000 ጀምሮ በአዲስ አበባ ኖሯል።") -``` -```scala - -val masakhaner_pipeline = new PretrainedPipeline("xlm_roberta_large_token_classifier_masakhaner_pipeline", lang = "xx") -val masakhaner_pipeline.annotate("አህመድ ቫንዳ ከ3-10-2000 ጀምሮ በአዲስ አበባ ኖሯል።") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-22-xlnet_base_token_classifier_conll03_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-22-xlnet_base_token_classifier_conll03_pipeline_en.md index e11013676e7752..9395b9b0450103 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-xlnet_base_token_classifier_conll03_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-22-xlnet_base_token_classifier_conll03_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [xlnet_base_token_classifier_con ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("xlnet_base_token_classifier_conll03_pipeline", lang = "en") - -pipeline.annotate("My name is John and I work at John Snow Labs.") -``` -```scala - - -val pipeline = new PretrainedPipeline("xlnet_base_token_classifier_conll03_pipeline", lang = "en") -pipeline.annotate("My name is John and I work at John Snow Labs.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-22-xlnet_large_token_classifier_conll03_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-22-xlnet_large_token_classifier_conll03_pipeline_en.md index 58dc4fccd0d7f8..b4f98b17e2fbc3 100644 --- a/docs/_posts/ahmedlone127/2023-05-22-xlnet_large_token_classifier_conll03_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-22-xlnet_large_token_classifier_conll03_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [xlnet_large_token_classifier_co ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("xlnet_large_token_classifier_conll03_pipeline", lang = "en") - -pipeline.annotate("My name is John and I work at John Snow Labs.") -``` -```scala - - -val pipeline = new PretrainedPipeline("xlnet_large_token_classifier_conll03_pipeline", lang = "en") -pipeline.annotate("My name is John and I work at John Snow Labs.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-24-analyze_sentiment_en.md b/docs/_posts/ahmedlone127/2023-05-24-analyze_sentiment_en.md index 5d9c83df977dbf..4b610cebf162cb 100644 --- a/docs/_posts/ahmedlone127/2023-05-24-analyze_sentiment_en.md +++ b/docs/_posts/ahmedlone127/2023-05-24-analyze_sentiment_en.md @@ -34,39 +34,7 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} - -```python - -from sparknlp.pretrained import PretrainedPipeline - -pipeline = PretrainedPipeline('analyze_sentiment', lang = 'en') - -result = pipeline.fullAnnotate("""Demonicus is a movie turned into a video game! I just love the story and the things that goes on in the film.It is a B-film ofcourse but that doesn`t bother one bit because its made just right and the music was rad! Horror and sword fight freaks,buy this movie now!""") - - -``` -```scala - -import com.johnsnowlabs.nlp.pretrained.PretrainedPipeline -val pipeline = new PretrainedPipeline("analyze_sentiment", lang = "en") - -val result = pipeline.fullAnnotate("""Demonicus is a movie turned into a video game! I just love the story and the things that goes on in the film.It is a B-film ofcourse but that doesn`t bother one bit because its made just right and the music was rad! Horror and sword fight freaks,buy this movie now!""") - -``` - -{:.nlu-block} -```python - -import nlu -text = ["""Demonicus is a movie turned into a video game! I just love the story and the things that goes on in the film.It is a B-film ofcourse but that doesn`t bother one bit because its made just right and the music was rad! Horror and sword fight freaks,buy this movie now!"""] -result_df = nlu.load('en.classify').predict(text) -result_df - -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-24-analyze_sentimentdl_glove_imdb_en.md b/docs/_posts/ahmedlone127/2023-05-24-analyze_sentimentdl_glove_imdb_en.md index b9f91f44783fce..8f0083c01c486b 100644 --- a/docs/_posts/ahmedlone127/2023-05-24-analyze_sentimentdl_glove_imdb_en.md +++ b/docs/_posts/ahmedlone127/2023-05-24-analyze_sentimentdl_glove_imdb_en.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('analyze_sentimentdl_glove_imdb', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("analyze_sentimentdl_glove_imdb", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.sentiment.glove').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-24-clean_pattern_en.md b/docs/_posts/ahmedlone127/2023-05-24-clean_pattern_en.md index b13244944aa964..7b07fd0486dbd5 100644 --- a/docs/_posts/ahmedlone127/2023-05-24-clean_pattern_en.md +++ b/docs/_posts/ahmedlone127/2023-05-24-clean_pattern_en.md @@ -34,33 +34,7 @@ The clean_pattern is a pretrained pipeline that we can use to process text with ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('clean_pattern', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() -``` -```scala - - -val pipeline = new PretrainedPipeline("clean_pattern", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.clean.pattern').predict(text) -result_df -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-24-clean_stop_en.md b/docs/_posts/ahmedlone127/2023-05-24-clean_stop_en.md index 6068e038ad1ee6..0226561f3acd94 100644 --- a/docs/_posts/ahmedlone127/2023-05-24-clean_stop_en.md +++ b/docs/_posts/ahmedlone127/2023-05-24-clean_stop_en.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('clean_stop', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("clean_stop", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.clean.stop').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_lg_de.md b/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_lg_de.md index dd930bea9c5bf6..c4b97d494b207f 100644 --- a/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_lg_de.md +++ b/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_lg_de.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_lg', lang = 'de') -annotations = pipeline.fullAnnotate(""Hallo aus John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_lg", lang = "de") -val result = pipeline.fullAnnotate("Hallo aus John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hallo aus John Snow Labs! ""] -result_df = nlu.load('de.ner.recognizer.lg').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_lg_es.md b/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_lg_es.md index 51c2508bf37b4e..855f0fed257afa 100644 --- a/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_lg_es.md +++ b/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_lg_es.md @@ -33,25 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("entity_recognizer_lg", "es") - -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -{:.nlu-block} -```python -import nlu -nlu.load("es.ner.lg").predict("""I love johnsnowlabs! """) -``` - -
- {:.model-param}
diff --git a/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_lg_fr.md b/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_lg_fr.md index 18c3447a08a0bc..c2d22843e89cba 100644 --- a/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_lg_fr.md +++ b/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_lg_fr.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_lg', lang = 'fr') -annotations = pipeline.fullAnnotate(""Bonjour de John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_lg", lang = "fr") -val result = pipeline.fullAnnotate("Bonjour de John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Bonjour de John Snow Labs! ""] -result_df = nlu.load('fr.ner').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_lg_nl.md b/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_lg_nl.md index 2c911b74026429..31f27d1708a88c 100644 --- a/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_lg_nl.md +++ b/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_lg_nl.md @@ -33,25 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("entity_recognizer_lg", "nl") - -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -{:.nlu-block} -```python -import nlu -nlu.load("nl.ner.lg").predict("""I love johnsnowlabs! """) -``` - -
- {:.model-param}
diff --git a/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_lg_no.md b/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_lg_no.md index 4cefe051b56add..c8b7aab8a11595 100644 --- a/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_lg_no.md +++ b/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_lg_no.md @@ -33,25 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("entity_recognizer_lg", "no") - -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -{:.nlu-block} -```python -import nlu -nlu.load("no.ner.lg").predict("""I love johnsnowlabs! """) -``` - -
- {:.model-param}
diff --git a/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_lg_pl.md b/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_lg_pl.md index 2955701471bfe1..193f16302af83e 100644 --- a/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_lg_pl.md +++ b/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_lg_pl.md @@ -33,25 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("entity_recognizer_lg", "pl") - -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -{:.nlu-block} -```python -import nlu -nlu.load("pl.ner.lg").predict("""I love johnsnowlabs! """) -``` - -
- {:.model-param}
diff --git a/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_lg_pt.md b/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_lg_pt.md index 4b1cde8456ac3c..6a5dc77670e5b3 100644 --- a/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_lg_pt.md +++ b/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_lg_pt.md @@ -33,25 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("entity_recognizer_lg", "pt") - -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -{:.nlu-block} -```python -import nlu -nlu.load("pt.ner.lg").predict("""I love johnsnowlabs! """) -``` - -
- {:.model-param}
diff --git a/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_lg_ru.md b/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_lg_ru.md index 49dfad88bac238..066285352e686c 100644 --- a/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_lg_ru.md +++ b/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_lg_ru.md @@ -33,25 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("entity_recognizer_lg", "ru") - -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -{:.nlu-block} -```python -import nlu -nlu.load("ru.ner.lg").predict("""I love johnsnowlabs! """) -``` - -
- {:.model-param}
diff --git a/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_lg_sv.md b/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_lg_sv.md index 2d7712cc130eec..7fdb92324adfbb 100644 --- a/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_lg_sv.md +++ b/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_lg_sv.md @@ -33,25 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("entity_recognizer_lg", "sv") - -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -{:.nlu-block} -```python -import nlu -nlu.load("sv.ner.lg").predict("""I love johnsnowlabs! """) -``` - -
- {:.model-param}
diff --git a/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_md_de.md b/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_md_de.md index 2598aa24330417..e0413a8449c2a1 100644 --- a/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_md_de.md +++ b/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_md_de.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_md', lang = 'de') -annotations = pipeline.fullAnnotate(""Hallo aus John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_md", lang = "de") -val result = pipeline.fullAnnotate("Hallo aus John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hallo aus John Snow Labs! ""] -result_df = nlu.load('de.ner.recognizer').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_md_es.md b/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_md_es.md index 16fc2ffd0cc20b..f5d3feb29f7b90 100644 --- a/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_md_es.md +++ b/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_md_es.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_md', lang = 'es') -annotations = pipeline.fullAnnotate(""Hola de John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_md", lang = "es") -val result = pipeline.fullAnnotate("Hola de John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hola de John Snow Labs! ""] -result_df = nlu.load('es.ner.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_md_fr.md b/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_md_fr.md index 72dac1583e9b59..6a8542f87337dd 100644 --- a/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_md_fr.md +++ b/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_md_fr.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_md', lang = 'fr') -annotations = pipeline.fullAnnotate(""Bonjour de John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_md", lang = "fr") -val result = pipeline.fullAnnotate("Bonjour de John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Bonjour de John Snow Labs! ""] -result_df = nlu.load('fr.ner.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_md_no.md b/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_md_no.md index 5e43ac4f67f878..d83b24fdd46076 100644 --- a/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_md_no.md +++ b/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_md_no.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_md', lang = 'no') -annotations = pipeline.fullAnnotate(""Hei fra John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_md", lang = "no") -val result = pipeline.fullAnnotate("Hei fra John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hei fra John Snow Labs! ""] -result_df = nlu.load('no.ner.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_md_ru.md b/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_md_ru.md index daa6bd25d17025..ef852e7b641b21 100644 --- a/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_md_ru.md +++ b/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_md_ru.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_md', lang = 'ru') -annotations = pipeline.fullAnnotate(""Здравствуйте из Джона Снежных Лабораторий! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_md", lang = "ru") -val result = pipeline.fullAnnotate("Здравствуйте из Джона Снежных Лабораторий! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Здравствуйте из Джона Снежных Лабораторий! ""] -result_df = nlu.load('ru.ner.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_md_sv.md b/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_md_sv.md index e2153d5b120cfc..372841e0a9dd29 100644 --- a/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_md_sv.md +++ b/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_md_sv.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_md', lang = 'sv') -annotations = pipeline.fullAnnotate(""Hej från John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_md", lang = "sv") -val result = pipeline.fullAnnotate("Hej från John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hej från John Snow Labs! ""] -result_df = nlu.load('sv.ner.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_sm_es.md b/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_sm_es.md index 53cfb3b430866a..525acf5f72da3f 100644 --- a/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_sm_es.md +++ b/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_sm_es.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_sm', lang = 'es') -annotations = pipeline.fullAnnotate(""Hola de John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_sm", lang = "es") -val result = pipeline.fullAnnotate("Hola de John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hola de John Snow Labs! ""] -result_df = nlu.load('es.ner').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_sm_no.md b/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_sm_no.md index 37a8591fe2ef78..b0ae7737cb368f 100644 --- a/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_sm_no.md +++ b/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_sm_no.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_sm', lang = 'no') -annotations = pipeline.fullAnnotate(""Hei fra John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_sm", lang = "no") -val result = pipeline.fullAnnotate("Hei fra John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hei fra John Snow Labs! ""] -result_df = nlu.load('no.ner').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_sm_ru.md b/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_sm_ru.md index 6ae2893777183f..5705b7a501cb86 100644 --- a/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_sm_ru.md +++ b/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_sm_ru.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_sm', lang = 'ru') -annotations = pipeline.fullAnnotate(""Здравствуйте из Джона Снежных Лабораторий! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_sm", lang = "ru") -val result = pipeline.fullAnnotate("Здравствуйте из Джона Снежных Лабораторий! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Здравствуйте из Джона Снежных Лабораторий! ""] -result_df = nlu.load('ru.ner').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_sm_sv.md b/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_sm_sv.md index f7642a41d11171..bb3360f31b314b 100644 --- a/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_sm_sv.md +++ b/docs/_posts/ahmedlone127/2023-05-24-entity_recognizer_sm_sv.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_sm', lang = 'sv') -annotations = pipeline.fullAnnotate(""Hej från John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_sm", lang = "sv") -val result = pipeline.fullAnnotate("Hej från John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hej från John Snow Labs! ""] -result_df = nlu.load('sv.ner').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-24-explain_document_dl_en.md b/docs/_posts/ahmedlone127/2023-05-24-explain_document_dl_en.md index ce04a272f78d0b..373095bcd9ae01 100644 --- a/docs/_posts/ahmedlone127/2023-05-24-explain_document_dl_en.md +++ b/docs/_posts/ahmedlone127/2023-05-24-explain_document_dl_en.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline('explain_document_dl', lang = 'en') -annotations = pipeline.fullAnnotate("The Mona Lisa is an oil painting from the 16th century.")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_dl", lang = "en") -val result = pipeline.fullAnnotate("The Mona Lisa is an oil painting from the 16th century.")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = ["The Mona Lisa is an oil painting from the 16th century."] -result_df = nlu.load('en.explain.dl').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-24-explain_document_lg_es.md b/docs/_posts/ahmedlone127/2023-05-24-explain_document_lg_es.md index 81358c6d035804..2ca4a444df90ba 100644 --- a/docs/_posts/ahmedlone127/2023-05-24-explain_document_lg_es.md +++ b/docs/_posts/ahmedlone127/2023-05-24-explain_document_lg_es.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_lg', lang = 'es') -annotations = pipeline.fullAnnotate(""Hola de John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_lg", lang = "es") -val result = pipeline.fullAnnotate("Hola de John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hola de John Snow Labs! ""] -result_df = nlu.load('es.explain.lg').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-24-explain_document_lg_no.md b/docs/_posts/ahmedlone127/2023-05-24-explain_document_lg_no.md index 9702d232220434..927822969f8122 100644 --- a/docs/_posts/ahmedlone127/2023-05-24-explain_document_lg_no.md +++ b/docs/_posts/ahmedlone127/2023-05-24-explain_document_lg_no.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_lg', lang = 'no') -annotations = pipeline.fullAnnotate(""Hei fra John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_lg", lang = "no") -val result = pipeline.fullAnnotate("Hei fra John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hei fra John Snow Labs! ""] -result_df = nlu.load('no.explain.lg').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-24-explain_document_lg_ru.md b/docs/_posts/ahmedlone127/2023-05-24-explain_document_lg_ru.md index 9fdae922e46e8a..64c7829a9140f0 100644 --- a/docs/_posts/ahmedlone127/2023-05-24-explain_document_lg_ru.md +++ b/docs/_posts/ahmedlone127/2023-05-24-explain_document_lg_ru.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_lg', lang = 'ru') -annotations = pipeline.fullAnnotate(""Здравствуйте из Джона Снежных Лабораторий! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_lg", lang = "ru") -val result = pipeline.fullAnnotate("Здравствуйте из Джона Снежных Лабораторий! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Здравствуйте из Джона Снежных Лабораторий! ""] -result_df = nlu.load('ru.explain.lg').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-24-explain_document_lg_sv.md b/docs/_posts/ahmedlone127/2023-05-24-explain_document_lg_sv.md index 132f8cdbb495a2..147cc6720b1ea2 100644 --- a/docs/_posts/ahmedlone127/2023-05-24-explain_document_lg_sv.md +++ b/docs/_posts/ahmedlone127/2023-05-24-explain_document_lg_sv.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_lg', lang = 'sv') -annotations = pipeline.fullAnnotate(""Hej från John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_lg", lang = "sv") -val result = pipeline.fullAnnotate("Hej från John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hej från John Snow Labs! ""] -result_df = nlu.load('sv.explain.lg').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-24-explain_document_md_de.md b/docs/_posts/ahmedlone127/2023-05-24-explain_document_md_de.md index 3d4f4dc3ef291d..bf618f14deec66 100644 --- a/docs/_posts/ahmedlone127/2023-05-24-explain_document_md_de.md +++ b/docs/_posts/ahmedlone127/2023-05-24-explain_document_md_de.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_md', lang = 'de') -annotations = pipeline.fullAnnotate(""Hallo aus John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_md", lang = "de") -val result = pipeline.fullAnnotate("Hallo aus John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hallo aus John Snow Labs! ""] -result_df = nlu.load('de.explain.document').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-24-explain_document_md_es.md b/docs/_posts/ahmedlone127/2023-05-24-explain_document_md_es.md index 0ce6e3cfe83274..0a4b97317d5dc5 100644 --- a/docs/_posts/ahmedlone127/2023-05-24-explain_document_md_es.md +++ b/docs/_posts/ahmedlone127/2023-05-24-explain_document_md_es.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_md', lang = 'es') -annotations = pipeline.fullAnnotate(""Hola de John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_md", lang = "es") -val result = pipeline.fullAnnotate("Hola de John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hola de John Snow Labs! ""] -result_df = nlu.load('es.explain.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-24-explain_document_md_fr.md b/docs/_posts/ahmedlone127/2023-05-24-explain_document_md_fr.md index a43059872d0343..a42c90e8fcb162 100644 --- a/docs/_posts/ahmedlone127/2023-05-24-explain_document_md_fr.md +++ b/docs/_posts/ahmedlone127/2023-05-24-explain_document_md_fr.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_md', lang = 'fr') -annotations = pipeline.fullAnnotate(""Bonjour de John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_md", lang = "fr") -val result = pipeline.fullAnnotate("Bonjour de John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Bonjour de John Snow Labs! ""] -result_df = nlu.load('fr.explain.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-24-explain_document_md_no.md b/docs/_posts/ahmedlone127/2023-05-24-explain_document_md_no.md index d0fc0624d92ee7..722979d39c9881 100644 --- a/docs/_posts/ahmedlone127/2023-05-24-explain_document_md_no.md +++ b/docs/_posts/ahmedlone127/2023-05-24-explain_document_md_no.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_md', lang = 'no') -annotations = pipeline.fullAnnotate(""Hei fra John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_md", lang = "no") -val result = pipeline.fullAnnotate("Hei fra John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hei fra John Snow Labs! ""] -result_df = nlu.load('no.explain.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-24-explain_document_md_ru.md b/docs/_posts/ahmedlone127/2023-05-24-explain_document_md_ru.md index 761bb44e1825bd..d009a4bbde8940 100644 --- a/docs/_posts/ahmedlone127/2023-05-24-explain_document_md_ru.md +++ b/docs/_posts/ahmedlone127/2023-05-24-explain_document_md_ru.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_md', lang = 'ru') -annotations = pipeline.fullAnnotate(""Здравствуйте из Джона Снежных Лабораторий! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_md", lang = "ru") -val result = pipeline.fullAnnotate("Здравствуйте из Джона Снежных Лабораторий! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Здравствуйте из Джона Снежных Лабораторий! ""] -result_df = nlu.load('ru.explain.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-24-explain_document_md_sv.md b/docs/_posts/ahmedlone127/2023-05-24-explain_document_md_sv.md index 395727eadff20a..2e3085c84f1d20 100644 --- a/docs/_posts/ahmedlone127/2023-05-24-explain_document_md_sv.md +++ b/docs/_posts/ahmedlone127/2023-05-24-explain_document_md_sv.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_md', lang = 'sv') -annotations = pipeline.fullAnnotate(""Hej från John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_md", lang = "sv") -val result = pipeline.fullAnnotate("Hej från John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hej från John Snow Labs! ""] -result_df = nlu.load('sv.explain.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-24-explain_document_ml_en.md b/docs/_posts/ahmedlone127/2023-05-24-explain_document_ml_en.md index c8c470caefcf24..4261fe36617030 100644 --- a/docs/_posts/ahmedlone127/2023-05-24-explain_document_ml_en.md +++ b/docs/_posts/ahmedlone127/2023-05-24-explain_document_ml_en.md @@ -34,33 +34,7 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline('explain_document_ml', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() -``` -```scala - - -val pipeline = new PretrainedPipeline("explain_document_ml", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.explain').predict(text) -result_df -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-24-explain_document_sm_es.md b/docs/_posts/ahmedlone127/2023-05-24-explain_document_sm_es.md index edcce5d9a5a792..95b955ce51bcfb 100644 --- a/docs/_posts/ahmedlone127/2023-05-24-explain_document_sm_es.md +++ b/docs/_posts/ahmedlone127/2023-05-24-explain_document_sm_es.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_sm', lang = 'es') -annotations = pipeline.fullAnnotate(""Hola de John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_sm", lang = "es") -val result = pipeline.fullAnnotate("Hola de John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hola de John Snow Labs! ""] -result_df = nlu.load('es.explain').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-24-explain_document_sm_no.md b/docs/_posts/ahmedlone127/2023-05-24-explain_document_sm_no.md index 52a43cf866c269..6b300ca302d561 100644 --- a/docs/_posts/ahmedlone127/2023-05-24-explain_document_sm_no.md +++ b/docs/_posts/ahmedlone127/2023-05-24-explain_document_sm_no.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_sm', lang = 'no') -annotations = pipeline.fullAnnotate(""Hei fra John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_sm", lang = "no") -val result = pipeline.fullAnnotate("Hei fra John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hei fra John Snow Labs! ""] -result_df = nlu.load('no.explain').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-24-explain_document_sm_ru.md b/docs/_posts/ahmedlone127/2023-05-24-explain_document_sm_ru.md index 782cc68a2a9e61..b1c0f204de2528 100644 --- a/docs/_posts/ahmedlone127/2023-05-24-explain_document_sm_ru.md +++ b/docs/_posts/ahmedlone127/2023-05-24-explain_document_sm_ru.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_sm', lang = 'ru') -annotations = pipeline.fullAnnotate(""Здравствуйте из Джона Снежных Лабораторий! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_sm", lang = "ru") -val result = pipeline.fullAnnotate("Здравствуйте из Джона Снежных Лабораторий! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Здравствуйте из Джона Снежных Лабораторий! ""] -result_df = nlu.load('ru.explain').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-24-explain_document_sm_sv.md b/docs/_posts/ahmedlone127/2023-05-24-explain_document_sm_sv.md index eb558461247667..04a0d72c777ffb 100644 --- a/docs/_posts/ahmedlone127/2023-05-24-explain_document_sm_sv.md +++ b/docs/_posts/ahmedlone127/2023-05-24-explain_document_sm_sv.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_sm', lang = 'sv') -annotations = pipeline.fullAnnotate(""Hej från John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_sm", lang = "sv") -val result = pipeline.fullAnnotate("Hej från John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hej från John Snow Labs! ""] -result_df = nlu.load('sv.explain').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-24-match_chunks_en.md b/docs/_posts/ahmedlone127/2023-05-24-match_chunks_en.md index bc4e550333f299..27edbcd4dcba6d 100644 --- a/docs/_posts/ahmedlone127/2023-05-24-match_chunks_en.md +++ b/docs/_posts/ahmedlone127/2023-05-24-match_chunks_en.md @@ -32,41 +32,7 @@ The pipeline uses regex `
?/*+` ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipeline - -pipeline_local = PretrainedPipeline('match_chunks') - -result = pipeline_local.annotate("David visited the restaurant yesterday with his family. He also visited and the day before, but at that time he was alone. David again visited today with his colleagues. He and his friends really liked the food and hoped to visit again tomorrow.") - -result['chunk'] -``` -```scala - -import com.johnsnowlabs.nlp.pretrained.PretrainedPipeline import com.johnsnowlabs.nlp.SparkNLP - -SparkNLP.version() -val testData = spark.createDataFrame(Seq( (1, "David visited the restaurant yesterday with his family. He also visited and the day before, but at that time he was alone. David again visited today with his colleagues. He and his friends really liked the food and hoped to visit again tomorrow."))).toDF("id", "text") - -val pipeline = PretrainedPipeline("match_chunks", lang="en") - -val annotation = pipeline.transform(testData) - -annotation.show() -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("en.match.chunks").predict("""David visited the restaurant yesterday with his family. He also visited and the day before, but at that time he was alone. David again visited today with his colleagues. He and his friends really liked the food and hoped to visit again tomorrow.""") -``` - -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-24-match_datetime_en.md b/docs/_posts/ahmedlone127/2023-05-24-match_datetime_en.md index 14a0f3958959fb..3d4f273132097c 100644 --- a/docs/_posts/ahmedlone127/2023-05-24-match_datetime_en.md +++ b/docs/_posts/ahmedlone127/2023-05-24-match_datetime_en.md @@ -32,35 +32,7 @@ DateMatcher based on yyyy/MM/dd ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -pipeline_local = PretrainedPipeline('match_datetime') - -tres = pipeline_local.fullAnnotate(input_list)[0] -for dte in tres['date']: - sent = tres['sentence'][int(dte.metadata['sentence'])] - print (f'text/chunk {sent.result[dte.begin:dte.end+1]} | mapped_date: {dte.result}') -``` -```scala - -import com.johnsnowlabs.nlp.pretrained.PretrainedPipeline import com.johnsnowlabs.nlp.SparkNLP -SparkNLP.version() - -val testData = spark.createDataFrame(Seq( (1, "David visited the restaurant yesterday with his family. -He also visited and the day before, but at that time he was alone. -David again visited today with his colleagues. -He and his friends really liked the food and hoped to visit again tomorrow."))).toDF("id", "text") - -val pipeline = PretrainedPipeline("match_datetime", lang="en") - -val annotation = pipeline.transform(testData) - -annotation.show() -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-24-match_pattern_en.md b/docs/_posts/ahmedlone127/2023-05-24-match_pattern_en.md index f6664a3ddd1cb7..05e23273179e6b 100644 --- a/docs/_posts/ahmedlone127/2023-05-24-match_pattern_en.md +++ b/docs/_posts/ahmedlone127/2023-05-24-match_pattern_en.md @@ -33,16 +33,7 @@ The match_pattern is a pretrained pipeline that we can use to process text with ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("match_pattern", "en", "clinical/models") - result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-05-24-movies_sentiment_analysis_en.md b/docs/_posts/ahmedlone127/2023-05-24-movies_sentiment_analysis_en.md index ffc88a8a21c0af..1e277044f1530a 100644 --- a/docs/_posts/ahmedlone127/2023-05-24-movies_sentiment_analysis_en.md +++ b/docs/_posts/ahmedlone127/2023-05-24-movies_sentiment_analysis_en.md @@ -33,16 +33,7 @@ The movies_sentiment_analysis is a pretrained pipeline that we can use to proces ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("movies_sentiment_analysis", "en") -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-05-24-onto_recognize_entities_lg_en.md b/docs/_posts/ahmedlone127/2023-05-24-onto_recognize_entities_lg_en.md index c53073ddb80d2f..b2d21a19e91baa 100644 --- a/docs/_posts/ahmedlone127/2023-05-24-onto_recognize_entities_lg_en.md +++ b/docs/_posts/ahmedlone127/2023-05-24-onto_recognize_entities_lg_en.md @@ -33,25 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("onto_recognize_entities_lg", "en") - -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -{:.nlu-block} -```python -import nlu -nlu.load("en.ner.onto.lg").predict("""I love johnsnowlabs! """) -``` - -
- {:.model-param}
diff --git a/docs/_posts/ahmedlone127/2023-05-24-onto_recognize_entities_sm_en.md b/docs/_posts/ahmedlone127/2023-05-24-onto_recognize_entities_sm_en.md index 61c9e4f510886b..250716e139ac16 100644 --- a/docs/_posts/ahmedlone127/2023-05-24-onto_recognize_entities_sm_en.md +++ b/docs/_posts/ahmedlone127/2023-05-24-onto_recognize_entities_sm_en.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('onto_recognize_entities_sm', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("onto_recognize_entities_sm", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.ner.onto.sm').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-24-recognize_entities_bert_en.md b/docs/_posts/ahmedlone127/2023-05-24-recognize_entities_bert_en.md index b57803f6d35a4e..6b3629ad27c371 100644 --- a/docs/_posts/ahmedlone127/2023-05-24-recognize_entities_bert_en.md +++ b/docs/_posts/ahmedlone127/2023-05-24-recognize_entities_bert_en.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('recognize_entities_bert', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("recognize_entities_bert", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.ner.bert').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-24-recognize_entities_dl_en.md b/docs/_posts/ahmedlone127/2023-05-24-recognize_entities_dl_en.md index aad937ec1cdd60..2706b675fcf069 100644 --- a/docs/_posts/ahmedlone127/2023-05-24-recognize_entities_dl_en.md +++ b/docs/_posts/ahmedlone127/2023-05-24-recognize_entities_dl_en.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('recognize_entities_dl', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("recognize_entities_dl", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.ner').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-24-text_cleaning_en.md b/docs/_posts/ahmedlone127/2023-05-24-text_cleaning_en.md index df3850fb08eb8e..1fb49f48f29565 100644 --- a/docs/_posts/ahmedlone127/2023-05-24-text_cleaning_en.md +++ b/docs/_posts/ahmedlone127/2023-05-24-text_cleaning_en.md @@ -33,16 +33,7 @@ The text_cleaning is a pretrained pipeline that we can use to process text with ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("text_cleaning", "en") -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-05-25-albert_base_token_classifier_conll03_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-25-albert_base_token_classifier_conll03_pipeline_en.md index e2e1cc820d93d9..1a614340b5e4f1 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-albert_base_token_classifier_conll03_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-25-albert_base_token_classifier_conll03_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [albert_base_token_classifier_co ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("albert_base_token_classifier_conll03_pipeline", lang = "en") - -pipeline.annotate("My name is John and I work at John Snow Labs.") -``` -```scala - - -val pipeline = new PretrainedPipeline("albert_base_token_classifier_conll03_pipeline", lang = "en") -pipeline.annotate("My name is John and I work at John Snow Labs.")) -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-25-albert_large_token_classifier_conll03_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-25-albert_large_token_classifier_conll03_pipeline_en.md index 8e78af9a31809a..218612f0a2d072 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-albert_large_token_classifier_conll03_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-25-albert_large_token_classifier_conll03_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [albert_large_token_classifier_c ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("albert_large_token_classifier_conll03_pipeline", lang = "en") - -pipeline.annotate("My name is John and I work at John Snow Labs.") -``` -```scala - - -val pipeline = new PretrainedPipeline("albert_large_token_classifier_conll03_pipeline", lang = "en") -pipeline.annotate("My name is John and I work at John Snow Labs.")) -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-25-albert_xlarge_token_classifier_conll03_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-25-albert_xlarge_token_classifier_conll03_pipeline_en.md index 4ae7fcc69bac01..4a76a5ffdcb430 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-albert_xlarge_token_classifier_conll03_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-25-albert_xlarge_token_classifier_conll03_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [albert_xlarge_token_classifier_ ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("albert_xlarge_token_classifier_conll03_pipeline", lang = "en") - -pipeline.annotate("My name is John and I work at John Snow Labs.") -``` -```scala - - -val pipeline = new PretrainedPipeline("albert_xlarge_token_classifier_conll03_pipeline", lang = "en") -pipeline.annotate("My name is John and I work at John Snow Labs.")) -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-25-analyze_sentiment_en.md b/docs/_posts/ahmedlone127/2023-05-25-analyze_sentiment_en.md index 8bdc4ac6e9d31a..0772d9c28e4f1c 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-analyze_sentiment_en.md +++ b/docs/_posts/ahmedlone127/2023-05-25-analyze_sentiment_en.md @@ -34,39 +34,7 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} - -```python - -from sparknlp.pretrained import PretrainedPipeline - -pipeline = PretrainedPipeline('analyze_sentiment', lang = 'en') - -result = pipeline.fullAnnotate("""Demonicus is a movie turned into a video game! I just love the story and the things that goes on in the film.It is a B-film ofcourse but that doesn`t bother one bit because its made just right and the music was rad! Horror and sword fight freaks,buy this movie now!""") - - -``` -```scala - -import com.johnsnowlabs.nlp.pretrained.PretrainedPipeline -val pipeline = new PretrainedPipeline("analyze_sentiment", lang = "en") - -val result = pipeline.fullAnnotate("""Demonicus is a movie turned into a video game! I just love the story and the things that goes on in the film.It is a B-film ofcourse but that doesn`t bother one bit because its made just right and the music was rad! Horror and sword fight freaks,buy this movie now!""") - -``` - -{:.nlu-block} -```python - -import nlu -text = ["""Demonicus is a movie turned into a video game! I just love the story and the things that goes on in the film.It is a B-film ofcourse but that doesn`t bother one bit because its made just right and the music was rad! Horror and sword fight freaks,buy this movie now!"""] -result_df = nlu.load('en.classify').predict(text) -result_df - -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-25-analyze_sentimentdl_glove_imdb_en.md b/docs/_posts/ahmedlone127/2023-05-25-analyze_sentimentdl_glove_imdb_en.md index 2706b7b2ff19b3..161023da722d18 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-analyze_sentimentdl_glove_imdb_en.md +++ b/docs/_posts/ahmedlone127/2023-05-25-analyze_sentimentdl_glove_imdb_en.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('analyze_sentimentdl_glove_imdb', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("analyze_sentimentdl_glove_imdb", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.sentiment.glove').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-25-bert_sequence_classifier_age_news_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-25-bert_sequence_classifier_age_news_pipeline_en.md index e58bd487c8d55e..e261c7c911c9e2 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-bert_sequence_classifier_age_news_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-25-bert_sequence_classifier_age_news_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [bert_sequence_classifier_age_ne ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -news_pipeline = PretrainedPipeline("bert_sequence_classifier_age_news_pipeline", lang = "en") - -news_pipeline.annotate("Microsoft has taken its first step into the metaverse.") -``` -```scala - - -val news_pipeline = new PretrainedPipeline("bert_sequence_classifier_age_news_pipeline", lang = "en") -news_pipeline.annotate("Microsoft has taken its first step into the metaverse.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-25-bert_sequence_classifier_trec_coarse_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-25-bert_sequence_classifier_trec_coarse_pipeline_en.md index a60580df832493..3bebd8be5a253a 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-bert_sequence_classifier_trec_coarse_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-25-bert_sequence_classifier_trec_coarse_pipeline_en.md @@ -34,23 +34,7 @@ The TREC dataset for question classification consists of open-domain, fact-based ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -trec_pipeline = PretrainedPipeline("bert_sequence_classifier_trec_coarse_pipeline", lang = "en") - -trec_pipeline.annotate("Germany is the largest country in Europe economically.") -``` -```scala - - -val trec_pipeline = new PretrainedPipeline("bert_sequence_classifier_trec_coarse_pipeline", lang = "en") -trec_pipeline.annotate("Germany is the largest country in Europe economically.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-25-bert_token_classifier_dutch_udlassy_ner_pipeline_nl.md b/docs/_posts/ahmedlone127/2023-05-25-bert_token_classifier_dutch_udlassy_ner_pipeline_nl.md index 334a754c8aadbe..0a5d83e6f0cc16 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-bert_token_classifier_dutch_udlassy_ner_pipeline_nl.md +++ b/docs/_posts/ahmedlone127/2023-05-25-bert_token_classifier_dutch_udlassy_ner_pipeline_nl.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on the top of [bert_token_classifier_dutch_udl ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -pipeline = PretrainedPipeline("bert_token_classifier_dutch_udlassy_ner_pipeline", lang = "nl") - -pipeline.annotate("Mijn naam is Peter Fergusson. Ik woon sinds oktober 2011 in New York en werk 5 jaar bij Tesla Motor.") -``` -```scala - -val pipeline = new PretrainedPipeline("bert_token_classifier_dutch_udlassy_ner_pipeline", lang = "nl") -pipeline.annotate("Mijn naam is Peter Fergusson. Ik woon sinds oktober 2011 in New York en werk 5 jaar bij Tesla Motor.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-25-bert_token_classifier_hi_en_ner_pipeline_hi.md b/docs/_posts/ahmedlone127/2023-05-25-bert_token_classifier_hi_en_ner_pipeline_hi.md index cec6fc28e13e46..9658e818519183 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-bert_token_classifier_hi_en_ner_pipeline_hi.md +++ b/docs/_posts/ahmedlone127/2023-05-25-bert_token_classifier_hi_en_ner_pipeline_hi.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on [bert_token_classifier_hi_en_ner](https://n ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -pipeline = PretrainedPipeline("bert_token_classifier_hi_en_ner_pipeline", lang = "hi") - -pipeline.annotate("रिलायंस इंडस्ट्रीज़ लिमिटेड (Reliance Industries Limited) एक भारतीय संगुटिका नियंत्रक कंपनी है, जिसका मुख्यालय मुंबई, महाराष्ट्र (Maharashtra) में स्थित है।रतन नवल टाटा (28 दिसंबर 1937, को मुम्बई (Mumbai), में जन्मे) टाटा समुह के वर्तमान अध्यक्ष, जो भारत की सबसे बड़ी व्यापारिक समूह है, जिसकी स्थापना जमशेदजी टाटा ने की और उनके परिवार की पीढियों ने इसका विस्तार किया और इसे दृढ़ बनाया।") -``` -```scala - -val pipeline = new PretrainedPipeline("bert_token_classifier_hi_en_ner_pipeline", lang = "hi") -val pipeline.annotate("रिलायंस इंडस्ट्रीज़ लिमिटेड (Reliance Industries Limited) एक भारतीय संगुटिका नियंत्रक कंपनी है, जिसका मुख्यालय मुंबई, महाराष्ट्र (Maharashtra) में स्थित है।रतन नवल टाटा (28 दिसंबर 1937, को मुम्बई (Mumbai), में जन्मे) टाटा समुह के वर्तमान अध्यक्ष, जो भारत की सबसे बड़ी व्यापारिक समूह है, जिसकी स्थापना जमशेदजी टाटा ने की और उनके परिवार की पीढियों ने इसका विस्तार किया और इसे दृढ़ बनाया।") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-25-bert_token_classifier_scandi_ner_pipeline_xx.md b/docs/_posts/ahmedlone127/2023-05-25-bert_token_classifier_scandi_ner_pipeline_xx.md index 1d374a3449d63e..d62223e03a0a82 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-bert_token_classifier_scandi_ner_pipeline_xx.md +++ b/docs/_posts/ahmedlone127/2023-05-25-bert_token_classifier_scandi_ner_pipeline_xx.md @@ -32,20 +32,7 @@ This pretrained pipeline is built on [bert_token_classifier_scandi_ner](https:// ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -scandiner_pipeline = PretrainedPipeline("bert_token_classifier_scandi_ner_pipeline", lang = "xx") -scandiner_pipeline.annotate("Hans er professor ved Statens Universitet, som ligger i København, og han er en rigtig københavner.") -``` -```scala - -val scandiner_pipeline = new PretrainedPipeline("bert_token_classifier_scandi_ner_pipeline", lang = "xx") - -val scandiner_pipeline.annotate("Hans er professor ved Statens Universitet, som ligger i København, og han er en rigtig københavner.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-25-clean_pattern_en.md b/docs/_posts/ahmedlone127/2023-05-25-clean_pattern_en.md index f8f32369a4eda7..3792288064faae 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-clean_pattern_en.md +++ b/docs/_posts/ahmedlone127/2023-05-25-clean_pattern_en.md @@ -34,33 +34,7 @@ The clean_pattern is a pretrained pipeline that we can use to process text with ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('clean_pattern', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() -``` -```scala - - -val pipeline = new PretrainedPipeline("clean_pattern", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.clean.pattern').predict(text) -result_df -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-25-clean_stop_en.md b/docs/_posts/ahmedlone127/2023-05-25-clean_stop_en.md index 0f2a945ce528cf..23a7966fc4f16d 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-clean_stop_en.md +++ b/docs/_posts/ahmedlone127/2023-05-25-clean_stop_en.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('clean_stop', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("clean_stop", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.clean.stop').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-25-distilbert_base_token_classifier_masakhaner_pipeline_xx.md b/docs/_posts/ahmedlone127/2023-05-25-distilbert_base_token_classifier_masakhaner_pipeline_xx.md index 51bb9ddb9ce828..d48859e9a7b294 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-distilbert_base_token_classifier_masakhaner_pipeline_xx.md +++ b/docs/_posts/ahmedlone127/2023-05-25-distilbert_base_token_classifier_masakhaner_pipeline_xx.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on the top of [distilbert_base_token_classifie ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -masakhaner_pipeline = PretrainedPipeline("distilbert_base_token_classifier_masakhaner_pipeline", lang = "xx") - -masakhaner_pipeline.annotate("Ilé-iṣẹ́ẹ Mohammed Sani Musa, Activate Technologies Limited, ni ó kó ẹ̀rọ Ìwé-pélébé Ìdìbò Alálòpẹ́ (PVCs) tí a lò fún ìbò ọdún-un 2019, ígbà tí ó jẹ́ òǹdíjedupò lábẹ́ ẹgbẹ́ olóṣèlúu tí ó ń tukọ̀ ètò ìṣèlú lọ́wọ́ All rogressives Congress (APC) fún Aṣojú Ìlà-Oòrùn Niger, ìyẹn gẹ́gẹ́ bí ilé iṣẹ́ aṣèwádìí, Premium Times ṣe tẹ̀ ẹ́ jáde.") -``` -```scala - -val masakhaner_pipeline = new PretrainedPipeline("distilbert_base_token_classifier_masakhaner_pipeline", lang = "xx") -masakhaner_pipeline.annotate("Ilé-iṣẹ́ẹ Mohammed Sani Musa, Activate Technologies Limited, ni ó kó ẹ̀rọ Ìwé-pélébé Ìdìbò Alálòpẹ́ (PVCs) tí a lò fún ìbò ọdún-un 2019, ígbà tí ó jẹ́ òǹdíjedupò lábẹ́ ẹgbẹ́ olóṣèlúu tí ó ń tukọ̀ ètò ìṣèlú lọ́wọ́ All rogressives Congress (APC) fún Aṣojú Ìlà-Oòrùn Niger, ìyẹn gẹ́gẹ́ bí ilé iṣẹ́ aṣèwádìí, Premium Times ṣe tẹ̀ ẹ́ jáde.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-25-distilbert_token_classifier_typo_detector_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-25-distilbert_token_classifier_typo_detector_pipeline_en.md index 16dcc217ef93ab..f99979eac55ad4 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-distilbert_token_classifier_typo_detector_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-25-distilbert_token_classifier_typo_detector_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [distilbert_token_classifier_typ ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -typo_pipeline = PretrainedPipeline("distilbert_token_classifier_typo_detector_pipeline", lang = "en") - -typo_pipeline.annotate("He had also stgruggled with addiction during his tine in Congress.") -``` -```scala - - -val typo_pipeline = new PretrainedPipeline("distilbert_token_classifier_typo_detector_pipeline", lang = "en") -typo_pipeline.annotate("He had also stgruggled with addiction during his tine in Congress.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-25-distilbert_token_classifier_typo_detector_pipeline_is.md b/docs/_posts/ahmedlone127/2023-05-25-distilbert_token_classifier_typo_detector_pipeline_is.md index 02feb817995b9d..3efd91f556d73d 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-distilbert_token_classifier_typo_detector_pipeline_is.md +++ b/docs/_posts/ahmedlone127/2023-05-25-distilbert_token_classifier_typo_detector_pipeline_is.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on the top of [distilbert_token_classifier_typ ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -typo_pipeline = PretrainedPipeline("distilbert_token_classifier_typo_detector_pipeline", lang = "is") - -typo_pipeline.annotate("Það er miög auðvelt að draga marktækar álykanir af texta með Spark NLP.") -``` -```scala - -val typo_pipeline = new PretrainedPipeline("distilbert_token_classifier_typo_detector_pipeline", lang = "is") -typo_pipeline.annotate("Það er miög auðvelt að draga marktækar álykanir af texta með Spark NLP.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-25-distilroberta_base_token_classifier_ontonotes_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-25-distilroberta_base_token_classifier_ontonotes_pipeline_en.md index 7d8c43b01b758d..f13b797bf40650 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-distilroberta_base_token_classifier_ontonotes_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-25-distilroberta_base_token_classifier_ontonotes_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [distilroberta_base_token_classi ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("distilroberta_base_token_classifier_ontonotes_pipeline", lang = "en") - -pipeline.annotate("My name is John and I have been working at John Snow Labs since November 2020.") -``` -```scala - - -val pipeline = new PretrainedPipeline("distilroberta_base_token_classifier_ontonotes_pipeline", lang = "en") -pipeline.annotate("My name is John and I have been working at John Snow Labs since November 2020.")) -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_lg_da.md b/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_lg_da.md index a914f9245e6972..59802a0bcbad8a 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_lg_da.md +++ b/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_lg_da.md @@ -33,25 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("entity_recognizer_lg", "da") - -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -{:.nlu-block} -```python -import nlu -nlu.load("da.ner.lg").predict("""I love johnsnowlabs! """) -``` - -
- {:.model-param}
diff --git a/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_lg_de.md b/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_lg_de.md index ac74fffbb10209..4f21140076ebaa 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_lg_de.md +++ b/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_lg_de.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_lg', lang = 'de') -annotations = pipeline.fullAnnotate(""Hallo aus John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_lg", lang = "de") -val result = pipeline.fullAnnotate("Hallo aus John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hallo aus John Snow Labs! ""] -result_df = nlu.load('de.ner.recognizer.lg').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_lg_es.md b/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_lg_es.md index dcaf88d51af2a1..88a630747ad3cf 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_lg_es.md +++ b/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_lg_es.md @@ -33,25 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("entity_recognizer_lg", "es") - -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -{:.nlu-block} -```python -import nlu -nlu.load("es.ner.lg").predict("""I love johnsnowlabs! """) -``` - -
- {:.model-param}
diff --git a/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_lg_fi.md b/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_lg_fi.md index 013f16d4dbdb1c..eca405694552fd 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_lg_fi.md +++ b/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_lg_fi.md @@ -33,26 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("entity_recognizer_lg", "fi") - -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -{:.nlu-block} -```python -import nlu -nlu.load("fi.ner.lg").predict("""I love johnsnowlabs! """) -``` - -
- {:.model-param}
diff --git a/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_lg_fr.md b/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_lg_fr.md index 9c4e73c2af609a..1be455c32ecb6b 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_lg_fr.md +++ b/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_lg_fr.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_lg', lang = 'fr') -annotations = pipeline.fullAnnotate(""Bonjour de John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_lg", lang = "fr") -val result = pipeline.fullAnnotate("Bonjour de John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Bonjour de John Snow Labs! ""] -result_df = nlu.load('fr.ner').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_lg_nl.md b/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_lg_nl.md index fd4314e0006bfc..c477ba006ebc41 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_lg_nl.md +++ b/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_lg_nl.md @@ -33,25 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("entity_recognizer_lg", "nl") - -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -{:.nlu-block} -```python -import nlu -nlu.load("nl.ner.lg").predict("""I love johnsnowlabs! """) -``` - -
- {:.model-param}
diff --git a/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_lg_no.md b/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_lg_no.md index 35fa6de66de6f0..7ee980b966fd63 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_lg_no.md +++ b/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_lg_no.md @@ -33,25 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("entity_recognizer_lg", "no") - -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -{:.nlu-block} -```python -import nlu -nlu.load("no.ner.lg").predict("""I love johnsnowlabs! """) -``` - -
- {:.model-param}
diff --git a/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_lg_pl.md b/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_lg_pl.md index 44db088ba2847b..7826ebab1b0bdf 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_lg_pl.md +++ b/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_lg_pl.md @@ -33,25 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("entity_recognizer_lg", "pl") - -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -{:.nlu-block} -```python -import nlu -nlu.load("pl.ner.lg").predict("""I love johnsnowlabs! """) -``` - -
- {:.model-param}
diff --git a/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_lg_pt.md b/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_lg_pt.md index 82b823e2afca0a..915503690ea2a8 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_lg_pt.md +++ b/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_lg_pt.md @@ -33,25 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("entity_recognizer_lg", "pt") - -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -{:.nlu-block} -```python -import nlu -nlu.load("pt.ner.lg").predict("""I love johnsnowlabs! """) -``` - -
- {:.model-param}
diff --git a/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_lg_ru.md b/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_lg_ru.md index a4c97678e65201..276a15804f031e 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_lg_ru.md +++ b/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_lg_ru.md @@ -33,25 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("entity_recognizer_lg", "ru") - -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -{:.nlu-block} -```python -import nlu -nlu.load("ru.ner.lg").predict("""I love johnsnowlabs! """) -``` - -
- {:.model-param}
diff --git a/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_lg_sv.md b/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_lg_sv.md index d7bb9221fbf93c..fe7caf70f6fc7f 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_lg_sv.md +++ b/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_lg_sv.md @@ -33,25 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("entity_recognizer_lg", "sv") - -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -{:.nlu-block} -```python -import nlu -nlu.load("sv.ner.lg").predict("""I love johnsnowlabs! """) -``` - -
- {:.model-param}
diff --git a/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_md_da.md b/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_md_da.md index 8aaa0181ed988d..cd0afbbbbae3cd 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_md_da.md +++ b/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_md_da.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_md', lang = 'da') -annotations = pipeline.fullAnnotate(""Hej fra John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_md", lang = "da") -val result = pipeline.fullAnnotate("Hej fra John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hej fra John Snow Labs! ""] -result_df = nlu.load('da.ner.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_md_de.md b/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_md_de.md index ad7bc5c4ca7a30..33c4398a889214 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_md_de.md +++ b/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_md_de.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_md', lang = 'de') -annotations = pipeline.fullAnnotate(""Hallo aus John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_md", lang = "de") -val result = pipeline.fullAnnotate("Hallo aus John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hallo aus John Snow Labs! ""] -result_df = nlu.load('de.ner.recognizer').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_md_es.md b/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_md_es.md index 83f9541829c9aa..6a72f30df6c8c9 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_md_es.md +++ b/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_md_es.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_md', lang = 'es') -annotations = pipeline.fullAnnotate(""Hola de John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_md", lang = "es") -val result = pipeline.fullAnnotate("Hola de John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hola de John Snow Labs! ""] -result_df = nlu.load('es.ner.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_md_fi.md b/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_md_fi.md index fe05574fe2541a..29dbedc0154910 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_md_fi.md +++ b/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_md_fi.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_md', lang = 'fi') -annotations = pipeline.fullAnnotate(""Hei John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_md", lang = "fi") -val result = pipeline.fullAnnotate("Hei John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hei John Snow Labs! ""] -result_df = nlu.load('fi.ner.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_md_fr.md b/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_md_fr.md index 3b4d8d57efb687..4970917de162da 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_md_fr.md +++ b/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_md_fr.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_md', lang = 'fr') -annotations = pipeline.fullAnnotate(""Bonjour de John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_md", lang = "fr") -val result = pipeline.fullAnnotate("Bonjour de John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Bonjour de John Snow Labs! ""] -result_df = nlu.load('fr.ner.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_md_no.md b/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_md_no.md index fd95d668ad2f48..eeaaafd113c28d 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_md_no.md +++ b/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_md_no.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_md', lang = 'no') -annotations = pipeline.fullAnnotate(""Hei fra John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_md", lang = "no") -val result = pipeline.fullAnnotate("Hei fra John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hei fra John Snow Labs! ""] -result_df = nlu.load('no.ner.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_md_ru.md b/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_md_ru.md index c05bbe85ae6a23..db13ad5878697a 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_md_ru.md +++ b/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_md_ru.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_md', lang = 'ru') -annotations = pipeline.fullAnnotate(""Здравствуйте из Джона Снежных Лабораторий! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_md", lang = "ru") -val result = pipeline.fullAnnotate("Здравствуйте из Джона Снежных Лабораторий! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Здравствуйте из Джона Снежных Лабораторий! ""] -result_df = nlu.load('ru.ner.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_md_sv.md b/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_md_sv.md index 0d31ac7e45bec8..cfb85ccecf8843 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_md_sv.md +++ b/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_md_sv.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_md', lang = 'sv') -annotations = pipeline.fullAnnotate(""Hej från John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_md", lang = "sv") -val result = pipeline.fullAnnotate("Hej från John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hej från John Snow Labs! ""] -result_df = nlu.load('sv.ner.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_sm_da.md b/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_sm_da.md index b51c4758a0cf36..c5b677dd9af26a 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_sm_da.md +++ b/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_sm_da.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_sm', lang = 'da') -annotations = pipeline.fullAnnotate(""Hej fra John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_sm", lang = "da") -val result = pipeline.fullAnnotate("Hej fra John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hej fra John Snow Labs! ""] -result_df = nlu.load('da.ner').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_sm_es.md b/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_sm_es.md index d6b573223d9fb9..4c8bbeedc296cb 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_sm_es.md +++ b/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_sm_es.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_sm', lang = 'es') -annotations = pipeline.fullAnnotate(""Hola de John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_sm", lang = "es") -val result = pipeline.fullAnnotate("Hola de John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hola de John Snow Labs! ""] -result_df = nlu.load('es.ner').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_sm_fi.md b/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_sm_fi.md index b3a87b93f6edbd..3594c571a5ca26 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_sm_fi.md +++ b/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_sm_fi.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_sm', lang = 'fi') -annotations = pipeline.fullAnnotate(""Hei John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_sm", lang = "fi") -val result = pipeline.fullAnnotate("Hei John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hei John Snow Labs! ""] -result_df = nlu.load('fi.ner').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_sm_no.md b/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_sm_no.md index 123e862837174b..91c845f8ff6d25 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_sm_no.md +++ b/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_sm_no.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_sm', lang = 'no') -annotations = pipeline.fullAnnotate(""Hei fra John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_sm", lang = "no") -val result = pipeline.fullAnnotate("Hei fra John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hei fra John Snow Labs! ""] -result_df = nlu.load('no.ner').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_sm_ru.md b/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_sm_ru.md index 0ed56858781ab1..bb4f4ec3b9367e 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_sm_ru.md +++ b/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_sm_ru.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_sm', lang = 'ru') -annotations = pipeline.fullAnnotate(""Здравствуйте из Джона Снежных Лабораторий! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_sm", lang = "ru") -val result = pipeline.fullAnnotate("Здравствуйте из Джона Снежных Лабораторий! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Здравствуйте из Джона Снежных Лабораторий! ""] -result_df = nlu.load('ru.ner').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_sm_sv.md b/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_sm_sv.md index 5d8cd94201d0f6..cf1c0d7f06c112 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_sm_sv.md +++ b/docs/_posts/ahmedlone127/2023-05-25-entity_recognizer_sm_sv.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_sm', lang = 'sv') -annotations = pipeline.fullAnnotate(""Hej från John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_sm", lang = "sv") -val result = pipeline.fullAnnotate("Hej från John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hej från John Snow Labs! ""] -result_df = nlu.load('sv.ner').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-25-explain_document_dl_en.md b/docs/_posts/ahmedlone127/2023-05-25-explain_document_dl_en.md index 48ac092cf76157..789368cfc4405e 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-explain_document_dl_en.md +++ b/docs/_posts/ahmedlone127/2023-05-25-explain_document_dl_en.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline('explain_document_dl', lang = 'en') -annotations = pipeline.fullAnnotate("The Mona Lisa is an oil painting from the 16th century.")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_dl", lang = "en") -val result = pipeline.fullAnnotate("The Mona Lisa is an oil painting from the 16th century.")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = ["The Mona Lisa is an oil painting from the 16th century."] -result_df = nlu.load('en.explain.dl').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-25-explain_document_lg_da.md b/docs/_posts/ahmedlone127/2023-05-25-explain_document_lg_da.md index 0ccf156f06db78..208b052cd92456 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-explain_document_lg_da.md +++ b/docs/_posts/ahmedlone127/2023-05-25-explain_document_lg_da.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_lg', lang = 'da') -annotations = pipeline.fullAnnotate(""Hej fra John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_lg", lang = "da") -val result = pipeline.fullAnnotate("Hej fra John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hej fra John Snow Labs! ""] -result_df = nlu.load('da.explain.lg').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-25-explain_document_lg_es.md b/docs/_posts/ahmedlone127/2023-05-25-explain_document_lg_es.md index 60436844a502a7..beb2306b3c9768 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-explain_document_lg_es.md +++ b/docs/_posts/ahmedlone127/2023-05-25-explain_document_lg_es.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_lg', lang = 'es') -annotations = pipeline.fullAnnotate(""Hola de John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_lg", lang = "es") -val result = pipeline.fullAnnotate("Hola de John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hola de John Snow Labs! ""] -result_df = nlu.load('es.explain.lg').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-25-explain_document_lg_fi.md b/docs/_posts/ahmedlone127/2023-05-25-explain_document_lg_fi.md index 159abee951a035..34b28453b2e8e7 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-explain_document_lg_fi.md +++ b/docs/_posts/ahmedlone127/2023-05-25-explain_document_lg_fi.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_lg', lang = 'fi') -annotations = pipeline.fullAnnotate(""Hei John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_lg", lang = "fi") -val result = pipeline.fullAnnotate("Hei John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hei John Snow Labs! ""] -result_df = nlu.load('fi.explain.lg').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-25-explain_document_lg_no.md b/docs/_posts/ahmedlone127/2023-05-25-explain_document_lg_no.md index 43f95fdfc89ad0..220fe0f0c81668 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-explain_document_lg_no.md +++ b/docs/_posts/ahmedlone127/2023-05-25-explain_document_lg_no.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_lg', lang = 'no') -annotations = pipeline.fullAnnotate(""Hei fra John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_lg", lang = "no") -val result = pipeline.fullAnnotate("Hei fra John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hei fra John Snow Labs! ""] -result_df = nlu.load('no.explain.lg').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-25-explain_document_lg_ru.md b/docs/_posts/ahmedlone127/2023-05-25-explain_document_lg_ru.md index 4aef430d1f1da0..4b0702a4b41778 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-explain_document_lg_ru.md +++ b/docs/_posts/ahmedlone127/2023-05-25-explain_document_lg_ru.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_lg', lang = 'ru') -annotations = pipeline.fullAnnotate(""Здравствуйте из Джона Снежных Лабораторий! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_lg", lang = "ru") -val result = pipeline.fullAnnotate("Здравствуйте из Джона Снежных Лабораторий! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Здравствуйте из Джона Снежных Лабораторий! ""] -result_df = nlu.load('ru.explain.lg').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-25-explain_document_lg_sv.md b/docs/_posts/ahmedlone127/2023-05-25-explain_document_lg_sv.md index 61113b16764d0a..abce79b0904276 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-explain_document_lg_sv.md +++ b/docs/_posts/ahmedlone127/2023-05-25-explain_document_lg_sv.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_lg', lang = 'sv') -annotations = pipeline.fullAnnotate(""Hej från John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_lg", lang = "sv") -val result = pipeline.fullAnnotate("Hej från John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hej från John Snow Labs! ""] -result_df = nlu.load('sv.explain.lg').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-25-explain_document_md_da.md b/docs/_posts/ahmedlone127/2023-05-25-explain_document_md_da.md index fbfeb598e42d42..f1dd80cebc9903 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-explain_document_md_da.md +++ b/docs/_posts/ahmedlone127/2023-05-25-explain_document_md_da.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_md', lang = 'da') -annotations = pipeline.fullAnnotate(""Hej fra John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_md", lang = "da") -val result = pipeline.fullAnnotate("Hej fra John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hej fra John Snow Labs! ""] -result_df = nlu.load('da.explain.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-25-explain_document_md_de.md b/docs/_posts/ahmedlone127/2023-05-25-explain_document_md_de.md index 61a671d663cc95..c756947dbfb475 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-explain_document_md_de.md +++ b/docs/_posts/ahmedlone127/2023-05-25-explain_document_md_de.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_md', lang = 'de') -annotations = pipeline.fullAnnotate(""Hallo aus John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_md", lang = "de") -val result = pipeline.fullAnnotate("Hallo aus John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hallo aus John Snow Labs! ""] -result_df = nlu.load('de.explain.document').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-25-explain_document_md_es.md b/docs/_posts/ahmedlone127/2023-05-25-explain_document_md_es.md index 750f307ec55d0e..571ddc9bc2892e 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-explain_document_md_es.md +++ b/docs/_posts/ahmedlone127/2023-05-25-explain_document_md_es.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_md', lang = 'es') -annotations = pipeline.fullAnnotate(""Hola de John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_md", lang = "es") -val result = pipeline.fullAnnotate("Hola de John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hola de John Snow Labs! ""] -result_df = nlu.load('es.explain.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-25-explain_document_md_fi.md b/docs/_posts/ahmedlone127/2023-05-25-explain_document_md_fi.md index a5a183487a9fd5..539fba448f04cc 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-explain_document_md_fi.md +++ b/docs/_posts/ahmedlone127/2023-05-25-explain_document_md_fi.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_md', lang = 'fi') -annotations = pipeline.fullAnnotate(""Hei John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_md", lang = "fi") -val result = pipeline.fullAnnotate("Hei John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hei John Snow Labs! ""] -result_df = nlu.load('fi.explain.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-25-explain_document_md_fr.md b/docs/_posts/ahmedlone127/2023-05-25-explain_document_md_fr.md index 4e3bd64d36f4b1..fb84245d482d7e 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-explain_document_md_fr.md +++ b/docs/_posts/ahmedlone127/2023-05-25-explain_document_md_fr.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_md', lang = 'fr') -annotations = pipeline.fullAnnotate(""Bonjour de John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_md", lang = "fr") -val result = pipeline.fullAnnotate("Bonjour de John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Bonjour de John Snow Labs! ""] -result_df = nlu.load('fr.explain.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-25-explain_document_md_no.md b/docs/_posts/ahmedlone127/2023-05-25-explain_document_md_no.md index ed848865a3f17e..96a44a3ed6efc0 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-explain_document_md_no.md +++ b/docs/_posts/ahmedlone127/2023-05-25-explain_document_md_no.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_md', lang = 'no') -annotations = pipeline.fullAnnotate(""Hei fra John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_md", lang = "no") -val result = pipeline.fullAnnotate("Hei fra John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hei fra John Snow Labs! ""] -result_df = nlu.load('no.explain.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-25-explain_document_md_ru.md b/docs/_posts/ahmedlone127/2023-05-25-explain_document_md_ru.md index 10741f307e1adf..f8f01b7898cf91 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-explain_document_md_ru.md +++ b/docs/_posts/ahmedlone127/2023-05-25-explain_document_md_ru.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_md', lang = 'ru') -annotations = pipeline.fullAnnotate(""Здравствуйте из Джона Снежных Лабораторий! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_md", lang = "ru") -val result = pipeline.fullAnnotate("Здравствуйте из Джона Снежных Лабораторий! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Здравствуйте из Джона Снежных Лабораторий! ""] -result_df = nlu.load('ru.explain.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-25-explain_document_md_sv.md b/docs/_posts/ahmedlone127/2023-05-25-explain_document_md_sv.md index bd082756480915..02935afd61c137 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-explain_document_md_sv.md +++ b/docs/_posts/ahmedlone127/2023-05-25-explain_document_md_sv.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_md', lang = 'sv') -annotations = pipeline.fullAnnotate(""Hej från John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_md", lang = "sv") -val result = pipeline.fullAnnotate("Hej från John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hej från John Snow Labs! ""] -result_df = nlu.load('sv.explain.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-25-explain_document_ml_en.md b/docs/_posts/ahmedlone127/2023-05-25-explain_document_ml_en.md index ab3e62efb1a1d2..2090bf2deca223 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-explain_document_ml_en.md +++ b/docs/_posts/ahmedlone127/2023-05-25-explain_document_ml_en.md @@ -34,33 +34,7 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline('explain_document_ml', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() -``` -```scala - - -val pipeline = new PretrainedPipeline("explain_document_ml", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.explain').predict(text) -result_df -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-25-explain_document_sm_da.md b/docs/_posts/ahmedlone127/2023-05-25-explain_document_sm_da.md index 3bdacc90f82667..1c1a6475d3d176 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-explain_document_sm_da.md +++ b/docs/_posts/ahmedlone127/2023-05-25-explain_document_sm_da.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_sm', lang = 'da') -annotations = pipeline.fullAnnotate(""Hej fra John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_sm", lang = "da") -val result = pipeline.fullAnnotate("Hej fra John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hej fra John Snow Labs! ""] -result_df = nlu.load('da.explain').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-25-explain_document_sm_es.md b/docs/_posts/ahmedlone127/2023-05-25-explain_document_sm_es.md index 38a2e76ff4e209..7372b1d7c3c882 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-explain_document_sm_es.md +++ b/docs/_posts/ahmedlone127/2023-05-25-explain_document_sm_es.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_sm', lang = 'es') -annotations = pipeline.fullAnnotate(""Hola de John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_sm", lang = "es") -val result = pipeline.fullAnnotate("Hola de John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hola de John Snow Labs! ""] -result_df = nlu.load('es.explain').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-25-explain_document_sm_fi.md b/docs/_posts/ahmedlone127/2023-05-25-explain_document_sm_fi.md index be1359fc083280..71c4c5ea468ed5 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-explain_document_sm_fi.md +++ b/docs/_posts/ahmedlone127/2023-05-25-explain_document_sm_fi.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_sm', lang = 'fi') -annotations = pipeline.fullAnnotate(""Hei John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_sm", lang = "fi") -val result = pipeline.fullAnnotate("Hei John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hei John Snow Labs! ""] -result_df = nlu.load('fi.explain').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-25-explain_document_sm_no.md b/docs/_posts/ahmedlone127/2023-05-25-explain_document_sm_no.md index 1e76fef347c49a..6a82aaa3758093 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-explain_document_sm_no.md +++ b/docs/_posts/ahmedlone127/2023-05-25-explain_document_sm_no.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_sm', lang = 'no') -annotations = pipeline.fullAnnotate(""Hei fra John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_sm", lang = "no") -val result = pipeline.fullAnnotate("Hei fra John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hei fra John Snow Labs! ""] -result_df = nlu.load('no.explain').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-25-explain_document_sm_ru.md b/docs/_posts/ahmedlone127/2023-05-25-explain_document_sm_ru.md index 73af8d334fe53d..e48cc027987ec2 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-explain_document_sm_ru.md +++ b/docs/_posts/ahmedlone127/2023-05-25-explain_document_sm_ru.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_sm', lang = 'ru') -annotations = pipeline.fullAnnotate(""Здравствуйте из Джона Снежных Лабораторий! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_sm", lang = "ru") -val result = pipeline.fullAnnotate("Здравствуйте из Джона Снежных Лабораторий! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Здравствуйте из Джона Снежных Лабораторий! ""] -result_df = nlu.load('ru.explain').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-25-explain_document_sm_sv.md b/docs/_posts/ahmedlone127/2023-05-25-explain_document_sm_sv.md index 014650d0410a7b..9722bf8681fd0c 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-explain_document_sm_sv.md +++ b/docs/_posts/ahmedlone127/2023-05-25-explain_document_sm_sv.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_sm', lang = 'sv') -annotations = pipeline.fullAnnotate(""Hej från John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_sm", lang = "sv") -val result = pipeline.fullAnnotate("Hej från John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hej från John Snow Labs! ""] -result_df = nlu.load('sv.explain').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-25-longformer_base_token_classifier_conll03_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-25-longformer_base_token_classifier_conll03_pipeline_en.md index 5aa26c0b319b5a..bcd2ee3b6fc21e 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-longformer_base_token_classifier_conll03_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-25-longformer_base_token_classifier_conll03_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [longformer_base_token_classifie ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("longformer_base_token_classifier_conll03_pipeline", lang = "en") - -pipeline.annotate("My name is John and I am working at John Snow Labs.") -``` -```scala - - -val pipeline = new PretrainedPipeline("longformer_base_token_classifier_conll03_pipeline", lang = "en") -pipeline.annotate("My name is John and I am working at John Snow Labs.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-25-longformer_large_token_classifier_conll03_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-25-longformer_large_token_classifier_conll03_pipeline_en.md index 648159c17e83ac..64408b19d828db 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-longformer_large_token_classifier_conll03_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-25-longformer_large_token_classifier_conll03_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [longformer_large_token_classifi ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("longformer_large_token_classifier_conll03_pipeline", lang = "en") - -pipeline.annotate("My name is John and I am working at John Snow Labs.") -``` -```scala - - -val pipeline = new PretrainedPipeline("longformer_large_token_classifier_conll03_pipeline", lang = "en") -pipeline.annotate("My name is John and I am working at John Snow Labs.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-25-match_chunks_en.md b/docs/_posts/ahmedlone127/2023-05-25-match_chunks_en.md index 903012f4a225c2..3f9c07cc9200e3 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-match_chunks_en.md +++ b/docs/_posts/ahmedlone127/2023-05-25-match_chunks_en.md @@ -32,41 +32,7 @@ The pipeline uses regex `
?/*+` ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipeline - -pipeline_local = PretrainedPipeline('match_chunks') - -result = pipeline_local.annotate("David visited the restaurant yesterday with his family. He also visited and the day before, but at that time he was alone. David again visited today with his colleagues. He and his friends really liked the food and hoped to visit again tomorrow.") - -result['chunk'] -``` -```scala - -import com.johnsnowlabs.nlp.pretrained.PretrainedPipeline import com.johnsnowlabs.nlp.SparkNLP - -SparkNLP.version() -val testData = spark.createDataFrame(Seq( (1, "David visited the restaurant yesterday with his family. He also visited and the day before, but at that time he was alone. David again visited today with his colleagues. He and his friends really liked the food and hoped to visit again tomorrow."))).toDF("id", "text") - -val pipeline = PretrainedPipeline("match_chunks", lang="en") - -val annotation = pipeline.transform(testData) - -annotation.show() -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("en.match.chunks").predict("""David visited the restaurant yesterday with his family. He also visited and the day before, but at that time he was alone. David again visited today with his colleagues. He and his friends really liked the food and hoped to visit again tomorrow.""") -``` - -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-25-match_datetime_en.md b/docs/_posts/ahmedlone127/2023-05-25-match_datetime_en.md index e5f01baffac33f..13303393ba9b17 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-match_datetime_en.md +++ b/docs/_posts/ahmedlone127/2023-05-25-match_datetime_en.md @@ -32,35 +32,7 @@ DateMatcher based on yyyy/MM/dd ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -pipeline_local = PretrainedPipeline('match_datetime') - -tres = pipeline_local.fullAnnotate(input_list)[0] -for dte in tres['date']: - sent = tres['sentence'][int(dte.metadata['sentence'])] - print (f'text/chunk {sent.result[dte.begin:dte.end+1]} | mapped_date: {dte.result}') -``` -```scala - -import com.johnsnowlabs.nlp.pretrained.PretrainedPipeline import com.johnsnowlabs.nlp.SparkNLP -SparkNLP.version() - -val testData = spark.createDataFrame(Seq( (1, "David visited the restaurant yesterday with his family. -He also visited and the day before, but at that time he was alone. -David again visited today with his colleagues. -He and his friends really liked the food and hoped to visit again tomorrow."))).toDF("id", "text") - -val pipeline = PretrainedPipeline("match_datetime", lang="en") - -val annotation = pipeline.transform(testData) - -annotation.show() -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-25-match_pattern_en.md b/docs/_posts/ahmedlone127/2023-05-25-match_pattern_en.md index 67b720cb60cbc5..009754c8228acc 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-match_pattern_en.md +++ b/docs/_posts/ahmedlone127/2023-05-25-match_pattern_en.md @@ -33,16 +33,7 @@ The match_pattern is a pretrained pipeline that we can use to process text with ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("match_pattern", "en", "clinical/models") - result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-05-25-movies_sentiment_analysis_en.md b/docs/_posts/ahmedlone127/2023-05-25-movies_sentiment_analysis_en.md index 1aa1e43fe345b0..d8980a4ca672bf 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-movies_sentiment_analysis_en.md +++ b/docs/_posts/ahmedlone127/2023-05-25-movies_sentiment_analysis_en.md @@ -33,16 +33,7 @@ The movies_sentiment_analysis is a pretrained pipeline that we can use to proces ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("movies_sentiment_analysis", "en") -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-05-25-nerdl_fewnerd_100d_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-25-nerdl_fewnerd_100d_pipeline_en.md index 576e051d5bc96f..e42dce8104bd73 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-nerdl_fewnerd_100d_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-25-nerdl_fewnerd_100d_pipeline_en.md @@ -34,21 +34,7 @@ This pretrained pipeline is built on Few-NERD model and it detects : ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -fewnerd_pipeline = PretrainedPipeline("nerdl_fewnerd_subentity_100d_pipeline", lang = "en") - -fewnerd_pipeline.annotate("""The Double Down is a sandwich offered by Kentucky Fried Chicken restaurants. He did not see active service again until 1882, when he took part in the Anglo-Egyptian War, and was present at the battle of Tell El Kebir (September 1882), for which he was mentioned in dispatches, received the Egypt Medal with clasp and the 3rd class of the Order of Medjidie, and was appointed a Companion of the Order of the Bath (CB).""") -``` -```scala - -val pipeline = new PretrainedPipeline("nerdl_fewnerd_subentity_100d_pipeline", lang = "en") -val result = pipeline.fullAnnotate("The Double Down is a sandwich offered by Kentucky Fried Chicken restaurants. He did not see active service again until 1882, when he took part in the Anglo-Egyptian War, and was present at the battle of Tell El Kebir (September 1882), for which he was mentioned in dispatches, received the Egypt Medal with clasp and the 3rd class of the Order of Medjidie, and was appointed a Companion of the Order of the Bath (CB).")(0) -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-25-nerdl_fewnerd_subentity_100d_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-25-nerdl_fewnerd_subentity_100d_pipeline_en.md index df56e314588370..3ca2a8bc9b489f 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-nerdl_fewnerd_subentity_100d_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-25-nerdl_fewnerd_subentity_100d_pipeline_en.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on Few-NERD/inter public dataset and it extrac ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -fewnerd_pipeline = PretrainedPipeline("nerdl_fewnerd_subentity_100d_pipeline", lang = "en") - -fewnerd_pipeline.annotate("""12 Corazones ('12 Hearts') is Spanish-language dating game show produced in the United States for the television network Telemundo since January 2005, based on its namesake Argentine TV show format. The show is filmed in Los Angeles and revolves around the twelve Zodiac signs that identify each contestant. In 2008, Ho filmed a cameo in the Steven Spielberg feature film The Cloverfield Paradox, as a news pundit.""") -``` -```scala - -val pipeline = new PretrainedPipeline("nerdl_fewnerd_subentity_100d_pipeline", lang = "en") -val result = pipeline.fullAnnotate("12 Corazones ('12 Hearts') is Spanish-language dating game show produced in the United States for the television network Telemundo since January 2005, based on its namesake Argentine TV show format. The show is filmed in Los Angeles and revolves around the twelve Zodiac signs that identify each contestant. In 2008, Ho filmed a cameo in the Steven Spielberg feature film The Cloverfield Paradox, as a news pundit.")(0) -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-25-nerdl_restaurant_100d_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-25-nerdl_restaurant_100d_pipeline_en.md index 35b24d5bdc7092..83a1cb38617118 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-nerdl_restaurant_100d_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-25-nerdl_restaurant_100d_pipeline_en.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on the top of [nerdl_restaurant_100d](https:// ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -restaurant_pipeline = PretrainedPipeline("nerdl_restaurant_100d_pipeline", lang = "en") - -restaurant_pipeline.annotate("Hong Kong’s favourite pasta bar also offers one of the most reasonably priced lunch sets in town! With locations spread out all over the territory Sha Tin – Pici’s formidable lunch menu reads like a highlight reel of the restaurant. Choose from starters like the burrata and arugula salad or freshly tossed tuna tartare, and reliable handmade pasta dishes like pappardelle. Finally, round out your effortless Italian meal with a tidy one-pot tiramisu, of course, an espresso to power you through the rest of the day.") -``` -```scala - -val restaurant_pipeline = new PretrainedPipeline("nerdl_restaurant_100d_pipeline", lang = "en") -restaurant_pipeline.annotate("Hong Kong’s favourite pasta bar also offers one of the most reasonably priced lunch sets in town! With locations spread out all over the territory Sha Tin – Pici’s formidable lunch menu reads like a highlight reel of the restaurant. Choose from starters like the burrata and arugula salad or freshly tossed tuna tartare, and reliable handmade pasta dishes like pappardelle. Finally, round out your effortless Italian meal with a tidy one-pot tiramisu, of course, an espresso to power you through the rest of the day.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-25-onto_recognize_entities_bert_base_en.md b/docs/_posts/ahmedlone127/2023-05-25-onto_recognize_entities_bert_base_en.md index 4991fe05619320..0d6cece91ccb92 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-onto_recognize_entities_bert_base_en.md +++ b/docs/_posts/ahmedlone127/2023-05-25-onto_recognize_entities_bert_base_en.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('onto_recognize_entities_bert_base', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("onto_recognize_entities_bert_base", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.ner.onto.bert.base').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-25-onto_recognize_entities_bert_large_en.md b/docs/_posts/ahmedlone127/2023-05-25-onto_recognize_entities_bert_large_en.md index e34af1639fe2b7..c856a1a4aa5147 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-onto_recognize_entities_bert_large_en.md +++ b/docs/_posts/ahmedlone127/2023-05-25-onto_recognize_entities_bert_large_en.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('onto_recognize_entities_bert_large', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("onto_recognize_entities_bert_large", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.ner.onto.bert.large').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-25-onto_recognize_entities_bert_medium_en.md b/docs/_posts/ahmedlone127/2023-05-25-onto_recognize_entities_bert_medium_en.md index 5e5b33a34999f0..8493b81a06be01 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-onto_recognize_entities_bert_medium_en.md +++ b/docs/_posts/ahmedlone127/2023-05-25-onto_recognize_entities_bert_medium_en.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('onto_recognize_entities_bert_medium', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("onto_recognize_entities_bert_medium", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.ner.onto.bert.medium').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-25-onto_recognize_entities_bert_mini_en.md b/docs/_posts/ahmedlone127/2023-05-25-onto_recognize_entities_bert_mini_en.md index 18514bae287899..eeacbfa75c694a 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-onto_recognize_entities_bert_mini_en.md +++ b/docs/_posts/ahmedlone127/2023-05-25-onto_recognize_entities_bert_mini_en.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('onto_recognize_entities_bert_mini', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("onto_recognize_entities_bert_mini", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.ner.onto.bert.mini').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-25-onto_recognize_entities_bert_small_en.md b/docs/_posts/ahmedlone127/2023-05-25-onto_recognize_entities_bert_small_en.md index b6278456400e9e..585e1d24700bdd 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-onto_recognize_entities_bert_small_en.md +++ b/docs/_posts/ahmedlone127/2023-05-25-onto_recognize_entities_bert_small_en.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('onto_recognize_entities_bert_small', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("onto_recognize_entities_bert_small", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.ner.onto.bert.small').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-25-onto_recognize_entities_bert_tiny_en.md b/docs/_posts/ahmedlone127/2023-05-25-onto_recognize_entities_bert_tiny_en.md index 7efda03ad07cda..dac2005d116562 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-onto_recognize_entities_bert_tiny_en.md +++ b/docs/_posts/ahmedlone127/2023-05-25-onto_recognize_entities_bert_tiny_en.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('onto_recognize_entities_bert_tiny', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("onto_recognize_entities_bert_tiny", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.ner.onto.bert.tiny').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-25-onto_recognize_entities_electra_base_en.md b/docs/_posts/ahmedlone127/2023-05-25-onto_recognize_entities_electra_base_en.md index b85ab4b633b442..905c5523afcb2d 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-onto_recognize_entities_electra_base_en.md +++ b/docs/_posts/ahmedlone127/2023-05-25-onto_recognize_entities_electra_base_en.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('onto_recognize_entities_electra_base', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("onto_recognize_entities_electra_base", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.ner.onto.electra.base').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-25-onto_recognize_entities_electra_large_en.md b/docs/_posts/ahmedlone127/2023-05-25-onto_recognize_entities_electra_large_en.md index 91b5c23ebbd365..13841dccd44d10 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-onto_recognize_entities_electra_large_en.md +++ b/docs/_posts/ahmedlone127/2023-05-25-onto_recognize_entities_electra_large_en.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline('onto_recognize_entities_electra_large', lang = 'en') -annotations = pipeline.fullAnnotate("Hello from John Snow Labs!")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("onto_recognize_entities_electra_large", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.ner.onto.large').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-25-onto_recognize_entities_electra_small_en.md b/docs/_posts/ahmedlone127/2023-05-25-onto_recognize_entities_electra_small_en.md index 8ccf11eed91884..e451c9d6991531 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-onto_recognize_entities_electra_small_en.md +++ b/docs/_posts/ahmedlone127/2023-05-25-onto_recognize_entities_electra_small_en.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('onto_recognize_entities_electra_small', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("onto_recognize_entities_electra_small", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.ner.onto.electra.small').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-25-onto_recognize_entities_lg_en.md b/docs/_posts/ahmedlone127/2023-05-25-onto_recognize_entities_lg_en.md index 0425702cf6b0d8..9d6883feb15a08 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-onto_recognize_entities_lg_en.md +++ b/docs/_posts/ahmedlone127/2023-05-25-onto_recognize_entities_lg_en.md @@ -33,25 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("onto_recognize_entities_lg", "en") - -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -{:.nlu-block} -```python -import nlu -nlu.load("en.ner.onto.lg").predict("""I love johnsnowlabs! """) -``` - -
- {:.model-param}
diff --git a/docs/_posts/ahmedlone127/2023-05-25-onto_recognize_entities_sm_en.md b/docs/_posts/ahmedlone127/2023-05-25-onto_recognize_entities_sm_en.md index 91b9700a46de0f..379c8723aba6d7 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-onto_recognize_entities_sm_en.md +++ b/docs/_posts/ahmedlone127/2023-05-25-onto_recognize_entities_sm_en.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('onto_recognize_entities_sm', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("onto_recognize_entities_sm", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.ner.onto.sm').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-25-pos_ud_bokmaal_nb.md b/docs/_posts/ahmedlone127/2023-05-25-pos_ud_bokmaal_nb.md index 29450208088378..229e3294938bda 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-pos_ud_bokmaal_nb.md +++ b/docs/_posts/ahmedlone127/2023-05-25-pos_ud_bokmaal_nb.md @@ -34,39 +34,7 @@ This model was trained using the dataset available at https://universaldependenc ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -pos = PerceptronModel.pretrained("pos_ud_bokmaal", "nb") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("pos") - -nlp_pipeline = Pipeline(stages=[document_assembler, sentence_detector, tokenizer, pos]) -light_pipeline = LightPipeline(nlp_pipeline.fit(spark.createDataFrame([['']]).toDF("text"))) -results = light_pipeline.fullAnnotate("Annet enn å være kongen i nord, er John Snow en engelsk lege og en leder innen utvikling av anestesi og medisinsk hygiene.") -``` -```scala - -val pos = PerceptronModel.pretrained("pos_ud_bokmaal", "nb") - .setInputCols(Array("document", "token")) - .setOutputCol("pos") - -val pipeline = new Pipeline().setStages(Array(document_assembler, sentence_detector, tokenizer, pos)) -val data = Seq("Annet enn å være kongen i nord, er John Snow en engelsk lege og en leder innen utvikling av anestesi og medisinsk hygiene.").toDF("text") -val result = pipeline.fit(data).transform(data) -``` - -{:.nlu-block} -```python - -import nlu -text = ["""Annet enn å være kongen i nord, er John Snow en engelsk lege og en leder innen utvikling av anestesi og medisinsk hygiene."""] -pos_df = nlu.load('nb.pos.ud_bokmaal').predict(text) -pos_df -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-25-recognize_entities_bert_en.md b/docs/_posts/ahmedlone127/2023-05-25-recognize_entities_bert_en.md index 404c38a15a40b7..d453db71ef8b29 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-recognize_entities_bert_en.md +++ b/docs/_posts/ahmedlone127/2023-05-25-recognize_entities_bert_en.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('recognize_entities_bert', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("recognize_entities_bert", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.ner.bert').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-25-recognize_entities_dl_en.md b/docs/_posts/ahmedlone127/2023-05-25-recognize_entities_dl_en.md index 0c3dc5fcf95ca4..3af3b54ebd403b 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-recognize_entities_dl_en.md +++ b/docs/_posts/ahmedlone127/2023-05-25-recognize_entities_dl_en.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('recognize_entities_dl', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("recognize_entities_dl", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.ner').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-25-recognize_entities_dl_fa.md b/docs/_posts/ahmedlone127/2023-05-25-recognize_entities_dl_fa.md index 67c967a63ba643..1b9faf990a29aa 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-recognize_entities_dl_fa.md +++ b/docs/_posts/ahmedlone127/2023-05-25-recognize_entities_dl_fa.md @@ -32,37 +32,7 @@ The explain_document_dl is a pretrained pipeline that we can use to process text ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipeline - -pipeline = PretrainedPipeline('recognize_entities_dl', lang = 'fa') - -annotations = pipeline.fullAnnotate("""به گزارش خبرنگار ایرنا ، بر اساس تصمیم این مجمع ، محمد قمی نماینده مردم پاکدشت به عنوان رئیس و علی‌اکبر موسوی خوئینی و شمس‌الدین وهابی نمایندگان مردم تهران به عنوان نواب رئیس انتخاب شدند""")[0] - -annotations.keys() -``` -```scala - -val pipeline = new PretrainedPipeline("recognize_entities_dl", lang = "fa") -val result = pipeline.fullAnnotate("""به گزارش خبرنگار ایرنا ، بر اساس تصمیم این مجمع ، محمد قمی نماینده مردم پاکدشت به عنوان رئیس و علی‌اکبر موسوی خوئینی و شمس‌الدین وهابی نمایندگان مردم تهران به عنوان نواب رئیس انتخاب شدند""")(0) -``` - -{:.nlu-block} -```python - -import nlu - -text = ["""به گزارش خبرنگار ایرنا ، بر اساس تصمیم این مجمع ، محمد قمی نماینده مردم پاکدشت به عنوان رئیس و علی‌اکبر موسوی خوئینی و شمس‌الدین وهابی نمایندگان مردم تهران به عنوان نواب رئیس انتخاب شدند"""] - -result_df = nlu.load('fa.recognize_entities_dl').predict(text) - -result_df -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-25-roberta_base_token_classifier_ontonotes_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-25-roberta_base_token_classifier_ontonotes_pipeline_en.md index 4d4c5e36796b92..2fb9ad5732ff43 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-roberta_base_token_classifier_ontonotes_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-25-roberta_base_token_classifier_ontonotes_pipeline_en.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on the top of [roberta_base_token_classifier_o ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -pipeline = PretrainedPipeline("roberta_base_token_classifier_ontonotes_pipeline", lang = "en") - -pipeline.annotate("My name is John and I have been working at John Snow Labs since November 2020.") -``` -```scala - -val pipeline = new PretrainedPipeline("roberta_base_token_classifier_ontonotes_pipeline", lang = "en") -pipeline.annotate("My name is John and I have been working at John Snow Labs since November 2020.")) -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-25-roberta_large_token_classifier_conll03_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-25-roberta_large_token_classifier_conll03_pipeline_en.md index 35380043fb7944..0931979b5d90ba 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-roberta_large_token_classifier_conll03_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-25-roberta_large_token_classifier_conll03_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [roberta_large_token_classifier_ ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("roberta_large_token_classifier_conll03_pipeline", lang = "en") - -pipeline.annotate("My name is John and I work at John Snow Labs.") -``` -```scala - - -val pipeline = new PretrainedPipeline("roberta_large_token_classifier_conll03_pipeline", lang = "en") -pipeline.annotate("My name is John and I work at John Snow Labs.")) -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-25-roberta_token_classifier_bne_capitel_ner_pipeline_es.md b/docs/_posts/ahmedlone127/2023-05-25-roberta_token_classifier_bne_capitel_ner_pipeline_es.md index 26d479aef03036..f9ba55ec390af7 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-roberta_token_classifier_bne_capitel_ner_pipeline_es.md +++ b/docs/_posts/ahmedlone127/2023-05-25-roberta_token_classifier_bne_capitel_ner_pipeline_es.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on the top of [roberta_token_classifier_bne_ca ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -pipeline = PretrainedPipeline("roberta_token_classifier_bne_capitel_ner_pipeline", lang = "es") - -pipeline.annotate("Me llamo Antonio y trabajo en la fábrica de Mercedes-Benz en Madrid.") -``` -```scala - -val pipeline = new PretrainedPipeline("roberta_token_classifier_bne_capitel_ner_pipeline", lang = "es") -pipeline.annotate("Me llamo Antonio y trabajo en la fábrica de Mercedes-Benz en Madrid.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-25-roberta_token_classifier_icelandic_ner_pipeline_is.md b/docs/_posts/ahmedlone127/2023-05-25-roberta_token_classifier_icelandic_ner_pipeline_is.md index fa8f705e0b014e..3b10c5444ac054 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-roberta_token_classifier_icelandic_ner_pipeline_is.md +++ b/docs/_posts/ahmedlone127/2023-05-25-roberta_token_classifier_icelandic_ner_pipeline_is.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on the top of [roberta_token_classifier_icelan ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -pipeline = PretrainedPipeline("roberta_token_classifier_icelandic_ner_pipeline", lang = "is") - -pipeline.annotate("Ég heiti Peter Fergusson. Ég hef búið í New York síðan í október 2011 og unnið hjá Tesla Motor og þénað 100K $ á ári.") -``` -```scala - -val pipeline = new PretrainedPipeline("roberta_token_classifier_icelandic_ner_pipeline", lang = "is") -pipeline.annotate("Ég heiti Peter Fergusson. Ég hef búið í New York síðan í október 2011 og unnið hjá Tesla Motor og þénað 100K $ á ári.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-25-roberta_token_classifier_timex_semeval_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-25-roberta_token_classifier_timex_semeval_pipeline_en.md index 16f045eb439192..195f67e86bad6a 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-roberta_token_classifier_timex_semeval_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-25-roberta_token_classifier_timex_semeval_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [roberta_token_classifier_timex_ ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -timex_pipeline = PretrainedPipeline("roberta_token_classifier_timex_semeval_pipeline", lang = "en") - -timex_pipeline.annotate("Model training was started at 22:12C and it took 3 days from Tuesday to Friday.") -``` -```scala - - -val timex_pipeline = new PretrainedPipeline("roberta_token_classifier_timex_semeval_pipeline", lang = "en") -timex_pipeline.annotate("Model training was started at 22:12C and it took 3 days from Tuesday to Friday.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-25-spellcheck_dl_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-25-spellcheck_dl_pipeline_en.md index 16069df0f43f0c..223b7ef1633a55 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-spellcheck_dl_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-25-spellcheck_dl_pipeline_en.md @@ -32,27 +32,7 @@ This pretrained spellchecker pipeline is built on the top of [spellcheck_dl](htt ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("spellcheck_dl_pipeline", lang = "en") - -text = ["During the summer we have the best ueather.", "I have a black ueather jacket, so nice."] - -pipeline.annotate(text) -``` -```scala - - -val pipeline = new PretrainedPipeline("spellcheck_dl_pipeline", lang = "en") -val example = Array("During the summer we have the best ueather.", "I have a black ueather jacket, so nice.") - -pipeline.annotate(example) -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-25-text_cleaning_en.md b/docs/_posts/ahmedlone127/2023-05-25-text_cleaning_en.md index 52c450ba6f87c4..3401f567de7cb2 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-text_cleaning_en.md +++ b/docs/_posts/ahmedlone127/2023-05-25-text_cleaning_en.md @@ -33,16 +33,7 @@ The text_cleaning is a pretrained pipeline that we can use to process text with ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("text_cleaning", "en") -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-05-25-xlm_roberta_base_token_classifier_conll03_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-25-xlm_roberta_base_token_classifier_conll03_pipeline_en.md index 9de2e5ceda88cc..48b82243926956 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-xlm_roberta_base_token_classifier_conll03_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-25-xlm_roberta_base_token_classifier_conll03_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [xlm_roberta_base_token_classifi ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("xlm_roberta_base_token_classifier_conll03_pipeline", lang = "en") - -pipeline.annotate("My name is John and I work at John Snow Labs.") -``` -```scala - - -val pipeline = new PretrainedPipeline("xlm_roberta_base_token_classifier_conll03_pipeline", lang = "en") -pipeline.annotate("My name is John and I work at John Snow Labs.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-25-xlm_roberta_base_token_classifier_ontonotes_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-25-xlm_roberta_base_token_classifier_ontonotes_pipeline_en.md index 3b4f28b8401058..d2753ee87ba850 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-xlm_roberta_base_token_classifier_ontonotes_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-25-xlm_roberta_base_token_classifier_ontonotes_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [xlm_roberta_base_token_classifi ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("xlm_roberta_base_token_classifier_ontonotes_pipeline", lang = "en") - -pipeline.annotate("My name is John and I have been working at John Snow Labs since November 2020.") -``` -```scala - - -val pipeline = new PretrainedPipeline("xlm_roberta_base_token_classifier_ontonotes_pipeline", lang = "en") -pipeline.annotate("My name is John and I have been working at John Snow Labs since November 2020.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-25-xlm_roberta_large_token_classifier_conll03_pipeline_de.md b/docs/_posts/ahmedlone127/2023-05-25-xlm_roberta_large_token_classifier_conll03_pipeline_de.md index a66592362aefc1..7d873291073ad6 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-xlm_roberta_large_token_classifier_conll03_pipeline_de.md +++ b/docs/_posts/ahmedlone127/2023-05-25-xlm_roberta_large_token_classifier_conll03_pipeline_de.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on the top of [xlm_roberta_large_token_classif ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -pipeline = PretrainedPipeline("xlm_roberta_large_token_classifier_conll03_pipeline", lang = "de") - -pipeline.annotate("Ibser begann seine Karriere beim ASK Ebreichsdorf. 2004 wechselte er zu Admira Wacker Mödling, wo er auch in der Akademie spielte.") -``` -```scala - -val pipeline = new PretrainedPipeline("xlm_roberta_large_token_classifier_conll03_pipeline", lang = "de") -pipeline.annotate("Ibser begann seine Karriere beim ASK Ebreichsdorf. 2004 wechselte er zu Admira Wacker Mödling, wo er auch in der Akademie spielte.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-25-xlm_roberta_large_token_classifier_hrl_pipeline_xx.md b/docs/_posts/ahmedlone127/2023-05-25-xlm_roberta_large_token_classifier_hrl_pipeline_xx.md index 0644860ec4af4f..702ff0c9c5e3b3 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-xlm_roberta_large_token_classifier_hrl_pipeline_xx.md +++ b/docs/_posts/ahmedlone127/2023-05-25-xlm_roberta_large_token_classifier_hrl_pipeline_xx.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on the top of [xlm_roberta_large_token_classif ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -pipeline = PretrainedPipeline("xlm_roberta_large_token_classifier_hrl_pipeline", lang = "xx") - -pipeline.annotate("يمكنكم مشاهدة أمير منطقة الرياض الأمير فيصل بن بندر بن عبد العزيز في كل مناسبة وافتتاح تتعلق بمشاريع التعليم والصحة وخدمة الطرق والمشاريع الثقافية في منطقة الرياض.") -``` -```scala - -val pipeline = new PretrainedPipeline("xlm_roberta_large_token_classifier_hrl_pipeline", lang = "xx") -pipeline.annotate("يمكنكم مشاهدة أمير منطقة الرياض الأمير فيصل بن بندر بن عبد العزيز في كل مناسبة وافتتاح تتعلق بمشاريع التعليم والصحة وخدمة الطرق والمشاريع الثقافية في منطقة الرياض.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-25-xlm_roberta_large_token_classifier_masakhaner_pipeline_xx.md b/docs/_posts/ahmedlone127/2023-05-25-xlm_roberta_large_token_classifier_masakhaner_pipeline_xx.md index ef6310376136df..0213c1cab9a5bc 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-xlm_roberta_large_token_classifier_masakhaner_pipeline_xx.md +++ b/docs/_posts/ahmedlone127/2023-05-25-xlm_roberta_large_token_classifier_masakhaner_pipeline_xx.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on [xlm_roberta_large_token_classifier_masakha ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -masakhaner_pipeline = PretrainedPipeline("xlm_roberta_large_token_classifier_masakhaner_pipeline", lang = "xx") - -masakhaner_pipeline.annotate("አህመድ ቫንዳ ከ3-10-2000 ጀምሮ በአዲስ አበባ ኖሯል።") -``` -```scala - -val masakhaner_pipeline = new PretrainedPipeline("xlm_roberta_large_token_classifier_masakhaner_pipeline", lang = "xx") -val masakhaner_pipeline.annotate("አህመድ ቫንዳ ከ3-10-2000 ጀምሮ በአዲስ አበባ ኖሯል።") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-25-xlnet_base_token_classifier_conll03_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-25-xlnet_base_token_classifier_conll03_pipeline_en.md index ab857ce93611fa..e251dfcc9cedc1 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-xlnet_base_token_classifier_conll03_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-25-xlnet_base_token_classifier_conll03_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [xlnet_base_token_classifier_con ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("xlnet_base_token_classifier_conll03_pipeline", lang = "en") - -pipeline.annotate("My name is John and I work at John Snow Labs.") -``` -```scala - - -val pipeline = new PretrainedPipeline("xlnet_base_token_classifier_conll03_pipeline", lang = "en") -pipeline.annotate("My name is John and I work at John Snow Labs.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-25-xlnet_large_token_classifier_conll03_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-25-xlnet_large_token_classifier_conll03_pipeline_en.md index a7692a3b4a989f..8b1c8aaf7d1e88 100644 --- a/docs/_posts/ahmedlone127/2023-05-25-xlnet_large_token_classifier_conll03_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-25-xlnet_large_token_classifier_conll03_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [xlnet_large_token_classifier_co ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("xlnet_large_token_classifier_conll03_pipeline", lang = "en") - -pipeline.annotate("My name is John and I work at John Snow Labs.") -``` -```scala - - -val pipeline = new PretrainedPipeline("xlnet_large_token_classifier_conll03_pipeline", lang = "en") -pipeline.annotate("My name is John and I work at John Snow Labs.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-26-albert_base_token_classifier_conll03_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-26-albert_base_token_classifier_conll03_pipeline_en.md index 78c671f91f89da..ddfc68a5bf7462 100644 --- a/docs/_posts/ahmedlone127/2023-05-26-albert_base_token_classifier_conll03_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-26-albert_base_token_classifier_conll03_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [albert_base_token_classifier_co ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("albert_base_token_classifier_conll03_pipeline", lang = "en") - -pipeline.annotate("My name is John and I work at John Snow Labs.") -``` -```scala - - -val pipeline = new PretrainedPipeline("albert_base_token_classifier_conll03_pipeline", lang = "en") -pipeline.annotate("My name is John and I work at John Snow Labs.")) -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-26-albert_large_token_classifier_conll03_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-26-albert_large_token_classifier_conll03_pipeline_en.md index 4f4443a9414ff3..55a46993bb0838 100644 --- a/docs/_posts/ahmedlone127/2023-05-26-albert_large_token_classifier_conll03_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-26-albert_large_token_classifier_conll03_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [albert_large_token_classifier_c ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("albert_large_token_classifier_conll03_pipeline", lang = "en") - -pipeline.annotate("My name is John and I work at John Snow Labs.") -``` -```scala - - -val pipeline = new PretrainedPipeline("albert_large_token_classifier_conll03_pipeline", lang = "en") -pipeline.annotate("My name is John and I work at John Snow Labs.")) -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-26-albert_xlarge_token_classifier_conll03_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-26-albert_xlarge_token_classifier_conll03_pipeline_en.md index 1cfd1f3b1eea22..55722ec014ba04 100644 --- a/docs/_posts/ahmedlone127/2023-05-26-albert_xlarge_token_classifier_conll03_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-26-albert_xlarge_token_classifier_conll03_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [albert_xlarge_token_classifier_ ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("albert_xlarge_token_classifier_conll03_pipeline", lang = "en") - -pipeline.annotate("My name is John and I work at John Snow Labs.") -``` -```scala - - -val pipeline = new PretrainedPipeline("albert_xlarge_token_classifier_conll03_pipeline", lang = "en") -pipeline.annotate("My name is John and I work at John Snow Labs.")) -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-26-bert_sequence_classifier_age_news_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-26-bert_sequence_classifier_age_news_pipeline_en.md index 7f4939e8c4dcf9..3bb66c51cb8d31 100644 --- a/docs/_posts/ahmedlone127/2023-05-26-bert_sequence_classifier_age_news_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-26-bert_sequence_classifier_age_news_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [bert_sequence_classifier_age_ne ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -news_pipeline = PretrainedPipeline("bert_sequence_classifier_age_news_pipeline", lang = "en") - -news_pipeline.annotate("Microsoft has taken its first step into the metaverse.") -``` -```scala - - -val news_pipeline = new PretrainedPipeline("bert_sequence_classifier_age_news_pipeline", lang = "en") -news_pipeline.annotate("Microsoft has taken its first step into the metaverse.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-26-bert_sequence_classifier_trec_coarse_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-26-bert_sequence_classifier_trec_coarse_pipeline_en.md index 3990534aee8c8b..ac200ce8945f6d 100644 --- a/docs/_posts/ahmedlone127/2023-05-26-bert_sequence_classifier_trec_coarse_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-26-bert_sequence_classifier_trec_coarse_pipeline_en.md @@ -34,23 +34,7 @@ The TREC dataset for question classification consists of open-domain, fact-based ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -trec_pipeline = PretrainedPipeline("bert_sequence_classifier_trec_coarse_pipeline", lang = "en") - -trec_pipeline.annotate("Germany is the largest country in Europe economically.") -``` -```scala - - -val trec_pipeline = new PretrainedPipeline("bert_sequence_classifier_trec_coarse_pipeline", lang = "en") -trec_pipeline.annotate("Germany is the largest country in Europe economically.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-26-bert_token_classifier_dutch_udlassy_ner_pipeline_nl.md b/docs/_posts/ahmedlone127/2023-05-26-bert_token_classifier_dutch_udlassy_ner_pipeline_nl.md index 76147872e1abee..4aafb4c2c2d37c 100644 --- a/docs/_posts/ahmedlone127/2023-05-26-bert_token_classifier_dutch_udlassy_ner_pipeline_nl.md +++ b/docs/_posts/ahmedlone127/2023-05-26-bert_token_classifier_dutch_udlassy_ner_pipeline_nl.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on the top of [bert_token_classifier_dutch_udl ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -pipeline = PretrainedPipeline("bert_token_classifier_dutch_udlassy_ner_pipeline", lang = "nl") - -pipeline.annotate("Mijn naam is Peter Fergusson. Ik woon sinds oktober 2011 in New York en werk 5 jaar bij Tesla Motor.") -``` -```scala - -val pipeline = new PretrainedPipeline("bert_token_classifier_dutch_udlassy_ner_pipeline", lang = "nl") -pipeline.annotate("Mijn naam is Peter Fergusson. Ik woon sinds oktober 2011 in New York en werk 5 jaar bij Tesla Motor.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-26-bert_token_classifier_hi_en_ner_pipeline_hi.md b/docs/_posts/ahmedlone127/2023-05-26-bert_token_classifier_hi_en_ner_pipeline_hi.md index bc5223db30914c..e8540e8ce3e798 100644 --- a/docs/_posts/ahmedlone127/2023-05-26-bert_token_classifier_hi_en_ner_pipeline_hi.md +++ b/docs/_posts/ahmedlone127/2023-05-26-bert_token_classifier_hi_en_ner_pipeline_hi.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on [bert_token_classifier_hi_en_ner](https://n ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -pipeline = PretrainedPipeline("bert_token_classifier_hi_en_ner_pipeline", lang = "hi") - -pipeline.annotate("रिलायंस इंडस्ट्रीज़ लिमिटेड (Reliance Industries Limited) एक भारतीय संगुटिका नियंत्रक कंपनी है, जिसका मुख्यालय मुंबई, महाराष्ट्र (Maharashtra) में स्थित है।रतन नवल टाटा (28 दिसंबर 1937, को मुम्बई (Mumbai), में जन्मे) टाटा समुह के वर्तमान अध्यक्ष, जो भारत की सबसे बड़ी व्यापारिक समूह है, जिसकी स्थापना जमशेदजी टाटा ने की और उनके परिवार की पीढियों ने इसका विस्तार किया और इसे दृढ़ बनाया।") -``` -```scala - -val pipeline = new PretrainedPipeline("bert_token_classifier_hi_en_ner_pipeline", lang = "hi") -val pipeline.annotate("रिलायंस इंडस्ट्रीज़ लिमिटेड (Reliance Industries Limited) एक भारतीय संगुटिका नियंत्रक कंपनी है, जिसका मुख्यालय मुंबई, महाराष्ट्र (Maharashtra) में स्थित है।रतन नवल टाटा (28 दिसंबर 1937, को मुम्बई (Mumbai), में जन्मे) टाटा समुह के वर्तमान अध्यक्ष, जो भारत की सबसे बड़ी व्यापारिक समूह है, जिसकी स्थापना जमशेदजी टाटा ने की और उनके परिवार की पीढियों ने इसका विस्तार किया और इसे दृढ़ बनाया।") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-26-bert_token_classifier_scandi_ner_pipeline_xx.md b/docs/_posts/ahmedlone127/2023-05-26-bert_token_classifier_scandi_ner_pipeline_xx.md index e2f6ac52e6214b..4ed75b1a684b13 100644 --- a/docs/_posts/ahmedlone127/2023-05-26-bert_token_classifier_scandi_ner_pipeline_xx.md +++ b/docs/_posts/ahmedlone127/2023-05-26-bert_token_classifier_scandi_ner_pipeline_xx.md @@ -32,20 +32,7 @@ This pretrained pipeline is built on [bert_token_classifier_scandi_ner](https:// ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -scandiner_pipeline = PretrainedPipeline("bert_token_classifier_scandi_ner_pipeline", lang = "xx") -scandiner_pipeline.annotate("Hans er professor ved Statens Universitet, som ligger i København, og han er en rigtig københavner.") -``` -```scala - -val scandiner_pipeline = new PretrainedPipeline("bert_token_classifier_scandi_ner_pipeline", lang = "xx") - -val scandiner_pipeline.annotate("Hans er professor ved Statens Universitet, som ligger i København, og han er en rigtig københavner.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-26-distilbert_base_token_classifier_masakhaner_pipeline_xx.md b/docs/_posts/ahmedlone127/2023-05-26-distilbert_base_token_classifier_masakhaner_pipeline_xx.md index 9fb584b272e041..3ffabc3016f8dc 100644 --- a/docs/_posts/ahmedlone127/2023-05-26-distilbert_base_token_classifier_masakhaner_pipeline_xx.md +++ b/docs/_posts/ahmedlone127/2023-05-26-distilbert_base_token_classifier_masakhaner_pipeline_xx.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on the top of [distilbert_base_token_classifie ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -masakhaner_pipeline = PretrainedPipeline("distilbert_base_token_classifier_masakhaner_pipeline", lang = "xx") - -masakhaner_pipeline.annotate("Ilé-iṣẹ́ẹ Mohammed Sani Musa, Activate Technologies Limited, ni ó kó ẹ̀rọ Ìwé-pélébé Ìdìbò Alálòpẹ́ (PVCs) tí a lò fún ìbò ọdún-un 2019, ígbà tí ó jẹ́ òǹdíjedupò lábẹ́ ẹgbẹ́ olóṣèlúu tí ó ń tukọ̀ ètò ìṣèlú lọ́wọ́ All rogressives Congress (APC) fún Aṣojú Ìlà-Oòrùn Niger, ìyẹn gẹ́gẹ́ bí ilé iṣẹ́ aṣèwádìí, Premium Times ṣe tẹ̀ ẹ́ jáde.") -``` -```scala - -val masakhaner_pipeline = new PretrainedPipeline("distilbert_base_token_classifier_masakhaner_pipeline", lang = "xx") -masakhaner_pipeline.annotate("Ilé-iṣẹ́ẹ Mohammed Sani Musa, Activate Technologies Limited, ni ó kó ẹ̀rọ Ìwé-pélébé Ìdìbò Alálòpẹ́ (PVCs) tí a lò fún ìbò ọdún-un 2019, ígbà tí ó jẹ́ òǹdíjedupò lábẹ́ ẹgbẹ́ olóṣèlúu tí ó ń tukọ̀ ètò ìṣèlú lọ́wọ́ All rogressives Congress (APC) fún Aṣojú Ìlà-Oòrùn Niger, ìyẹn gẹ́gẹ́ bí ilé iṣẹ́ aṣèwádìí, Premium Times ṣe tẹ̀ ẹ́ jáde.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-26-distilbert_token_classifier_typo_detector_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-26-distilbert_token_classifier_typo_detector_pipeline_en.md index 2892cf85cbea2a..fc6aec47a4ad75 100644 --- a/docs/_posts/ahmedlone127/2023-05-26-distilbert_token_classifier_typo_detector_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-26-distilbert_token_classifier_typo_detector_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [distilbert_token_classifier_typ ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -typo_pipeline = PretrainedPipeline("distilbert_token_classifier_typo_detector_pipeline", lang = "en") - -typo_pipeline.annotate("He had also stgruggled with addiction during his tine in Congress.") -``` -```scala - - -val typo_pipeline = new PretrainedPipeline("distilbert_token_classifier_typo_detector_pipeline", lang = "en") -typo_pipeline.annotate("He had also stgruggled with addiction during his tine in Congress.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-26-distilbert_token_classifier_typo_detector_pipeline_is.md b/docs/_posts/ahmedlone127/2023-05-26-distilbert_token_classifier_typo_detector_pipeline_is.md index 050826db384303..adf0267d9e2d75 100644 --- a/docs/_posts/ahmedlone127/2023-05-26-distilbert_token_classifier_typo_detector_pipeline_is.md +++ b/docs/_posts/ahmedlone127/2023-05-26-distilbert_token_classifier_typo_detector_pipeline_is.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on the top of [distilbert_token_classifier_typ ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -typo_pipeline = PretrainedPipeline("distilbert_token_classifier_typo_detector_pipeline", lang = "is") - -typo_pipeline.annotate("Það er miög auðvelt að draga marktækar álykanir af texta með Spark NLP.") -``` -```scala - -val typo_pipeline = new PretrainedPipeline("distilbert_token_classifier_typo_detector_pipeline", lang = "is") -typo_pipeline.annotate("Það er miög auðvelt að draga marktækar álykanir af texta með Spark NLP.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-26-distilroberta_base_token_classifier_ontonotes_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-26-distilroberta_base_token_classifier_ontonotes_pipeline_en.md index 61a39c2b402af3..74cfd4179e7120 100644 --- a/docs/_posts/ahmedlone127/2023-05-26-distilroberta_base_token_classifier_ontonotes_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-26-distilroberta_base_token_classifier_ontonotes_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [distilroberta_base_token_classi ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("distilroberta_base_token_classifier_ontonotes_pipeline", lang = "en") - -pipeline.annotate("My name is John and I have been working at John Snow Labs since November 2020.") -``` -```scala - - -val pipeline = new PretrainedPipeline("distilroberta_base_token_classifier_ontonotes_pipeline", lang = "en") -pipeline.annotate("My name is John and I have been working at John Snow Labs since November 2020.")) -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-26-longformer_base_token_classifier_conll03_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-26-longformer_base_token_classifier_conll03_pipeline_en.md index 8d3a12f5bdae5a..09757e0d6e4895 100644 --- a/docs/_posts/ahmedlone127/2023-05-26-longformer_base_token_classifier_conll03_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-26-longformer_base_token_classifier_conll03_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [longformer_base_token_classifie ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("longformer_base_token_classifier_conll03_pipeline", lang = "en") - -pipeline.annotate("My name is John and I am working at John Snow Labs.") -``` -```scala - - -val pipeline = new PretrainedPipeline("longformer_base_token_classifier_conll03_pipeline", lang = "en") -pipeline.annotate("My name is John and I am working at John Snow Labs.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-26-longformer_large_token_classifier_conll03_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-26-longformer_large_token_classifier_conll03_pipeline_en.md index bb275a83e66ad3..52d9049bd4d0f4 100644 --- a/docs/_posts/ahmedlone127/2023-05-26-longformer_large_token_classifier_conll03_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-26-longformer_large_token_classifier_conll03_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [longformer_large_token_classifi ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("longformer_large_token_classifier_conll03_pipeline", lang = "en") - -pipeline.annotate("My name is John and I am working at John Snow Labs.") -``` -```scala - - -val pipeline = new PretrainedPipeline("longformer_large_token_classifier_conll03_pipeline", lang = "en") -pipeline.annotate("My name is John and I am working at John Snow Labs.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-26-nerdl_fewnerd_100d_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-26-nerdl_fewnerd_100d_pipeline_en.md index 27eca880193ab7..320fdaa9dd75ef 100644 --- a/docs/_posts/ahmedlone127/2023-05-26-nerdl_fewnerd_100d_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-26-nerdl_fewnerd_100d_pipeline_en.md @@ -34,21 +34,7 @@ This pretrained pipeline is built on Few-NERD model and it detects : ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -fewnerd_pipeline = PretrainedPipeline("nerdl_fewnerd_subentity_100d_pipeline", lang = "en") - -fewnerd_pipeline.annotate("""The Double Down is a sandwich offered by Kentucky Fried Chicken restaurants. He did not see active service again until 1882, when he took part in the Anglo-Egyptian War, and was present at the battle of Tell El Kebir (September 1882), for which he was mentioned in dispatches, received the Egypt Medal with clasp and the 3rd class of the Order of Medjidie, and was appointed a Companion of the Order of the Bath (CB).""") -``` -```scala - -val pipeline = new PretrainedPipeline("nerdl_fewnerd_subentity_100d_pipeline", lang = "en") -val result = pipeline.fullAnnotate("The Double Down is a sandwich offered by Kentucky Fried Chicken restaurants. He did not see active service again until 1882, when he took part in the Anglo-Egyptian War, and was present at the battle of Tell El Kebir (September 1882), for which he was mentioned in dispatches, received the Egypt Medal with clasp and the 3rd class of the Order of Medjidie, and was appointed a Companion of the Order of the Bath (CB).")(0) -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-26-nerdl_fewnerd_subentity_100d_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-26-nerdl_fewnerd_subentity_100d_pipeline_en.md index 5275f8a0281ee1..e3428ef238824c 100644 --- a/docs/_posts/ahmedlone127/2023-05-26-nerdl_fewnerd_subentity_100d_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-26-nerdl_fewnerd_subentity_100d_pipeline_en.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on Few-NERD/inter public dataset and it extrac ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -fewnerd_pipeline = PretrainedPipeline("nerdl_fewnerd_subentity_100d_pipeline", lang = "en") - -fewnerd_pipeline.annotate("""12 Corazones ('12 Hearts') is Spanish-language dating game show produced in the United States for the television network Telemundo since January 2005, based on its namesake Argentine TV show format. The show is filmed in Los Angeles and revolves around the twelve Zodiac signs that identify each contestant. In 2008, Ho filmed a cameo in the Steven Spielberg feature film The Cloverfield Paradox, as a news pundit.""") -``` -```scala - -val pipeline = new PretrainedPipeline("nerdl_fewnerd_subentity_100d_pipeline", lang = "en") -val result = pipeline.fullAnnotate("12 Corazones ('12 Hearts') is Spanish-language dating game show produced in the United States for the television network Telemundo since January 2005, based on its namesake Argentine TV show format. The show is filmed in Los Angeles and revolves around the twelve Zodiac signs that identify each contestant. In 2008, Ho filmed a cameo in the Steven Spielberg feature film The Cloverfield Paradox, as a news pundit.")(0) -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-26-nerdl_restaurant_100d_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-26-nerdl_restaurant_100d_pipeline_en.md index 1cd9bd857b7dcb..46af091aebde31 100644 --- a/docs/_posts/ahmedlone127/2023-05-26-nerdl_restaurant_100d_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-26-nerdl_restaurant_100d_pipeline_en.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on the top of [nerdl_restaurant_100d](https:// ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -restaurant_pipeline = PretrainedPipeline("nerdl_restaurant_100d_pipeline", lang = "en") - -restaurant_pipeline.annotate("Hong Kong’s favourite pasta bar also offers one of the most reasonably priced lunch sets in town! With locations spread out all over the territory Sha Tin – Pici’s formidable lunch menu reads like a highlight reel of the restaurant. Choose from starters like the burrata and arugula salad or freshly tossed tuna tartare, and reliable handmade pasta dishes like pappardelle. Finally, round out your effortless Italian meal with a tidy one-pot tiramisu, of course, an espresso to power you through the rest of the day.") -``` -```scala - -val restaurant_pipeline = new PretrainedPipeline("nerdl_restaurant_100d_pipeline", lang = "en") -restaurant_pipeline.annotate("Hong Kong’s favourite pasta bar also offers one of the most reasonably priced lunch sets in town! With locations spread out all over the territory Sha Tin – Pici’s formidable lunch menu reads like a highlight reel of the restaurant. Choose from starters like the burrata and arugula salad or freshly tossed tuna tartare, and reliable handmade pasta dishes like pappardelle. Finally, round out your effortless Italian meal with a tidy one-pot tiramisu, of course, an espresso to power you through the rest of the day.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-26-pos_ud_bokmaal_nb.md b/docs/_posts/ahmedlone127/2023-05-26-pos_ud_bokmaal_nb.md index 5fef7a9e1b2912..c2702092f5b1d9 100644 --- a/docs/_posts/ahmedlone127/2023-05-26-pos_ud_bokmaal_nb.md +++ b/docs/_posts/ahmedlone127/2023-05-26-pos_ud_bokmaal_nb.md @@ -34,39 +34,7 @@ This model was trained using the dataset available at https://universaldependenc ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -pos = PerceptronModel.pretrained("pos_ud_bokmaal", "nb") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("pos") - -nlp_pipeline = Pipeline(stages=[document_assembler, sentence_detector, tokenizer, pos]) -light_pipeline = LightPipeline(nlp_pipeline.fit(spark.createDataFrame([['']]).toDF("text"))) -results = light_pipeline.fullAnnotate("Annet enn å være kongen i nord, er John Snow en engelsk lege og en leder innen utvikling av anestesi og medisinsk hygiene.") -``` -```scala - -val pos = PerceptronModel.pretrained("pos_ud_bokmaal", "nb") - .setInputCols(Array("document", "token")) - .setOutputCol("pos") - -val pipeline = new Pipeline().setStages(Array(document_assembler, sentence_detector, tokenizer, pos)) -val data = Seq("Annet enn å være kongen i nord, er John Snow en engelsk lege og en leder innen utvikling av anestesi og medisinsk hygiene.").toDF("text") -val result = pipeline.fit(data).transform(data) -``` - -{:.nlu-block} -```python - -import nlu -text = ["""Annet enn å være kongen i nord, er John Snow en engelsk lege og en leder innen utvikling av anestesi og medisinsk hygiene."""] -pos_df = nlu.load('nb.pos.ud_bokmaal').predict(text) -pos_df -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-26-recognize_entities_dl_fa.md b/docs/_posts/ahmedlone127/2023-05-26-recognize_entities_dl_fa.md index f3050a29f18a85..b1adad1961fabb 100644 --- a/docs/_posts/ahmedlone127/2023-05-26-recognize_entities_dl_fa.md +++ b/docs/_posts/ahmedlone127/2023-05-26-recognize_entities_dl_fa.md @@ -32,37 +32,7 @@ The explain_document_dl is a pretrained pipeline that we can use to process text ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipeline - -pipeline = PretrainedPipeline('recognize_entities_dl', lang = 'fa') - -annotations = pipeline.fullAnnotate("""به گزارش خبرنگار ایرنا ، بر اساس تصمیم این مجمع ، محمد قمی نماینده مردم پاکدشت به عنوان رئیس و علی‌اکبر موسوی خوئینی و شمس‌الدین وهابی نمایندگان مردم تهران به عنوان نواب رئیس انتخاب شدند""")[0] - -annotations.keys() -``` -```scala - -val pipeline = new PretrainedPipeline("recognize_entities_dl", lang = "fa") -val result = pipeline.fullAnnotate("""به گزارش خبرنگار ایرنا ، بر اساس تصمیم این مجمع ، محمد قمی نماینده مردم پاکدشت به عنوان رئیس و علی‌اکبر موسوی خوئینی و شمس‌الدین وهابی نمایندگان مردم تهران به عنوان نواب رئیس انتخاب شدند""")(0) -``` - -{:.nlu-block} -```python - -import nlu - -text = ["""به گزارش خبرنگار ایرنا ، بر اساس تصمیم این مجمع ، محمد قمی نماینده مردم پاکدشت به عنوان رئیس و علی‌اکبر موسوی خوئینی و شمس‌الدین وهابی نمایندگان مردم تهران به عنوان نواب رئیس انتخاب شدند"""] - -result_df = nlu.load('fa.recognize_entities_dl').predict(text) - -result_df -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-26-roberta_base_token_classifier_ontonotes_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-26-roberta_base_token_classifier_ontonotes_pipeline_en.md index 52cb3c799c48dc..f654b8b3289b95 100644 --- a/docs/_posts/ahmedlone127/2023-05-26-roberta_base_token_classifier_ontonotes_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-26-roberta_base_token_classifier_ontonotes_pipeline_en.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on the top of [roberta_base_token_classifier_o ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -pipeline = PretrainedPipeline("roberta_base_token_classifier_ontonotes_pipeline", lang = "en") - -pipeline.annotate("My name is John and I have been working at John Snow Labs since November 2020.") -``` -```scala - -val pipeline = new PretrainedPipeline("roberta_base_token_classifier_ontonotes_pipeline", lang = "en") -pipeline.annotate("My name is John and I have been working at John Snow Labs since November 2020.")) -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-26-roberta_large_token_classifier_conll03_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-26-roberta_large_token_classifier_conll03_pipeline_en.md index 617edc160336e2..790fb6ffaafeb9 100644 --- a/docs/_posts/ahmedlone127/2023-05-26-roberta_large_token_classifier_conll03_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-26-roberta_large_token_classifier_conll03_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [roberta_large_token_classifier_ ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("roberta_large_token_classifier_conll03_pipeline", lang = "en") - -pipeline.annotate("My name is John and I work at John Snow Labs.") -``` -```scala - - -val pipeline = new PretrainedPipeline("roberta_large_token_classifier_conll03_pipeline", lang = "en") -pipeline.annotate("My name is John and I work at John Snow Labs.")) -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-26-roberta_token_classifier_bne_capitel_ner_pipeline_es.md b/docs/_posts/ahmedlone127/2023-05-26-roberta_token_classifier_bne_capitel_ner_pipeline_es.md index 8ac615bb296f92..b980cbc5fabf4d 100644 --- a/docs/_posts/ahmedlone127/2023-05-26-roberta_token_classifier_bne_capitel_ner_pipeline_es.md +++ b/docs/_posts/ahmedlone127/2023-05-26-roberta_token_classifier_bne_capitel_ner_pipeline_es.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on the top of [roberta_token_classifier_bne_ca ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -pipeline = PretrainedPipeline("roberta_token_classifier_bne_capitel_ner_pipeline", lang = "es") - -pipeline.annotate("Me llamo Antonio y trabajo en la fábrica de Mercedes-Benz en Madrid.") -``` -```scala - -val pipeline = new PretrainedPipeline("roberta_token_classifier_bne_capitel_ner_pipeline", lang = "es") -pipeline.annotate("Me llamo Antonio y trabajo en la fábrica de Mercedes-Benz en Madrid.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-26-roberta_token_classifier_icelandic_ner_pipeline_is.md b/docs/_posts/ahmedlone127/2023-05-26-roberta_token_classifier_icelandic_ner_pipeline_is.md index b128a453a67fd2..c618f3be9344c5 100644 --- a/docs/_posts/ahmedlone127/2023-05-26-roberta_token_classifier_icelandic_ner_pipeline_is.md +++ b/docs/_posts/ahmedlone127/2023-05-26-roberta_token_classifier_icelandic_ner_pipeline_is.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on the top of [roberta_token_classifier_icelan ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -pipeline = PretrainedPipeline("roberta_token_classifier_icelandic_ner_pipeline", lang = "is") - -pipeline.annotate("Ég heiti Peter Fergusson. Ég hef búið í New York síðan í október 2011 og unnið hjá Tesla Motor og þénað 100K $ á ári.") -``` -```scala - -val pipeline = new PretrainedPipeline("roberta_token_classifier_icelandic_ner_pipeline", lang = "is") -pipeline.annotate("Ég heiti Peter Fergusson. Ég hef búið í New York síðan í október 2011 og unnið hjá Tesla Motor og þénað 100K $ á ári.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-26-roberta_token_classifier_timex_semeval_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-26-roberta_token_classifier_timex_semeval_pipeline_en.md index 973b35a190fd97..1d2b29cf0a8ef6 100644 --- a/docs/_posts/ahmedlone127/2023-05-26-roberta_token_classifier_timex_semeval_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-26-roberta_token_classifier_timex_semeval_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [roberta_token_classifier_timex_ ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -timex_pipeline = PretrainedPipeline("roberta_token_classifier_timex_semeval_pipeline", lang = "en") - -timex_pipeline.annotate("Model training was started at 22:12C and it took 3 days from Tuesday to Friday.") -``` -```scala - - -val timex_pipeline = new PretrainedPipeline("roberta_token_classifier_timex_semeval_pipeline", lang = "en") -timex_pipeline.annotate("Model training was started at 22:12C and it took 3 days from Tuesday to Friday.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-26-spellcheck_dl_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-26-spellcheck_dl_pipeline_en.md index fa564958af1b5c..4ebd7962c79198 100644 --- a/docs/_posts/ahmedlone127/2023-05-26-spellcheck_dl_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-26-spellcheck_dl_pipeline_en.md @@ -32,27 +32,7 @@ This pretrained spellchecker pipeline is built on the top of [spellcheck_dl](htt ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("spellcheck_dl_pipeline", lang = "en") - -text = ["During the summer we have the best ueather.", "I have a black ueather jacket, so nice."] - -pipeline.annotate(text) -``` -```scala - - -val pipeline = new PretrainedPipeline("spellcheck_dl_pipeline", lang = "en") -val example = Array("During the summer we have the best ueather.", "I have a black ueather jacket, so nice.") - -pipeline.annotate(example) -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-26-xlm_roberta_base_token_classifier_conll03_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-26-xlm_roberta_base_token_classifier_conll03_pipeline_en.md index 83c7e0e7dc12cd..93bb842ac0a793 100644 --- a/docs/_posts/ahmedlone127/2023-05-26-xlm_roberta_base_token_classifier_conll03_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-26-xlm_roberta_base_token_classifier_conll03_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [xlm_roberta_base_token_classifi ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("xlm_roberta_base_token_classifier_conll03_pipeline", lang = "en") - -pipeline.annotate("My name is John and I work at John Snow Labs.") -``` -```scala - - -val pipeline = new PretrainedPipeline("xlm_roberta_base_token_classifier_conll03_pipeline", lang = "en") -pipeline.annotate("My name is John and I work at John Snow Labs.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-26-xlm_roberta_base_token_classifier_ontonotes_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-26-xlm_roberta_base_token_classifier_ontonotes_pipeline_en.md index bfc143f8889183..5d034ba613c997 100644 --- a/docs/_posts/ahmedlone127/2023-05-26-xlm_roberta_base_token_classifier_ontonotes_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-26-xlm_roberta_base_token_classifier_ontonotes_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [xlm_roberta_base_token_classifi ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("xlm_roberta_base_token_classifier_ontonotes_pipeline", lang = "en") - -pipeline.annotate("My name is John and I have been working at John Snow Labs since November 2020.") -``` -```scala - - -val pipeline = new PretrainedPipeline("xlm_roberta_base_token_classifier_ontonotes_pipeline", lang = "en") -pipeline.annotate("My name is John and I have been working at John Snow Labs since November 2020.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-26-xlm_roberta_large_token_classifier_conll03_pipeline_de.md b/docs/_posts/ahmedlone127/2023-05-26-xlm_roberta_large_token_classifier_conll03_pipeline_de.md index d7b6d8ec978ee5..fad52217696689 100644 --- a/docs/_posts/ahmedlone127/2023-05-26-xlm_roberta_large_token_classifier_conll03_pipeline_de.md +++ b/docs/_posts/ahmedlone127/2023-05-26-xlm_roberta_large_token_classifier_conll03_pipeline_de.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on the top of [xlm_roberta_large_token_classif ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -pipeline = PretrainedPipeline("xlm_roberta_large_token_classifier_conll03_pipeline", lang = "de") - -pipeline.annotate("Ibser begann seine Karriere beim ASK Ebreichsdorf. 2004 wechselte er zu Admira Wacker Mödling, wo er auch in der Akademie spielte.") -``` -```scala - -val pipeline = new PretrainedPipeline("xlm_roberta_large_token_classifier_conll03_pipeline", lang = "de") -pipeline.annotate("Ibser begann seine Karriere beim ASK Ebreichsdorf. 2004 wechselte er zu Admira Wacker Mödling, wo er auch in der Akademie spielte.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-26-xlm_roberta_large_token_classifier_hrl_pipeline_xx.md b/docs/_posts/ahmedlone127/2023-05-26-xlm_roberta_large_token_classifier_hrl_pipeline_xx.md index 32a4f08022b69b..ac1207126da6e2 100644 --- a/docs/_posts/ahmedlone127/2023-05-26-xlm_roberta_large_token_classifier_hrl_pipeline_xx.md +++ b/docs/_posts/ahmedlone127/2023-05-26-xlm_roberta_large_token_classifier_hrl_pipeline_xx.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on the top of [xlm_roberta_large_token_classif ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -pipeline = PretrainedPipeline("xlm_roberta_large_token_classifier_hrl_pipeline", lang = "xx") - -pipeline.annotate("يمكنكم مشاهدة أمير منطقة الرياض الأمير فيصل بن بندر بن عبد العزيز في كل مناسبة وافتتاح تتعلق بمشاريع التعليم والصحة وخدمة الطرق والمشاريع الثقافية في منطقة الرياض.") -``` -```scala - -val pipeline = new PretrainedPipeline("xlm_roberta_large_token_classifier_hrl_pipeline", lang = "xx") -pipeline.annotate("يمكنكم مشاهدة أمير منطقة الرياض الأمير فيصل بن بندر بن عبد العزيز في كل مناسبة وافتتاح تتعلق بمشاريع التعليم والصحة وخدمة الطرق والمشاريع الثقافية في منطقة الرياض.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-26-xlm_roberta_large_token_classifier_masakhaner_pipeline_xx.md b/docs/_posts/ahmedlone127/2023-05-26-xlm_roberta_large_token_classifier_masakhaner_pipeline_xx.md index effb202a3b61c5..dd99100e318fea 100644 --- a/docs/_posts/ahmedlone127/2023-05-26-xlm_roberta_large_token_classifier_masakhaner_pipeline_xx.md +++ b/docs/_posts/ahmedlone127/2023-05-26-xlm_roberta_large_token_classifier_masakhaner_pipeline_xx.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on [xlm_roberta_large_token_classifier_masakha ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -masakhaner_pipeline = PretrainedPipeline("xlm_roberta_large_token_classifier_masakhaner_pipeline", lang = "xx") - -masakhaner_pipeline.annotate("አህመድ ቫንዳ ከ3-10-2000 ጀምሮ በአዲስ አበባ ኖሯል።") -``` -```scala - -val masakhaner_pipeline = new PretrainedPipeline("xlm_roberta_large_token_classifier_masakhaner_pipeline", lang = "xx") -val masakhaner_pipeline.annotate("አህመድ ቫንዳ ከ3-10-2000 ጀምሮ በአዲስ አበባ ኖሯል።") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-26-xlnet_base_token_classifier_conll03_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-26-xlnet_base_token_classifier_conll03_pipeline_en.md index aa40cf3ff9bbcc..6df7c6058a36e6 100644 --- a/docs/_posts/ahmedlone127/2023-05-26-xlnet_base_token_classifier_conll03_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-26-xlnet_base_token_classifier_conll03_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [xlnet_base_token_classifier_con ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("xlnet_base_token_classifier_conll03_pipeline", lang = "en") - -pipeline.annotate("My name is John and I work at John Snow Labs.") -``` -```scala - - -val pipeline = new PretrainedPipeline("xlnet_base_token_classifier_conll03_pipeline", lang = "en") -pipeline.annotate("My name is John and I work at John Snow Labs.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-26-xlnet_large_token_classifier_conll03_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-26-xlnet_large_token_classifier_conll03_pipeline_en.md index ed3e5055d40756..fdef44b9b80f33 100644 --- a/docs/_posts/ahmedlone127/2023-05-26-xlnet_large_token_classifier_conll03_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-26-xlnet_large_token_classifier_conll03_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [xlnet_large_token_classifier_co ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("xlnet_large_token_classifier_conll03_pipeline", lang = "en") - -pipeline.annotate("My name is John and I work at John Snow Labs.") -``` -```scala - - -val pipeline = new PretrainedPipeline("xlnet_large_token_classifier_conll03_pipeline", lang = "en") -pipeline.annotate("My name is John and I work at John Snow Labs.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-27-albert_base_token_classifier_conll03_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-27-albert_base_token_classifier_conll03_pipeline_en.md index d2d6e700c449be..27cbd61e327472 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-albert_base_token_classifier_conll03_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-27-albert_base_token_classifier_conll03_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [albert_base_token_classifier_co ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("albert_base_token_classifier_conll03_pipeline", lang = "en") - -pipeline.annotate("My name is John and I work at John Snow Labs.") -``` -```scala - - -val pipeline = new PretrainedPipeline("albert_base_token_classifier_conll03_pipeline", lang = "en") -pipeline.annotate("My name is John and I work at John Snow Labs.")) -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-27-albert_large_token_classifier_conll03_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-27-albert_large_token_classifier_conll03_pipeline_en.md index 308cd3d0f45017..6588c8f77410ad 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-albert_large_token_classifier_conll03_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-27-albert_large_token_classifier_conll03_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [albert_large_token_classifier_c ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("albert_large_token_classifier_conll03_pipeline", lang = "en") - -pipeline.annotate("My name is John and I work at John Snow Labs.") -``` -```scala - - -val pipeline = new PretrainedPipeline("albert_large_token_classifier_conll03_pipeline", lang = "en") -pipeline.annotate("My name is John and I work at John Snow Labs.")) -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-27-albert_xlarge_token_classifier_conll03_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-27-albert_xlarge_token_classifier_conll03_pipeline_en.md index 9704b0293fda63..1582fc0e45f004 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-albert_xlarge_token_classifier_conll03_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-27-albert_xlarge_token_classifier_conll03_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [albert_xlarge_token_classifier_ ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("albert_xlarge_token_classifier_conll03_pipeline", lang = "en") - -pipeline.annotate("My name is John and I work at John Snow Labs.") -``` -```scala - - -val pipeline = new PretrainedPipeline("albert_xlarge_token_classifier_conll03_pipeline", lang = "en") -pipeline.annotate("My name is John and I work at John Snow Labs.")) -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-27-analyze_sentiment_en.md b/docs/_posts/ahmedlone127/2023-05-27-analyze_sentiment_en.md index 15ae7376dcae25..8c2791c7de3f2e 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-analyze_sentiment_en.md +++ b/docs/_posts/ahmedlone127/2023-05-27-analyze_sentiment_en.md @@ -34,39 +34,7 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} - -```python - -from sparknlp.pretrained import PretrainedPipeline - -pipeline = PretrainedPipeline('analyze_sentiment', lang = 'en') - -result = pipeline.fullAnnotate("""Demonicus is a movie turned into a video game! I just love the story and the things that goes on in the film.It is a B-film ofcourse but that doesn`t bother one bit because its made just right and the music was rad! Horror and sword fight freaks,buy this movie now!""") - - -``` -```scala - -import com.johnsnowlabs.nlp.pretrained.PretrainedPipeline -val pipeline = new PretrainedPipeline("analyze_sentiment", lang = "en") - -val result = pipeline.fullAnnotate("""Demonicus is a movie turned into a video game! I just love the story and the things that goes on in the film.It is a B-film ofcourse but that doesn`t bother one bit because its made just right and the music was rad! Horror and sword fight freaks,buy this movie now!""") - -``` - -{:.nlu-block} -```python - -import nlu -text = ["""Demonicus is a movie turned into a video game! I just love the story and the things that goes on in the film.It is a B-film ofcourse but that doesn`t bother one bit because its made just right and the music was rad! Horror and sword fight freaks,buy this movie now!"""] -result_df = nlu.load('en.classify').predict(text) -result_df - -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-27-analyze_sentimentdl_glove_imdb_en.md b/docs/_posts/ahmedlone127/2023-05-27-analyze_sentimentdl_glove_imdb_en.md index 13ee9647ab1e2b..c47d167794977a 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-analyze_sentimentdl_glove_imdb_en.md +++ b/docs/_posts/ahmedlone127/2023-05-27-analyze_sentimentdl_glove_imdb_en.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('analyze_sentimentdl_glove_imdb', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("analyze_sentimentdl_glove_imdb", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.sentiment.glove').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-27-bert_sequence_classifier_age_news_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-27-bert_sequence_classifier_age_news_pipeline_en.md index 27a4701e743654..cbf4fe98bc05d6 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-bert_sequence_classifier_age_news_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-27-bert_sequence_classifier_age_news_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [bert_sequence_classifier_age_ne ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -news_pipeline = PretrainedPipeline("bert_sequence_classifier_age_news_pipeline", lang = "en") - -news_pipeline.annotate("Microsoft has taken its first step into the metaverse.") -``` -```scala - - -val news_pipeline = new PretrainedPipeline("bert_sequence_classifier_age_news_pipeline", lang = "en") -news_pipeline.annotate("Microsoft has taken its first step into the metaverse.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-27-bert_sequence_classifier_trec_coarse_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-27-bert_sequence_classifier_trec_coarse_pipeline_en.md index 58700391844037..317830b7d4660d 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-bert_sequence_classifier_trec_coarse_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-27-bert_sequence_classifier_trec_coarse_pipeline_en.md @@ -34,23 +34,7 @@ The TREC dataset for question classification consists of open-domain, fact-based ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -trec_pipeline = PretrainedPipeline("bert_sequence_classifier_trec_coarse_pipeline", lang = "en") - -trec_pipeline.annotate("Germany is the largest country in Europe economically.") -``` -```scala - - -val trec_pipeline = new PretrainedPipeline("bert_sequence_classifier_trec_coarse_pipeline", lang = "en") -trec_pipeline.annotate("Germany is the largest country in Europe economically.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-27-bert_token_classifier_dutch_udlassy_ner_pipeline_nl.md b/docs/_posts/ahmedlone127/2023-05-27-bert_token_classifier_dutch_udlassy_ner_pipeline_nl.md index 8a0322af18feb8..b8ec408c8f60d0 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-bert_token_classifier_dutch_udlassy_ner_pipeline_nl.md +++ b/docs/_posts/ahmedlone127/2023-05-27-bert_token_classifier_dutch_udlassy_ner_pipeline_nl.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on the top of [bert_token_classifier_dutch_udl ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -pipeline = PretrainedPipeline("bert_token_classifier_dutch_udlassy_ner_pipeline", lang = "nl") - -pipeline.annotate("Mijn naam is Peter Fergusson. Ik woon sinds oktober 2011 in New York en werk 5 jaar bij Tesla Motor.") -``` -```scala - -val pipeline = new PretrainedPipeline("bert_token_classifier_dutch_udlassy_ner_pipeline", lang = "nl") -pipeline.annotate("Mijn naam is Peter Fergusson. Ik woon sinds oktober 2011 in New York en werk 5 jaar bij Tesla Motor.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-27-bert_token_classifier_hi_en_ner_pipeline_hi.md b/docs/_posts/ahmedlone127/2023-05-27-bert_token_classifier_hi_en_ner_pipeline_hi.md index 96a1e85db5fcfb..c82fc583dadf1e 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-bert_token_classifier_hi_en_ner_pipeline_hi.md +++ b/docs/_posts/ahmedlone127/2023-05-27-bert_token_classifier_hi_en_ner_pipeline_hi.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on [bert_token_classifier_hi_en_ner](https://n ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -pipeline = PretrainedPipeline("bert_token_classifier_hi_en_ner_pipeline", lang = "hi") - -pipeline.annotate("रिलायंस इंडस्ट्रीज़ लिमिटेड (Reliance Industries Limited) एक भारतीय संगुटिका नियंत्रक कंपनी है, जिसका मुख्यालय मुंबई, महाराष्ट्र (Maharashtra) में स्थित है।रतन नवल टाटा (28 दिसंबर 1937, को मुम्बई (Mumbai), में जन्मे) टाटा समुह के वर्तमान अध्यक्ष, जो भारत की सबसे बड़ी व्यापारिक समूह है, जिसकी स्थापना जमशेदजी टाटा ने की और उनके परिवार की पीढियों ने इसका विस्तार किया और इसे दृढ़ बनाया।") -``` -```scala - -val pipeline = new PretrainedPipeline("bert_token_classifier_hi_en_ner_pipeline", lang = "hi") -val pipeline.annotate("रिलायंस इंडस्ट्रीज़ लिमिटेड (Reliance Industries Limited) एक भारतीय संगुटिका नियंत्रक कंपनी है, जिसका मुख्यालय मुंबई, महाराष्ट्र (Maharashtra) में स्थित है।रतन नवल टाटा (28 दिसंबर 1937, को मुम्बई (Mumbai), में जन्मे) टाटा समुह के वर्तमान अध्यक्ष, जो भारत की सबसे बड़ी व्यापारिक समूह है, जिसकी स्थापना जमशेदजी टाटा ने की और उनके परिवार की पीढियों ने इसका विस्तार किया और इसे दृढ़ बनाया।") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-27-bert_token_classifier_scandi_ner_pipeline_xx.md b/docs/_posts/ahmedlone127/2023-05-27-bert_token_classifier_scandi_ner_pipeline_xx.md index 29eb984bfbc288..cf7eba7ac820eb 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-bert_token_classifier_scandi_ner_pipeline_xx.md +++ b/docs/_posts/ahmedlone127/2023-05-27-bert_token_classifier_scandi_ner_pipeline_xx.md @@ -32,20 +32,7 @@ This pretrained pipeline is built on [bert_token_classifier_scandi_ner](https:// ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -scandiner_pipeline = PretrainedPipeline("bert_token_classifier_scandi_ner_pipeline", lang = "xx") -scandiner_pipeline.annotate("Hans er professor ved Statens Universitet, som ligger i København, og han er en rigtig københavner.") -``` -```scala - -val scandiner_pipeline = new PretrainedPipeline("bert_token_classifier_scandi_ner_pipeline", lang = "xx") - -val scandiner_pipeline.annotate("Hans er professor ved Statens Universitet, som ligger i København, og han er en rigtig københavner.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-27-clean_pattern_en.md b/docs/_posts/ahmedlone127/2023-05-27-clean_pattern_en.md index c25863d88ce587..faa2cdd4393fbe 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-clean_pattern_en.md +++ b/docs/_posts/ahmedlone127/2023-05-27-clean_pattern_en.md @@ -34,33 +34,7 @@ The clean_pattern is a pretrained pipeline that we can use to process text with ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('clean_pattern', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() -``` -```scala - - -val pipeline = new PretrainedPipeline("clean_pattern", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.clean.pattern').predict(text) -result_df -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-27-clean_stop_en.md b/docs/_posts/ahmedlone127/2023-05-27-clean_stop_en.md index f394d0121d9c0c..be4e00ba485582 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-clean_stop_en.md +++ b/docs/_posts/ahmedlone127/2023-05-27-clean_stop_en.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('clean_stop', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("clean_stop", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.clean.stop').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-27-distilbert_base_token_classifier_masakhaner_pipeline_xx.md b/docs/_posts/ahmedlone127/2023-05-27-distilbert_base_token_classifier_masakhaner_pipeline_xx.md index 1ae8f9c38f5ea2..4d45aaeb23d020 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-distilbert_base_token_classifier_masakhaner_pipeline_xx.md +++ b/docs/_posts/ahmedlone127/2023-05-27-distilbert_base_token_classifier_masakhaner_pipeline_xx.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on the top of [distilbert_base_token_classifie ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -masakhaner_pipeline = PretrainedPipeline("distilbert_base_token_classifier_masakhaner_pipeline", lang = "xx") - -masakhaner_pipeline.annotate("Ilé-iṣẹ́ẹ Mohammed Sani Musa, Activate Technologies Limited, ni ó kó ẹ̀rọ Ìwé-pélébé Ìdìbò Alálòpẹ́ (PVCs) tí a lò fún ìbò ọdún-un 2019, ígbà tí ó jẹ́ òǹdíjedupò lábẹ́ ẹgbẹ́ olóṣèlúu tí ó ń tukọ̀ ètò ìṣèlú lọ́wọ́ All rogressives Congress (APC) fún Aṣojú Ìlà-Oòrùn Niger, ìyẹn gẹ́gẹ́ bí ilé iṣẹ́ aṣèwádìí, Premium Times ṣe tẹ̀ ẹ́ jáde.") -``` -```scala - -val masakhaner_pipeline = new PretrainedPipeline("distilbert_base_token_classifier_masakhaner_pipeline", lang = "xx") -masakhaner_pipeline.annotate("Ilé-iṣẹ́ẹ Mohammed Sani Musa, Activate Technologies Limited, ni ó kó ẹ̀rọ Ìwé-pélébé Ìdìbò Alálòpẹ́ (PVCs) tí a lò fún ìbò ọdún-un 2019, ígbà tí ó jẹ́ òǹdíjedupò lábẹ́ ẹgbẹ́ olóṣèlúu tí ó ń tukọ̀ ètò ìṣèlú lọ́wọ́ All rogressives Congress (APC) fún Aṣojú Ìlà-Oòrùn Niger, ìyẹn gẹ́gẹ́ bí ilé iṣẹ́ aṣèwádìí, Premium Times ṣe tẹ̀ ẹ́ jáde.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-27-distilbert_token_classifier_typo_detector_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-27-distilbert_token_classifier_typo_detector_pipeline_en.md index 43ac09fbb7b9ac..2097fe15c0236e 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-distilbert_token_classifier_typo_detector_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-27-distilbert_token_classifier_typo_detector_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [distilbert_token_classifier_typ ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -typo_pipeline = PretrainedPipeline("distilbert_token_classifier_typo_detector_pipeline", lang = "en") - -typo_pipeline.annotate("He had also stgruggled with addiction during his tine in Congress.") -``` -```scala - - -val typo_pipeline = new PretrainedPipeline("distilbert_token_classifier_typo_detector_pipeline", lang = "en") -typo_pipeline.annotate("He had also stgruggled with addiction during his tine in Congress.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-27-distilbert_token_classifier_typo_detector_pipeline_is.md b/docs/_posts/ahmedlone127/2023-05-27-distilbert_token_classifier_typo_detector_pipeline_is.md index 6569533a9d3a6c..0f1c5f0b0a103f 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-distilbert_token_classifier_typo_detector_pipeline_is.md +++ b/docs/_posts/ahmedlone127/2023-05-27-distilbert_token_classifier_typo_detector_pipeline_is.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on the top of [distilbert_token_classifier_typ ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -typo_pipeline = PretrainedPipeline("distilbert_token_classifier_typo_detector_pipeline", lang = "is") - -typo_pipeline.annotate("Það er miög auðvelt að draga marktækar álykanir af texta með Spark NLP.") -``` -```scala - -val typo_pipeline = new PretrainedPipeline("distilbert_token_classifier_typo_detector_pipeline", lang = "is") -typo_pipeline.annotate("Það er miög auðvelt að draga marktækar álykanir af texta með Spark NLP.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-27-distilroberta_base_token_classifier_ontonotes_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-27-distilroberta_base_token_classifier_ontonotes_pipeline_en.md index ccb91b9f89fa58..8c6400f5c9f987 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-distilroberta_base_token_classifier_ontonotes_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-27-distilroberta_base_token_classifier_ontonotes_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [distilroberta_base_token_classi ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("distilroberta_base_token_classifier_ontonotes_pipeline", lang = "en") - -pipeline.annotate("My name is John and I have been working at John Snow Labs since November 2020.") -``` -```scala - - -val pipeline = new PretrainedPipeline("distilroberta_base_token_classifier_ontonotes_pipeline", lang = "en") -pipeline.annotate("My name is John and I have been working at John Snow Labs since November 2020.")) -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_lg_da.md b/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_lg_da.md index 956306f8d60845..8f0cc8a8514e30 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_lg_da.md +++ b/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_lg_da.md @@ -33,25 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("entity_recognizer_lg", "da") - -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -{:.nlu-block} -```python -import nlu -nlu.load("da.ner.lg").predict("""I love johnsnowlabs! """) -``` - -
- {:.model-param}
diff --git a/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_lg_de.md b/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_lg_de.md index 57ae48b9514af0..2a25c7bdc49a6c 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_lg_de.md +++ b/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_lg_de.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_lg', lang = 'de') -annotations = pipeline.fullAnnotate(""Hallo aus John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_lg", lang = "de") -val result = pipeline.fullAnnotate("Hallo aus John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hallo aus John Snow Labs! ""] -result_df = nlu.load('de.ner.recognizer.lg').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_lg_es.md b/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_lg_es.md index 3601a98f89ce0e..5692e0385f162e 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_lg_es.md +++ b/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_lg_es.md @@ -33,25 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("entity_recognizer_lg", "es") - -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -{:.nlu-block} -```python -import nlu -nlu.load("es.ner.lg").predict("""I love johnsnowlabs! """) -``` - -
- {:.model-param}
diff --git a/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_lg_fi.md b/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_lg_fi.md index 74e7136b73807f..50b060e15af47d 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_lg_fi.md +++ b/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_lg_fi.md @@ -33,26 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("entity_recognizer_lg", "fi") - -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -{:.nlu-block} -```python -import nlu -nlu.load("fi.ner.lg").predict("""I love johnsnowlabs! """) -``` - -
- {:.model-param}
diff --git a/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_lg_fr.md b/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_lg_fr.md index 9151aaed57cb90..ab6affb487c85c 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_lg_fr.md +++ b/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_lg_fr.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_lg', lang = 'fr') -annotations = pipeline.fullAnnotate(""Bonjour de John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_lg", lang = "fr") -val result = pipeline.fullAnnotate("Bonjour de John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Bonjour de John Snow Labs! ""] -result_df = nlu.load('fr.ner').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_lg_nl.md b/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_lg_nl.md index 621011ca394ae5..27d4fee565fe35 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_lg_nl.md +++ b/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_lg_nl.md @@ -33,25 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("entity_recognizer_lg", "nl") - -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -{:.nlu-block} -```python -import nlu -nlu.load("nl.ner.lg").predict("""I love johnsnowlabs! """) -``` - -
- {:.model-param}
diff --git a/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_lg_no.md b/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_lg_no.md index d40cd9f578794e..0b3d24883f9409 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_lg_no.md +++ b/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_lg_no.md @@ -33,25 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("entity_recognizer_lg", "no") - -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -{:.nlu-block} -```python -import nlu -nlu.load("no.ner.lg").predict("""I love johnsnowlabs! """) -``` - -
- {:.model-param}
diff --git a/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_lg_pl.md b/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_lg_pl.md index f0043de69ccb63..edcd3f6946f0c2 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_lg_pl.md +++ b/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_lg_pl.md @@ -33,25 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("entity_recognizer_lg", "pl") - -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -{:.nlu-block} -```python -import nlu -nlu.load("pl.ner.lg").predict("""I love johnsnowlabs! """) -``` - -
- {:.model-param}
diff --git a/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_lg_pt.md b/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_lg_pt.md index 9a2d737cb0e557..52aa85f4e274a4 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_lg_pt.md +++ b/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_lg_pt.md @@ -33,25 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("entity_recognizer_lg", "pt") - -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -{:.nlu-block} -```python -import nlu -nlu.load("pt.ner.lg").predict("""I love johnsnowlabs! """) -``` - -
- {:.model-param}
diff --git a/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_lg_ru.md b/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_lg_ru.md index 7822530b0cbb2f..3f5763c45c8baa 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_lg_ru.md +++ b/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_lg_ru.md @@ -33,25 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("entity_recognizer_lg", "ru") - -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -{:.nlu-block} -```python -import nlu -nlu.load("ru.ner.lg").predict("""I love johnsnowlabs! """) -``` - -
- {:.model-param}
diff --git a/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_lg_sv.md b/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_lg_sv.md index c2f3168eccac11..199edf2e70fdc5 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_lg_sv.md +++ b/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_lg_sv.md @@ -33,25 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("entity_recognizer_lg", "sv") - -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -{:.nlu-block} -```python -import nlu -nlu.load("sv.ner.lg").predict("""I love johnsnowlabs! """) -``` - -
- {:.model-param}
diff --git a/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_md_da.md b/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_md_da.md index 28dffc056a2ee6..78ac4deae94938 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_md_da.md +++ b/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_md_da.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_md', lang = 'da') -annotations = pipeline.fullAnnotate(""Hej fra John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_md", lang = "da") -val result = pipeline.fullAnnotate("Hej fra John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hej fra John Snow Labs! ""] -result_df = nlu.load('da.ner.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_md_de.md b/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_md_de.md index 8e0f9e44a29a12..1b93791f84bf57 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_md_de.md +++ b/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_md_de.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_md', lang = 'de') -annotations = pipeline.fullAnnotate(""Hallo aus John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_md", lang = "de") -val result = pipeline.fullAnnotate("Hallo aus John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hallo aus John Snow Labs! ""] -result_df = nlu.load('de.ner.recognizer').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_md_es.md b/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_md_es.md index bd33f278f598ac..aa2374f1e48061 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_md_es.md +++ b/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_md_es.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_md', lang = 'es') -annotations = pipeline.fullAnnotate(""Hola de John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_md", lang = "es") -val result = pipeline.fullAnnotate("Hola de John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hola de John Snow Labs! ""] -result_df = nlu.load('es.ner.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_md_fi.md b/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_md_fi.md index 3f58127152c001..1d7e86af54590c 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_md_fi.md +++ b/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_md_fi.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_md', lang = 'fi') -annotations = pipeline.fullAnnotate(""Hei John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_md", lang = "fi") -val result = pipeline.fullAnnotate("Hei John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hei John Snow Labs! ""] -result_df = nlu.load('fi.ner.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_md_fr.md b/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_md_fr.md index d1690b75b4d2da..34984b9b6598ea 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_md_fr.md +++ b/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_md_fr.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_md', lang = 'fr') -annotations = pipeline.fullAnnotate(""Bonjour de John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_md", lang = "fr") -val result = pipeline.fullAnnotate("Bonjour de John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Bonjour de John Snow Labs! ""] -result_df = nlu.load('fr.ner.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_md_no.md b/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_md_no.md index ff202edb8a36ad..c691a9d49de457 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_md_no.md +++ b/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_md_no.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_md', lang = 'no') -annotations = pipeline.fullAnnotate(""Hei fra John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_md", lang = "no") -val result = pipeline.fullAnnotate("Hei fra John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hei fra John Snow Labs! ""] -result_df = nlu.load('no.ner.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_md_ru.md b/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_md_ru.md index d3430b136bf947..ee5c1900bdc359 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_md_ru.md +++ b/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_md_ru.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_md', lang = 'ru') -annotations = pipeline.fullAnnotate(""Здравствуйте из Джона Снежных Лабораторий! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_md", lang = "ru") -val result = pipeline.fullAnnotate("Здравствуйте из Джона Снежных Лабораторий! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Здравствуйте из Джона Снежных Лабораторий! ""] -result_df = nlu.load('ru.ner.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_md_sv.md b/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_md_sv.md index 9d062a431575dd..ad9918b5d0bdb4 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_md_sv.md +++ b/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_md_sv.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_md', lang = 'sv') -annotations = pipeline.fullAnnotate(""Hej från John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_md", lang = "sv") -val result = pipeline.fullAnnotate("Hej från John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hej från John Snow Labs! ""] -result_df = nlu.load('sv.ner.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_sm_da.md b/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_sm_da.md index 139ac16d41ff8a..c2b37b2ba2ef66 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_sm_da.md +++ b/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_sm_da.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_sm', lang = 'da') -annotations = pipeline.fullAnnotate(""Hej fra John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_sm", lang = "da") -val result = pipeline.fullAnnotate("Hej fra John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hej fra John Snow Labs! ""] -result_df = nlu.load('da.ner').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_sm_es.md b/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_sm_es.md index 93b1542ce8ee38..de62befcc5c4f5 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_sm_es.md +++ b/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_sm_es.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_sm', lang = 'es') -annotations = pipeline.fullAnnotate(""Hola de John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_sm", lang = "es") -val result = pipeline.fullAnnotate("Hola de John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hola de John Snow Labs! ""] -result_df = nlu.load('es.ner').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_sm_fi.md b/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_sm_fi.md index 9c21b117ae969f..137e13cb56dbb2 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_sm_fi.md +++ b/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_sm_fi.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_sm', lang = 'fi') -annotations = pipeline.fullAnnotate(""Hei John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_sm", lang = "fi") -val result = pipeline.fullAnnotate("Hei John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hei John Snow Labs! ""] -result_df = nlu.load('fi.ner').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_sm_no.md b/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_sm_no.md index 51924c114e80a3..f7385a54878a98 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_sm_no.md +++ b/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_sm_no.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_sm', lang = 'no') -annotations = pipeline.fullAnnotate(""Hei fra John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_sm", lang = "no") -val result = pipeline.fullAnnotate("Hei fra John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hei fra John Snow Labs! ""] -result_df = nlu.load('no.ner').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_sm_ru.md b/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_sm_ru.md index 287938422ba350..cee0376d928155 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_sm_ru.md +++ b/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_sm_ru.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_sm', lang = 'ru') -annotations = pipeline.fullAnnotate(""Здравствуйте из Джона Снежных Лабораторий! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_sm", lang = "ru") -val result = pipeline.fullAnnotate("Здравствуйте из Джона Снежных Лабораторий! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Здравствуйте из Джона Снежных Лабораторий! ""] -result_df = nlu.load('ru.ner').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_sm_sv.md b/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_sm_sv.md index 2541ef1cbada3b..13dff453d3e08e 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_sm_sv.md +++ b/docs/_posts/ahmedlone127/2023-05-27-entity_recognizer_sm_sv.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('entity_recognizer_sm', lang = 'sv') -annotations = pipeline.fullAnnotate(""Hej från John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("entity_recognizer_sm", lang = "sv") -val result = pipeline.fullAnnotate("Hej från John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hej från John Snow Labs! ""] -result_df = nlu.load('sv.ner').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-27-explain_document_dl_en.md b/docs/_posts/ahmedlone127/2023-05-27-explain_document_dl_en.md index 84215d71bd76ca..b34e8580ac773d 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-explain_document_dl_en.md +++ b/docs/_posts/ahmedlone127/2023-05-27-explain_document_dl_en.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline('explain_document_dl', lang = 'en') -annotations = pipeline.fullAnnotate("The Mona Lisa is an oil painting from the 16th century.")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_dl", lang = "en") -val result = pipeline.fullAnnotate("The Mona Lisa is an oil painting from the 16th century.")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = ["The Mona Lisa is an oil painting from the 16th century."] -result_df = nlu.load('en.explain.dl').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-27-explain_document_lg_da.md b/docs/_posts/ahmedlone127/2023-05-27-explain_document_lg_da.md index 17117261cdc03a..47ea232d475fcb 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-explain_document_lg_da.md +++ b/docs/_posts/ahmedlone127/2023-05-27-explain_document_lg_da.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_lg', lang = 'da') -annotations = pipeline.fullAnnotate(""Hej fra John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_lg", lang = "da") -val result = pipeline.fullAnnotate("Hej fra John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hej fra John Snow Labs! ""] -result_df = nlu.load('da.explain.lg').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-27-explain_document_lg_es.md b/docs/_posts/ahmedlone127/2023-05-27-explain_document_lg_es.md index d5356eb6525bed..c0fe24d9346c42 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-explain_document_lg_es.md +++ b/docs/_posts/ahmedlone127/2023-05-27-explain_document_lg_es.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_lg', lang = 'es') -annotations = pipeline.fullAnnotate(""Hola de John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_lg", lang = "es") -val result = pipeline.fullAnnotate("Hola de John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hola de John Snow Labs! ""] -result_df = nlu.load('es.explain.lg').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-27-explain_document_lg_fi.md b/docs/_posts/ahmedlone127/2023-05-27-explain_document_lg_fi.md index 36c29d4e22735f..42025dd9750126 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-explain_document_lg_fi.md +++ b/docs/_posts/ahmedlone127/2023-05-27-explain_document_lg_fi.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_lg', lang = 'fi') -annotations = pipeline.fullAnnotate(""Hei John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_lg", lang = "fi") -val result = pipeline.fullAnnotate("Hei John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hei John Snow Labs! ""] -result_df = nlu.load('fi.explain.lg').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-27-explain_document_lg_no.md b/docs/_posts/ahmedlone127/2023-05-27-explain_document_lg_no.md index e1d8b9650bb7c2..67f28b68d529be 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-explain_document_lg_no.md +++ b/docs/_posts/ahmedlone127/2023-05-27-explain_document_lg_no.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_lg', lang = 'no') -annotations = pipeline.fullAnnotate(""Hei fra John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_lg", lang = "no") -val result = pipeline.fullAnnotate("Hei fra John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hei fra John Snow Labs! ""] -result_df = nlu.load('no.explain.lg').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-27-explain_document_lg_ru.md b/docs/_posts/ahmedlone127/2023-05-27-explain_document_lg_ru.md index af9a8fcbf5b825..41a9534bd16dfb 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-explain_document_lg_ru.md +++ b/docs/_posts/ahmedlone127/2023-05-27-explain_document_lg_ru.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_lg', lang = 'ru') -annotations = pipeline.fullAnnotate(""Здравствуйте из Джона Снежных Лабораторий! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_lg", lang = "ru") -val result = pipeline.fullAnnotate("Здравствуйте из Джона Снежных Лабораторий! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Здравствуйте из Джона Снежных Лабораторий! ""] -result_df = nlu.load('ru.explain.lg').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-27-explain_document_lg_sv.md b/docs/_posts/ahmedlone127/2023-05-27-explain_document_lg_sv.md index deb88f991be635..a3da39a918bdd7 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-explain_document_lg_sv.md +++ b/docs/_posts/ahmedlone127/2023-05-27-explain_document_lg_sv.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_lg', lang = 'sv') -annotations = pipeline.fullAnnotate(""Hej från John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_lg", lang = "sv") -val result = pipeline.fullAnnotate("Hej från John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hej från John Snow Labs! ""] -result_df = nlu.load('sv.explain.lg').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-27-explain_document_md_da.md b/docs/_posts/ahmedlone127/2023-05-27-explain_document_md_da.md index ad7874fdb22dd4..cc59a8b5111673 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-explain_document_md_da.md +++ b/docs/_posts/ahmedlone127/2023-05-27-explain_document_md_da.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_md', lang = 'da') -annotations = pipeline.fullAnnotate(""Hej fra John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_md", lang = "da") -val result = pipeline.fullAnnotate("Hej fra John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hej fra John Snow Labs! ""] -result_df = nlu.load('da.explain.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-27-explain_document_md_de.md b/docs/_posts/ahmedlone127/2023-05-27-explain_document_md_de.md index 1c44491294c471..4519c12aa36e03 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-explain_document_md_de.md +++ b/docs/_posts/ahmedlone127/2023-05-27-explain_document_md_de.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_md', lang = 'de') -annotations = pipeline.fullAnnotate(""Hallo aus John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_md", lang = "de") -val result = pipeline.fullAnnotate("Hallo aus John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hallo aus John Snow Labs! ""] -result_df = nlu.load('de.explain.document').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-27-explain_document_md_es.md b/docs/_posts/ahmedlone127/2023-05-27-explain_document_md_es.md index 7a9a3bf643f297..59e2760ef0fb8a 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-explain_document_md_es.md +++ b/docs/_posts/ahmedlone127/2023-05-27-explain_document_md_es.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_md', lang = 'es') -annotations = pipeline.fullAnnotate(""Hola de John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_md", lang = "es") -val result = pipeline.fullAnnotate("Hola de John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hola de John Snow Labs! ""] -result_df = nlu.load('es.explain.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-27-explain_document_md_fi.md b/docs/_posts/ahmedlone127/2023-05-27-explain_document_md_fi.md index 653cb4d41f77a0..693a8c1aa166a9 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-explain_document_md_fi.md +++ b/docs/_posts/ahmedlone127/2023-05-27-explain_document_md_fi.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_md', lang = 'fi') -annotations = pipeline.fullAnnotate(""Hei John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_md", lang = "fi") -val result = pipeline.fullAnnotate("Hei John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hei John Snow Labs! ""] -result_df = nlu.load('fi.explain.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-27-explain_document_md_fr.md b/docs/_posts/ahmedlone127/2023-05-27-explain_document_md_fr.md index 9548b616c40105..0169d22c6dc4ee 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-explain_document_md_fr.md +++ b/docs/_posts/ahmedlone127/2023-05-27-explain_document_md_fr.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_md', lang = 'fr') -annotations = pipeline.fullAnnotate(""Bonjour de John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_md", lang = "fr") -val result = pipeline.fullAnnotate("Bonjour de John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Bonjour de John Snow Labs! ""] -result_df = nlu.load('fr.explain.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-27-explain_document_md_no.md b/docs/_posts/ahmedlone127/2023-05-27-explain_document_md_no.md index b76bcabec18089..17c43f65e36b02 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-explain_document_md_no.md +++ b/docs/_posts/ahmedlone127/2023-05-27-explain_document_md_no.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_md', lang = 'no') -annotations = pipeline.fullAnnotate(""Hei fra John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_md", lang = "no") -val result = pipeline.fullAnnotate("Hei fra John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hei fra John Snow Labs! ""] -result_df = nlu.load('no.explain.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-27-explain_document_md_ru.md b/docs/_posts/ahmedlone127/2023-05-27-explain_document_md_ru.md index 1282459dd46571..94da63baca08bc 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-explain_document_md_ru.md +++ b/docs/_posts/ahmedlone127/2023-05-27-explain_document_md_ru.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_md', lang = 'ru') -annotations = pipeline.fullAnnotate(""Здравствуйте из Джона Снежных Лабораторий! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_md", lang = "ru") -val result = pipeline.fullAnnotate("Здравствуйте из Джона Снежных Лабораторий! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Здравствуйте из Джона Снежных Лабораторий! ""] -result_df = nlu.load('ru.explain.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-27-explain_document_md_sv.md b/docs/_posts/ahmedlone127/2023-05-27-explain_document_md_sv.md index 6609ffedcfe7d7..a145772faf3f4b 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-explain_document_md_sv.md +++ b/docs/_posts/ahmedlone127/2023-05-27-explain_document_md_sv.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_md', lang = 'sv') -annotations = pipeline.fullAnnotate(""Hej från John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_md", lang = "sv") -val result = pipeline.fullAnnotate("Hej från John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hej från John Snow Labs! ""] -result_df = nlu.load('sv.explain.md').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-27-explain_document_ml_en.md b/docs/_posts/ahmedlone127/2023-05-27-explain_document_ml_en.md index 1f90a751788864..b5a883c462adae 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-explain_document_ml_en.md +++ b/docs/_posts/ahmedlone127/2023-05-27-explain_document_ml_en.md @@ -34,33 +34,7 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline('explain_document_ml', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() -``` -```scala - - -val pipeline = new PretrainedPipeline("explain_document_ml", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.explain').predict(text) -result_df -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-27-explain_document_sm_da.md b/docs/_posts/ahmedlone127/2023-05-27-explain_document_sm_da.md index 6a2168b7edb2fe..ca08330f4f8c9a 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-explain_document_sm_da.md +++ b/docs/_posts/ahmedlone127/2023-05-27-explain_document_sm_da.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_sm', lang = 'da') -annotations = pipeline.fullAnnotate(""Hej fra John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_sm", lang = "da") -val result = pipeline.fullAnnotate("Hej fra John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hej fra John Snow Labs! ""] -result_df = nlu.load('da.explain').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-27-explain_document_sm_es.md b/docs/_posts/ahmedlone127/2023-05-27-explain_document_sm_es.md index 88f723a3345c1f..da8ab6fd599145 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-explain_document_sm_es.md +++ b/docs/_posts/ahmedlone127/2023-05-27-explain_document_sm_es.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_sm', lang = 'es') -annotations = pipeline.fullAnnotate(""Hola de John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_sm", lang = "es") -val result = pipeline.fullAnnotate("Hola de John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hola de John Snow Labs! ""] -result_df = nlu.load('es.explain').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-27-explain_document_sm_fi.md b/docs/_posts/ahmedlone127/2023-05-27-explain_document_sm_fi.md index ba3d50e3fec81d..d2b5db8a9e5ba3 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-explain_document_sm_fi.md +++ b/docs/_posts/ahmedlone127/2023-05-27-explain_document_sm_fi.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_sm', lang = 'fi') -annotations = pipeline.fullAnnotate(""Hei John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_sm", lang = "fi") -val result = pipeline.fullAnnotate("Hei John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hei John Snow Labs! ""] -result_df = nlu.load('fi.explain').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-27-explain_document_sm_no.md b/docs/_posts/ahmedlone127/2023-05-27-explain_document_sm_no.md index 6055beeb1282d2..43fd4bb3243d3d 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-explain_document_sm_no.md +++ b/docs/_posts/ahmedlone127/2023-05-27-explain_document_sm_no.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_sm', lang = 'no') -annotations = pipeline.fullAnnotate(""Hei fra John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_sm", lang = "no") -val result = pipeline.fullAnnotate("Hei fra John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hei fra John Snow Labs! ""] -result_df = nlu.load('no.explain').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-27-explain_document_sm_ru.md b/docs/_posts/ahmedlone127/2023-05-27-explain_document_sm_ru.md index 687caeeaf5254e..17873b08924355 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-explain_document_sm_ru.md +++ b/docs/_posts/ahmedlone127/2023-05-27-explain_document_sm_ru.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_sm', lang = 'ru') -annotations = pipeline.fullAnnotate(""Здравствуйте из Джона Снежных Лабораторий! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_sm", lang = "ru") -val result = pipeline.fullAnnotate("Здравствуйте из Джона Снежных Лабораторий! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Здравствуйте из Джона Снежных Лабораторий! ""] -result_df = nlu.load('ru.explain').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-27-explain_document_sm_sv.md b/docs/_posts/ahmedlone127/2023-05-27-explain_document_sm_sv.md index a4f21b19d3ecc0..2d9e9637174903 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-explain_document_sm_sv.md +++ b/docs/_posts/ahmedlone127/2023-05-27-explain_document_sm_sv.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('explain_document_sm', lang = 'sv') -annotations = pipeline.fullAnnotate(""Hej från John Snow Labs! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("explain_document_sm", lang = "sv") -val result = pipeline.fullAnnotate("Hej från John Snow Labs! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hej från John Snow Labs! ""] -result_df = nlu.load('sv.explain').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-27-longformer_base_token_classifier_conll03_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-27-longformer_base_token_classifier_conll03_pipeline_en.md index de9bbef58143e4..ae8e23d378bff7 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-longformer_base_token_classifier_conll03_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-27-longformer_base_token_classifier_conll03_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [longformer_base_token_classifie ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("longformer_base_token_classifier_conll03_pipeline", lang = "en") - -pipeline.annotate("My name is John and I am working at John Snow Labs.") -``` -```scala - - -val pipeline = new PretrainedPipeline("longformer_base_token_classifier_conll03_pipeline", lang = "en") -pipeline.annotate("My name is John and I am working at John Snow Labs.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-27-longformer_large_token_classifier_conll03_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-27-longformer_large_token_classifier_conll03_pipeline_en.md index 15162e39f24930..a3b56517b099c3 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-longformer_large_token_classifier_conll03_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-27-longformer_large_token_classifier_conll03_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [longformer_large_token_classifi ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("longformer_large_token_classifier_conll03_pipeline", lang = "en") - -pipeline.annotate("My name is John and I am working at John Snow Labs.") -``` -```scala - - -val pipeline = new PretrainedPipeline("longformer_large_token_classifier_conll03_pipeline", lang = "en") -pipeline.annotate("My name is John and I am working at John Snow Labs.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-27-match_chunks_en.md b/docs/_posts/ahmedlone127/2023-05-27-match_chunks_en.md index 9c488db1353a41..9898486d6d0dca 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-match_chunks_en.md +++ b/docs/_posts/ahmedlone127/2023-05-27-match_chunks_en.md @@ -32,41 +32,7 @@ The pipeline uses regex `
?/*+` ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipeline - -pipeline_local = PretrainedPipeline('match_chunks') - -result = pipeline_local.annotate("David visited the restaurant yesterday with his family. He also visited and the day before, but at that time he was alone. David again visited today with his colleagues. He and his friends really liked the food and hoped to visit again tomorrow.") - -result['chunk'] -``` -```scala - -import com.johnsnowlabs.nlp.pretrained.PretrainedPipeline import com.johnsnowlabs.nlp.SparkNLP - -SparkNLP.version() -val testData = spark.createDataFrame(Seq( (1, "David visited the restaurant yesterday with his family. He also visited and the day before, but at that time he was alone. David again visited today with his colleagues. He and his friends really liked the food and hoped to visit again tomorrow."))).toDF("id", "text") - -val pipeline = PretrainedPipeline("match_chunks", lang="en") - -val annotation = pipeline.transform(testData) - -annotation.show() -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("en.match.chunks").predict("""David visited the restaurant yesterday with his family. He also visited and the day before, but at that time he was alone. David again visited today with his colleagues. He and his friends really liked the food and hoped to visit again tomorrow.""") -``` - -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-27-match_datetime_en.md b/docs/_posts/ahmedlone127/2023-05-27-match_datetime_en.md index 1cc522ddabbc6e..f849fe616613d8 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-match_datetime_en.md +++ b/docs/_posts/ahmedlone127/2023-05-27-match_datetime_en.md @@ -32,35 +32,7 @@ DateMatcher based on yyyy/MM/dd ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -pipeline_local = PretrainedPipeline('match_datetime') - -tres = pipeline_local.fullAnnotate(input_list)[0] -for dte in tres['date']: - sent = tres['sentence'][int(dte.metadata['sentence'])] - print (f'text/chunk {sent.result[dte.begin:dte.end+1]} | mapped_date: {dte.result}') -``` -```scala - -import com.johnsnowlabs.nlp.pretrained.PretrainedPipeline import com.johnsnowlabs.nlp.SparkNLP -SparkNLP.version() - -val testData = spark.createDataFrame(Seq( (1, "David visited the restaurant yesterday with his family. -He also visited and the day before, but at that time he was alone. -David again visited today with his colleagues. -He and his friends really liked the food and hoped to visit again tomorrow."))).toDF("id", "text") - -val pipeline = PretrainedPipeline("match_datetime", lang="en") - -val annotation = pipeline.transform(testData) - -annotation.show() -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-27-match_pattern_en.md b/docs/_posts/ahmedlone127/2023-05-27-match_pattern_en.md index c2af72d8b6e50e..b6e6389029aab9 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-match_pattern_en.md +++ b/docs/_posts/ahmedlone127/2023-05-27-match_pattern_en.md @@ -33,16 +33,7 @@ The match_pattern is a pretrained pipeline that we can use to process text with ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("match_pattern", "en", "clinical/models") - result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-05-27-movies_sentiment_analysis_en.md b/docs/_posts/ahmedlone127/2023-05-27-movies_sentiment_analysis_en.md index cfb98943b61a57..5a4407bc3963c1 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-movies_sentiment_analysis_en.md +++ b/docs/_posts/ahmedlone127/2023-05-27-movies_sentiment_analysis_en.md @@ -33,16 +33,7 @@ The movies_sentiment_analysis is a pretrained pipeline that we can use to proces ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("movies_sentiment_analysis", "en") -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-05-27-nerdl_fewnerd_100d_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-27-nerdl_fewnerd_100d_pipeline_en.md index 56e37a064f9508..70187c7950b4ec 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-nerdl_fewnerd_100d_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-27-nerdl_fewnerd_100d_pipeline_en.md @@ -34,21 +34,7 @@ This pretrained pipeline is built on Few-NERD model and it detects : ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -fewnerd_pipeline = PretrainedPipeline("nerdl_fewnerd_subentity_100d_pipeline", lang = "en") - -fewnerd_pipeline.annotate("""The Double Down is a sandwich offered by Kentucky Fried Chicken restaurants. He did not see active service again until 1882, when he took part in the Anglo-Egyptian War, and was present at the battle of Tell El Kebir (September 1882), for which he was mentioned in dispatches, received the Egypt Medal with clasp and the 3rd class of the Order of Medjidie, and was appointed a Companion of the Order of the Bath (CB).""") -``` -```scala - -val pipeline = new PretrainedPipeline("nerdl_fewnerd_subentity_100d_pipeline", lang = "en") -val result = pipeline.fullAnnotate("The Double Down is a sandwich offered by Kentucky Fried Chicken restaurants. He did not see active service again until 1882, when he took part in the Anglo-Egyptian War, and was present at the battle of Tell El Kebir (September 1882), for which he was mentioned in dispatches, received the Egypt Medal with clasp and the 3rd class of the Order of Medjidie, and was appointed a Companion of the Order of the Bath (CB).")(0) -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-27-nerdl_fewnerd_subentity_100d_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-27-nerdl_fewnerd_subentity_100d_pipeline_en.md index 71dbb3a9287c50..01bfc499f61406 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-nerdl_fewnerd_subentity_100d_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-27-nerdl_fewnerd_subentity_100d_pipeline_en.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on Few-NERD/inter public dataset and it extrac ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -fewnerd_pipeline = PretrainedPipeline("nerdl_fewnerd_subentity_100d_pipeline", lang = "en") - -fewnerd_pipeline.annotate("""12 Corazones ('12 Hearts') is Spanish-language dating game show produced in the United States for the television network Telemundo since January 2005, based on its namesake Argentine TV show format. The show is filmed in Los Angeles and revolves around the twelve Zodiac signs that identify each contestant. In 2008, Ho filmed a cameo in the Steven Spielberg feature film The Cloverfield Paradox, as a news pundit.""") -``` -```scala - -val pipeline = new PretrainedPipeline("nerdl_fewnerd_subentity_100d_pipeline", lang = "en") -val result = pipeline.fullAnnotate("12 Corazones ('12 Hearts') is Spanish-language dating game show produced in the United States for the television network Telemundo since January 2005, based on its namesake Argentine TV show format. The show is filmed in Los Angeles and revolves around the twelve Zodiac signs that identify each contestant. In 2008, Ho filmed a cameo in the Steven Spielberg feature film The Cloverfield Paradox, as a news pundit.")(0) -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-27-nerdl_restaurant_100d_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-27-nerdl_restaurant_100d_pipeline_en.md index 5c3d1ce0babc1b..5725d27c63b1c4 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-nerdl_restaurant_100d_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-27-nerdl_restaurant_100d_pipeline_en.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on the top of [nerdl_restaurant_100d](https:// ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -restaurant_pipeline = PretrainedPipeline("nerdl_restaurant_100d_pipeline", lang = "en") - -restaurant_pipeline.annotate("Hong Kong’s favourite pasta bar also offers one of the most reasonably priced lunch sets in town! With locations spread out all over the territory Sha Tin – Pici’s formidable lunch menu reads like a highlight reel of the restaurant. Choose from starters like the burrata and arugula salad or freshly tossed tuna tartare, and reliable handmade pasta dishes like pappardelle. Finally, round out your effortless Italian meal with a tidy one-pot tiramisu, of course, an espresso to power you through the rest of the day.") -``` -```scala - -val restaurant_pipeline = new PretrainedPipeline("nerdl_restaurant_100d_pipeline", lang = "en") -restaurant_pipeline.annotate("Hong Kong’s favourite pasta bar also offers one of the most reasonably priced lunch sets in town! With locations spread out all over the territory Sha Tin – Pici’s formidable lunch menu reads like a highlight reel of the restaurant. Choose from starters like the burrata and arugula salad or freshly tossed tuna tartare, and reliable handmade pasta dishes like pappardelle. Finally, round out your effortless Italian meal with a tidy one-pot tiramisu, of course, an espresso to power you through the rest of the day.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-27-onto_recognize_entities_bert_base_en.md b/docs/_posts/ahmedlone127/2023-05-27-onto_recognize_entities_bert_base_en.md index 832d938cfe2787..56156639399c3e 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-onto_recognize_entities_bert_base_en.md +++ b/docs/_posts/ahmedlone127/2023-05-27-onto_recognize_entities_bert_base_en.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('onto_recognize_entities_bert_base', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("onto_recognize_entities_bert_base", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.ner.onto.bert.base').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-27-onto_recognize_entities_bert_large_en.md b/docs/_posts/ahmedlone127/2023-05-27-onto_recognize_entities_bert_large_en.md index b8df4408ff18b1..20b20a43bffe5d 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-onto_recognize_entities_bert_large_en.md +++ b/docs/_posts/ahmedlone127/2023-05-27-onto_recognize_entities_bert_large_en.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('onto_recognize_entities_bert_large', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("onto_recognize_entities_bert_large", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.ner.onto.bert.large').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-27-onto_recognize_entities_bert_medium_en.md b/docs/_posts/ahmedlone127/2023-05-27-onto_recognize_entities_bert_medium_en.md index e5666e98d41e01..98b8bae55c3420 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-onto_recognize_entities_bert_medium_en.md +++ b/docs/_posts/ahmedlone127/2023-05-27-onto_recognize_entities_bert_medium_en.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('onto_recognize_entities_bert_medium', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("onto_recognize_entities_bert_medium", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.ner.onto.bert.medium').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-27-onto_recognize_entities_bert_mini_en.md b/docs/_posts/ahmedlone127/2023-05-27-onto_recognize_entities_bert_mini_en.md index 276f8362594d22..019576d2caf576 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-onto_recognize_entities_bert_mini_en.md +++ b/docs/_posts/ahmedlone127/2023-05-27-onto_recognize_entities_bert_mini_en.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('onto_recognize_entities_bert_mini', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("onto_recognize_entities_bert_mini", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.ner.onto.bert.mini').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-27-onto_recognize_entities_bert_small_en.md b/docs/_posts/ahmedlone127/2023-05-27-onto_recognize_entities_bert_small_en.md index 582c6fa2b9a704..5d2a23a2d340a2 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-onto_recognize_entities_bert_small_en.md +++ b/docs/_posts/ahmedlone127/2023-05-27-onto_recognize_entities_bert_small_en.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('onto_recognize_entities_bert_small', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("onto_recognize_entities_bert_small", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.ner.onto.bert.small').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-27-onto_recognize_entities_bert_tiny_en.md b/docs/_posts/ahmedlone127/2023-05-27-onto_recognize_entities_bert_tiny_en.md index c2fc9436970439..d37f39be47cade 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-onto_recognize_entities_bert_tiny_en.md +++ b/docs/_posts/ahmedlone127/2023-05-27-onto_recognize_entities_bert_tiny_en.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('onto_recognize_entities_bert_tiny', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("onto_recognize_entities_bert_tiny", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.ner.onto.bert.tiny').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-27-onto_recognize_entities_electra_base_en.md b/docs/_posts/ahmedlone127/2023-05-27-onto_recognize_entities_electra_base_en.md index 165075633a300c..6cc2fd6bf8aeb7 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-onto_recognize_entities_electra_base_en.md +++ b/docs/_posts/ahmedlone127/2023-05-27-onto_recognize_entities_electra_base_en.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('onto_recognize_entities_electra_base', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("onto_recognize_entities_electra_base", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.ner.onto.electra.base').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-27-onto_recognize_entities_electra_large_en.md b/docs/_posts/ahmedlone127/2023-05-27-onto_recognize_entities_electra_large_en.md index e87af232ca890a..6e28cc917aed8c 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-onto_recognize_entities_electra_large_en.md +++ b/docs/_posts/ahmedlone127/2023-05-27-onto_recognize_entities_electra_large_en.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline('onto_recognize_entities_electra_large', lang = 'en') -annotations = pipeline.fullAnnotate("Hello from John Snow Labs!")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("onto_recognize_entities_electra_large", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.ner.onto.large').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-27-onto_recognize_entities_electra_small_en.md b/docs/_posts/ahmedlone127/2023-05-27-onto_recognize_entities_electra_small_en.md index 2ce881cd270aa8..d30ab3a371aefb 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-onto_recognize_entities_electra_small_en.md +++ b/docs/_posts/ahmedlone127/2023-05-27-onto_recognize_entities_electra_small_en.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('onto_recognize_entities_electra_small', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("onto_recognize_entities_electra_small", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.ner.onto.electra.small').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-27-onto_recognize_entities_lg_en.md b/docs/_posts/ahmedlone127/2023-05-27-onto_recognize_entities_lg_en.md index bc9cd1df9dce95..4a12badcf469a0 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-onto_recognize_entities_lg_en.md +++ b/docs/_posts/ahmedlone127/2023-05-27-onto_recognize_entities_lg_en.md @@ -33,25 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("onto_recognize_entities_lg", "en") - -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -{:.nlu-block} -```python -import nlu -nlu.load("en.ner.onto.lg").predict("""I love johnsnowlabs! """) -``` - -
- {:.model-param}
diff --git a/docs/_posts/ahmedlone127/2023-05-27-onto_recognize_entities_sm_en.md b/docs/_posts/ahmedlone127/2023-05-27-onto_recognize_entities_sm_en.md index 0f90874f95c6e7..df748f94a3ff59 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-onto_recognize_entities_sm_en.md +++ b/docs/_posts/ahmedlone127/2023-05-27-onto_recognize_entities_sm_en.md @@ -33,35 +33,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('onto_recognize_entities_sm', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("onto_recognize_entities_sm", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.ner.onto.sm').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-27-pos_ud_bokmaal_nb.md b/docs/_posts/ahmedlone127/2023-05-27-pos_ud_bokmaal_nb.md index 9b67727f887766..50889e46707ea3 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-pos_ud_bokmaal_nb.md +++ b/docs/_posts/ahmedlone127/2023-05-27-pos_ud_bokmaal_nb.md @@ -34,39 +34,7 @@ This model was trained using the dataset available at https://universaldependenc ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -pos = PerceptronModel.pretrained("pos_ud_bokmaal", "nb") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("pos") - -nlp_pipeline = Pipeline(stages=[document_assembler, sentence_detector, tokenizer, pos]) -light_pipeline = LightPipeline(nlp_pipeline.fit(spark.createDataFrame([['']]).toDF("text"))) -results = light_pipeline.fullAnnotate("Annet enn å være kongen i nord, er John Snow en engelsk lege og en leder innen utvikling av anestesi og medisinsk hygiene.") -``` -```scala - -val pos = PerceptronModel.pretrained("pos_ud_bokmaal", "nb") - .setInputCols(Array("document", "token")) - .setOutputCol("pos") - -val pipeline = new Pipeline().setStages(Array(document_assembler, sentence_detector, tokenizer, pos)) -val data = Seq("Annet enn å være kongen i nord, er John Snow en engelsk lege og en leder innen utvikling av anestesi og medisinsk hygiene.").toDF("text") -val result = pipeline.fit(data).transform(data) -``` - -{:.nlu-block} -```python - -import nlu -text = ["""Annet enn å være kongen i nord, er John Snow en engelsk lege og en leder innen utvikling av anestesi og medisinsk hygiene."""] -pos_df = nlu.load('nb.pos.ud_bokmaal').predict(text) -pos_df -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-27-recognize_entities_bert_en.md b/docs/_posts/ahmedlone127/2023-05-27-recognize_entities_bert_en.md index cc4cbd0d2a02e5..2a4580e2629305 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-recognize_entities_bert_en.md +++ b/docs/_posts/ahmedlone127/2023-05-27-recognize_entities_bert_en.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('recognize_entities_bert', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("recognize_entities_bert", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.ner.bert').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-27-recognize_entities_dl_en.md b/docs/_posts/ahmedlone127/2023-05-27-recognize_entities_dl_en.md index 895bf290c52ccb..a2feddf4ea83fa 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-recognize_entities_dl_en.md +++ b/docs/_posts/ahmedlone127/2023-05-27-recognize_entities_dl_en.md @@ -34,35 +34,8 @@ It performs most of the common text processing tasks on your dataframe ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipelinein -pipeline = PretrainedPipeline('recognize_entities_dl', lang = 'en') -annotations = pipeline.fullAnnotate(""Hello from John Snow Labs ! "")[0] -annotations.keys() - -``` -```scala - -val pipeline = new PretrainedPipeline("recognize_entities_dl", lang = "en") -val result = pipeline.fullAnnotate("Hello from John Snow Labs ! ")(0) -``` - -{:.nlu-block} -```python - -import nlu -text = [""Hello from John Snow Labs ! ""] -result_df = nlu.load('en.ner').predict(text) -result_df - -``` -
-
{% include programmingLanguageSelectScalaPythonNLU.html %} ```python diff --git a/docs/_posts/ahmedlone127/2023-05-27-recognize_entities_dl_fa.md b/docs/_posts/ahmedlone127/2023-05-27-recognize_entities_dl_fa.md index e6fadd932f60c2..80da0508ce5b6a 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-recognize_entities_dl_fa.md +++ b/docs/_posts/ahmedlone127/2023-05-27-recognize_entities_dl_fa.md @@ -32,37 +32,7 @@ The explain_document_dl is a pretrained pipeline that we can use to process text ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -from sparknlp.pretrained import PretrainedPipeline - -pipeline = PretrainedPipeline('recognize_entities_dl', lang = 'fa') - -annotations = pipeline.fullAnnotate("""به گزارش خبرنگار ایرنا ، بر اساس تصمیم این مجمع ، محمد قمی نماینده مردم پاکدشت به عنوان رئیس و علی‌اکبر موسوی خوئینی و شمس‌الدین وهابی نمایندگان مردم تهران به عنوان نواب رئیس انتخاب شدند""")[0] - -annotations.keys() -``` -```scala - -val pipeline = new PretrainedPipeline("recognize_entities_dl", lang = "fa") -val result = pipeline.fullAnnotate("""به گزارش خبرنگار ایرنا ، بر اساس تصمیم این مجمع ، محمد قمی نماینده مردم پاکدشت به عنوان رئیس و علی‌اکبر موسوی خوئینی و شمس‌الدین وهابی نمایندگان مردم تهران به عنوان نواب رئیس انتخاب شدند""")(0) -``` - -{:.nlu-block} -```python - -import nlu - -text = ["""به گزارش خبرنگار ایرنا ، بر اساس تصمیم این مجمع ، محمد قمی نماینده مردم پاکدشت به عنوان رئیس و علی‌اکبر موسوی خوئینی و شمس‌الدین وهابی نمایندگان مردم تهران به عنوان نواب رئیس انتخاب شدند"""] - -result_df = nlu.load('fa.recognize_entities_dl').predict(text) - -result_df -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-27-roberta_base_token_classifier_ontonotes_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-27-roberta_base_token_classifier_ontonotes_pipeline_en.md index c6ca506e52958e..df6f0f9eff52ce 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-roberta_base_token_classifier_ontonotes_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-27-roberta_base_token_classifier_ontonotes_pipeline_en.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on the top of [roberta_base_token_classifier_o ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -pipeline = PretrainedPipeline("roberta_base_token_classifier_ontonotes_pipeline", lang = "en") - -pipeline.annotate("My name is John and I have been working at John Snow Labs since November 2020.") -``` -```scala - -val pipeline = new PretrainedPipeline("roberta_base_token_classifier_ontonotes_pipeline", lang = "en") -pipeline.annotate("My name is John and I have been working at John Snow Labs since November 2020.")) -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-27-roberta_large_token_classifier_conll03_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-27-roberta_large_token_classifier_conll03_pipeline_en.md index 72dcd995dc0142..d75d117fa4d472 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-roberta_large_token_classifier_conll03_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-27-roberta_large_token_classifier_conll03_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [roberta_large_token_classifier_ ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("roberta_large_token_classifier_conll03_pipeline", lang = "en") - -pipeline.annotate("My name is John and I work at John Snow Labs.") -``` -```scala - - -val pipeline = new PretrainedPipeline("roberta_large_token_classifier_conll03_pipeline", lang = "en") -pipeline.annotate("My name is John and I work at John Snow Labs.")) -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-27-roberta_token_classifier_bne_capitel_ner_pipeline_es.md b/docs/_posts/ahmedlone127/2023-05-27-roberta_token_classifier_bne_capitel_ner_pipeline_es.md index 81a467a8d3d26a..de6d6a2276109a 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-roberta_token_classifier_bne_capitel_ner_pipeline_es.md +++ b/docs/_posts/ahmedlone127/2023-05-27-roberta_token_classifier_bne_capitel_ner_pipeline_es.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on the top of [roberta_token_classifier_bne_ca ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -pipeline = PretrainedPipeline("roberta_token_classifier_bne_capitel_ner_pipeline", lang = "es") - -pipeline.annotate("Me llamo Antonio y trabajo en la fábrica de Mercedes-Benz en Madrid.") -``` -```scala - -val pipeline = new PretrainedPipeline("roberta_token_classifier_bne_capitel_ner_pipeline", lang = "es") -pipeline.annotate("Me llamo Antonio y trabajo en la fábrica de Mercedes-Benz en Madrid.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-27-roberta_token_classifier_icelandic_ner_pipeline_is.md b/docs/_posts/ahmedlone127/2023-05-27-roberta_token_classifier_icelandic_ner_pipeline_is.md index 44c64073d378c7..c5dced1a6399d4 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-roberta_token_classifier_icelandic_ner_pipeline_is.md +++ b/docs/_posts/ahmedlone127/2023-05-27-roberta_token_classifier_icelandic_ner_pipeline_is.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on the top of [roberta_token_classifier_icelan ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -pipeline = PretrainedPipeline("roberta_token_classifier_icelandic_ner_pipeline", lang = "is") - -pipeline.annotate("Ég heiti Peter Fergusson. Ég hef búið í New York síðan í október 2011 og unnið hjá Tesla Motor og þénað 100K $ á ári.") -``` -```scala - -val pipeline = new PretrainedPipeline("roberta_token_classifier_icelandic_ner_pipeline", lang = "is") -pipeline.annotate("Ég heiti Peter Fergusson. Ég hef búið í New York síðan í október 2011 og unnið hjá Tesla Motor og þénað 100K $ á ári.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-27-roberta_token_classifier_timex_semeval_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-27-roberta_token_classifier_timex_semeval_pipeline_en.md index 28e0ea1c3e114f..97a09915f4829c 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-roberta_token_classifier_timex_semeval_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-27-roberta_token_classifier_timex_semeval_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [roberta_token_classifier_timex_ ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -timex_pipeline = PretrainedPipeline("roberta_token_classifier_timex_semeval_pipeline", lang = "en") - -timex_pipeline.annotate("Model training was started at 22:12C and it took 3 days from Tuesday to Friday.") -``` -```scala - - -val timex_pipeline = new PretrainedPipeline("roberta_token_classifier_timex_semeval_pipeline", lang = "en") -timex_pipeline.annotate("Model training was started at 22:12C and it took 3 days from Tuesday to Friday.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-27-spellcheck_dl_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-27-spellcheck_dl_pipeline_en.md index af1fc87cbdba9b..e7617f4c23534e 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-spellcheck_dl_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-27-spellcheck_dl_pipeline_en.md @@ -32,27 +32,7 @@ This pretrained spellchecker pipeline is built on the top of [spellcheck_dl](htt ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("spellcheck_dl_pipeline", lang = "en") - -text = ["During the summer we have the best ueather.", "I have a black ueather jacket, so nice."] - -pipeline.annotate(text) -``` -```scala - - -val pipeline = new PretrainedPipeline("spellcheck_dl_pipeline", lang = "en") -val example = Array("During the summer we have the best ueather.", "I have a black ueather jacket, so nice.") - -pipeline.annotate(example) -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-27-text_cleaning_en.md b/docs/_posts/ahmedlone127/2023-05-27-text_cleaning_en.md index 07657f6ad771cc..42e23d2663dce6 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-text_cleaning_en.md +++ b/docs/_posts/ahmedlone127/2023-05-27-text_cleaning_en.md @@ -33,16 +33,7 @@ The text_cleaning is a pretrained pipeline that we can use to process text with ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -from sparknlp.pretrained import PretrainedPipeline -pipeline = PretrainedPipeline("text_cleaning", "en") -result = pipeline.annotate("""I love johnsnowlabs! """) -``` - -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-05-27-xlm_roberta_base_token_classifier_conll03_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-27-xlm_roberta_base_token_classifier_conll03_pipeline_en.md index 6ce93076e23c62..d923913d37f70f 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-xlm_roberta_base_token_classifier_conll03_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-27-xlm_roberta_base_token_classifier_conll03_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [xlm_roberta_base_token_classifi ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("xlm_roberta_base_token_classifier_conll03_pipeline", lang = "en") - -pipeline.annotate("My name is John and I work at John Snow Labs.") -``` -```scala - - -val pipeline = new PretrainedPipeline("xlm_roberta_base_token_classifier_conll03_pipeline", lang = "en") -pipeline.annotate("My name is John and I work at John Snow Labs.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-27-xlm_roberta_base_token_classifier_ontonotes_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-27-xlm_roberta_base_token_classifier_ontonotes_pipeline_en.md index 8a480372275471..229713b9a2894f 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-xlm_roberta_base_token_classifier_ontonotes_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-27-xlm_roberta_base_token_classifier_ontonotes_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [xlm_roberta_base_token_classifi ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("xlm_roberta_base_token_classifier_ontonotes_pipeline", lang = "en") - -pipeline.annotate("My name is John and I have been working at John Snow Labs since November 2020.") -``` -```scala - - -val pipeline = new PretrainedPipeline("xlm_roberta_base_token_classifier_ontonotes_pipeline", lang = "en") -pipeline.annotate("My name is John and I have been working at John Snow Labs since November 2020.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-27-xlm_roberta_large_token_classifier_conll03_pipeline_de.md b/docs/_posts/ahmedlone127/2023-05-27-xlm_roberta_large_token_classifier_conll03_pipeline_de.md index bf1d04ed8366d6..595292996a288b 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-xlm_roberta_large_token_classifier_conll03_pipeline_de.md +++ b/docs/_posts/ahmedlone127/2023-05-27-xlm_roberta_large_token_classifier_conll03_pipeline_de.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on the top of [xlm_roberta_large_token_classif ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -pipeline = PretrainedPipeline("xlm_roberta_large_token_classifier_conll03_pipeline", lang = "de") - -pipeline.annotate("Ibser begann seine Karriere beim ASK Ebreichsdorf. 2004 wechselte er zu Admira Wacker Mödling, wo er auch in der Akademie spielte.") -``` -```scala - -val pipeline = new PretrainedPipeline("xlm_roberta_large_token_classifier_conll03_pipeline", lang = "de") -pipeline.annotate("Ibser begann seine Karriere beim ASK Ebreichsdorf. 2004 wechselte er zu Admira Wacker Mödling, wo er auch in der Akademie spielte.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-27-xlm_roberta_large_token_classifier_hrl_pipeline_xx.md b/docs/_posts/ahmedlone127/2023-05-27-xlm_roberta_large_token_classifier_hrl_pipeline_xx.md index 78657d8c33e3ed..3189a75e5c3ce6 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-xlm_roberta_large_token_classifier_hrl_pipeline_xx.md +++ b/docs/_posts/ahmedlone127/2023-05-27-xlm_roberta_large_token_classifier_hrl_pipeline_xx.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on the top of [xlm_roberta_large_token_classif ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -pipeline = PretrainedPipeline("xlm_roberta_large_token_classifier_hrl_pipeline", lang = "xx") - -pipeline.annotate("يمكنكم مشاهدة أمير منطقة الرياض الأمير فيصل بن بندر بن عبد العزيز في كل مناسبة وافتتاح تتعلق بمشاريع التعليم والصحة وخدمة الطرق والمشاريع الثقافية في منطقة الرياض.") -``` -```scala - -val pipeline = new PretrainedPipeline("xlm_roberta_large_token_classifier_hrl_pipeline", lang = "xx") -pipeline.annotate("يمكنكم مشاهدة أمير منطقة الرياض الأمير فيصل بن بندر بن عبد العزيز في كل مناسبة وافتتاح تتعلق بمشاريع التعليم والصحة وخدمة الطرق والمشاريع الثقافية في منطقة الرياض.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-27-xlm_roberta_large_token_classifier_masakhaner_pipeline_xx.md b/docs/_posts/ahmedlone127/2023-05-27-xlm_roberta_large_token_classifier_masakhaner_pipeline_xx.md index b585db60590ce2..ed173c9ffc360a 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-xlm_roberta_large_token_classifier_masakhaner_pipeline_xx.md +++ b/docs/_posts/ahmedlone127/2023-05-27-xlm_roberta_large_token_classifier_masakhaner_pipeline_xx.md @@ -32,21 +32,7 @@ This pretrained pipeline is built on [xlm_roberta_large_token_classifier_masakha ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -masakhaner_pipeline = PretrainedPipeline("xlm_roberta_large_token_classifier_masakhaner_pipeline", lang = "xx") - -masakhaner_pipeline.annotate("አህመድ ቫንዳ ከ3-10-2000 ጀምሮ በአዲስ አበባ ኖሯል።") -``` -```scala - -val masakhaner_pipeline = new PretrainedPipeline("xlm_roberta_large_token_classifier_masakhaner_pipeline", lang = "xx") -val masakhaner_pipeline.annotate("አህመድ ቫንዳ ከ3-10-2000 ጀምሮ በአዲስ አበባ ኖሯል።") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-27-xlnet_base_token_classifier_conll03_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-27-xlnet_base_token_classifier_conll03_pipeline_en.md index 09b33d78c6bd29..1c3238ebde731b 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-xlnet_base_token_classifier_conll03_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-27-xlnet_base_token_classifier_conll03_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [xlnet_base_token_classifier_con ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("xlnet_base_token_classifier_conll03_pipeline", lang = "en") - -pipeline.annotate("My name is John and I work at John Snow Labs.") -``` -```scala - - -val pipeline = new PretrainedPipeline("xlnet_base_token_classifier_conll03_pipeline", lang = "en") -pipeline.annotate("My name is John and I work at John Snow Labs.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-05-27-xlnet_large_token_classifier_conll03_pipeline_en.md b/docs/_posts/ahmedlone127/2023-05-27-xlnet_large_token_classifier_conll03_pipeline_en.md index 6db5dbe6f40b79..b20dd92e9e412b 100644 --- a/docs/_posts/ahmedlone127/2023-05-27-xlnet_large_token_classifier_conll03_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-05-27-xlnet_large_token_classifier_conll03_pipeline_en.md @@ -32,23 +32,7 @@ This pretrained pipeline is built on the top of [xlnet_large_token_classifier_co ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - - -pipeline = PretrainedPipeline("xlnet_large_token_classifier_conll03_pipeline", lang = "en") - -pipeline.annotate("My name is John and I work at John Snow Labs.") -``` -```scala - - -val pipeline = new PretrainedPipeline("xlnet_large_token_classifier_conll03_pipeline", lang = "en") -pipeline.annotate("My name is John and I work at John Snow Labs.") -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_base_uncased_contracts_en.md b/docs/_posts/ahmedlone127/2023-06-21-bert_base_uncased_contracts_en.md index 2b1a76c0a31802..6dddfbb3141397 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_base_uncased_contracts_en.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_base_uncased_contracts_en.md @@ -33,55 +33,7 @@ Pretrained Word Embeddings model, trained on legal contracts, adapted from Huggi ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_base_uncased_contracts","en") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP."]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCol("text") - .setOutputCol("document") - -val tokenizer = new Tokenizer() - .setInputCols(Array("document")) - .setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_base_uncased_contracts","en") - .setInputCols(Array("document", "token")) - .setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP.").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("en.embed.bert.contracts.uncased_base").predict("""I love Spark NLP.""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_ARBERT_ar.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_ARBERT_ar.md index a8bde5a9373131..f372d9feb1aa38 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_ARBERT_ar.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_ARBERT_ar.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_ARBERT","ar") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["أنا أحب شرارة NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_ARBERT","ar") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("أنا أحب شرارة NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("ar.embed.arbert").predict("""أنا أحب شرارة NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_AraBertMo_base_V1_ar.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_AraBertMo_base_V1_ar.md index 507d80ddf48d81..b049b73e401406 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_AraBertMo_base_V1_ar.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_AraBertMo_base_V1_ar.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_AraBertMo_base_V1","ar") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["أنا أحب شرارة NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_AraBertMo_base_V1","ar") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("أنا أحب شرارة NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("ar.embed.AraBertMo_base_V1").predict("""أنا أحب شرارة NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_Ara_DialectBERT_ar.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_Ara_DialectBERT_ar.md index aa25c8bbbd15f0..ece2d7def2015a 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_Ara_DialectBERT_ar.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_Ara_DialectBERT_ar.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_Ara_DialectBERT","ar") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["أنا أحب شرارة NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_Ara_DialectBERT","ar") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("أنا أحب شرارة NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("ar.embed.Ara_DialectBERT").predict("""أنا أحب شرارة NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_COVID_SciBERT_en.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_COVID_SciBERT_en.md index 1156a182032942..b181f33ad505a1 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_COVID_SciBERT_en.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_COVID_SciBERT_en.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_COVID_SciBERT","en") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_COVID_SciBERT","en") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("en.embed.COVID_SciBERT").predict("""I love Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_DarijaBERT_ar.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_DarijaBERT_ar.md index 019db2765f56c4..a610ecf9d98548 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_DarijaBERT_ar.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_DarijaBERT_ar.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_DarijaBERT","ar") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["أنا أحب شرارة NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_DarijaBERT","ar") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("أنا أحب شرارة NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("ar.embed.DarijaBERT").predict("""أنا أحب شرارة NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_FinancialBERT_en.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_FinancialBERT_en.md index f209c346ba5ecc..5aac6f8deafa13 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_FinancialBERT_en.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_FinancialBERT_en.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_FinancialBERT","en") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_FinancialBERT","en") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("en.embed.FinancialBERT").predict("""I love Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_German_MedBERT_de.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_German_MedBERT_de.md index 6f9f54bac44943..f824ce2b421fc4 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_German_MedBERT_de.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_German_MedBERT_de.md @@ -33,55 +33,7 @@ Pretrained German Medical Bert Embeddings model, uploaded to Hugging Face, adapt ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_German_MedBERT","de") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Ich liebe Funken NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_German_MedBERT","de") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Ich liebe Funken NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("de.embed.medbert").predict("""Ich liebe Funken NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_MARBERT_ar.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_MARBERT_ar.md index df8e6020ce97b2..1a8337eb2f6277 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_MARBERT_ar.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_MARBERT_ar.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_MARBERT","ar") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["أنا أحب شرارة NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_MARBERT","ar") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("أنا أحب شرارة NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("ar.embed.MARBERT").predict("""أنا أحب شرارة NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_MARBERTv2_ar.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_MARBERTv2_ar.md index 26d222b5c236ee..1f7c518cfda6a2 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_MARBERTv2_ar.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_MARBERTv2_ar.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_MARBERTv2","ar") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["أنا أحب شرارة NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_MARBERTv2","ar") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("أنا أحب شرارة NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("ar.embed.MARBERTv2").predict("""أنا أحب شرارة NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_agriculture_bert_uncased_en.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_agriculture_bert_uncased_en.md index 0f8dd6b3d732db..80f22e0b87bd3f 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_agriculture_bert_uncased_en.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_agriculture_bert_uncased_en.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_agriculture_bert_uncased","en") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_agriculture_bert_uncased","en") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("en.embed.agriculture_bert_uncased").predict("""I love Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_alberti_bert_base_multilingual_cased_es.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_alberti_bert_base_multilingual_cased_es.md index 334f6947d0078e..652b29ca0f02d0 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_alberti_bert_base_multilingual_cased_es.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_alberti_bert_base_multilingual_cased_es.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_alberti_bert_base_multilingual_cased","es") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Me encanta chispa nlp"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_alberti_bert_base_multilingual_cased","es") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Me encanta chispa nlp").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("es.embed.alberti_bert_base_multilingual_cased").predict("""Me encanta chispa nlp""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_arabert_c19_ar.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_arabert_c19_ar.md index d94b26d12cfe68..b3ec63b05fd172 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_arabert_c19_ar.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_arabert_c19_ar.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_arabert_c19","ar") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["أنا أحب شرارة NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_arabert_c19","ar") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("أنا أحب شرارة NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("ar.embed.arabert_c19").predict("""أنا أحب شرارة NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bangla_bert_base_bn.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bangla_bert_base_bn.md index 05609a11fcf313..ffad26793c5b2a 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bangla_bert_base_bn.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bangla_bert_base_bn.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_bangla_bert_base","bn") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["আমি স্পার্ক এনএলপি ভালোবাসি"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_bangla_bert_base","bn") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("আমি স্পার্ক এনএলপি ভালোবাসি").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("bn.embed.bangala_bert").predict("""আমি স্পার্ক এনএলপি ভালোবাসি""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bangla_bert_bn.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bangla_bert_bn.md index 27aac09a7bc754..3895c761091b82 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bangla_bert_bn.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bangla_bert_bn.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_bangla_bert","bn") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["আমি স্পার্ক এনএলপি ভালোবাসি"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_bangla_bert","bn") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("আমি স্পার্ক এনএলপি ভালোবাসি").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("bn.embed.bangla_bert").predict("""আমি স্পার্ক এনএলপি ভালোবাসি""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_base_uncased_issues_128_en.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_base_uncased_issues_128_en.md index 5679c83687a692..355a23fe4c437a 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_base_uncased_issues_128_en.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_base_uncased_issues_128_en.md @@ -34,50 +34,7 @@ Pretrained BertEmbeddings model, adapted from Hugging Face and curated to provid ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} - -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") -embeddings = BertEmbeddings.pretrained("bert_embeddings_base_uncased_issues_128","ko") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") \ - .setCaseSensitive(True) - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCol("text") - .setOutputCol("document") - -val tokenizer = new Tokenizer() - .setInputCols("document") - .setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_base_uncased_issues_128","ko") - .setInputCols(Array("document", "token")) - .setOutputCol("embeddings") - .setCaseSensitive(True) - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP").toDS.toDF("text") - -val result = pipeline.fit(data).transform(data) -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_5lang_cased_es.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_5lang_cased_es.md index 99f607f5c1530b..8ec6c83c0a2ee7 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_5lang_cased_es.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_5lang_cased_es.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_5lang_cased","es") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Me encanta chispa nlp"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_5lang_cased","es") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Me encanta chispa nlp").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("es.embed.bert_base_5lang_cased").predict("""Me encanta chispa nlp""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_arabert_ar.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_arabert_ar.md index e8151fef004624..1f937e2eb43d37 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_arabert_ar.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_arabert_ar.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_arabert","ar") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["أنا أحب شرارة NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_arabert","ar") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("أنا أحب شرارة NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("ar.embed.bert_base_arabert").predict("""أنا أحب شرارة NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_arabertv01_ar.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_arabertv01_ar.md index b0ffc23c7e5de1..654bc887a67cc8 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_arabertv01_ar.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_arabertv01_ar.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_arabertv01","ar") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["أنا أحب شرارة NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_arabertv01","ar") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("أنا أحب شرارة NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("ar.embed.bert_base_arabertv01").predict("""أنا أحب شرارة NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_arabertv02_ar.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_arabertv02_ar.md index 00a46a50c9de69..493095aa7f482e 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_arabertv02_ar.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_arabertv02_ar.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_arabertv02","ar") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["أنا أحب شرارة NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_arabertv02","ar") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("أنا أحب شرارة NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("ar.embed.bert_base_arabertv02").predict("""أنا أحب شرارة NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_arabertv02_twitter_ar.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_arabertv02_twitter_ar.md index 527a150609fdb3..6e97176e642894 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_arabertv02_twitter_ar.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_arabertv02_twitter_ar.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_arabertv02_twitter","ar") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["أنا أحب شرارة NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_arabertv02_twitter","ar") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("أنا أحب شرارة NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("ar.embed.bert_base_arabertv02_twitter").predict("""أنا أحب شرارة NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_arabertv2_ar.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_arabertv2_ar.md index 28aa7881be3bad..bc52734b92b843 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_arabertv2_ar.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_arabertv2_ar.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_arabertv2","ar") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["أنا أحب شرارة NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_arabertv2","ar") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("أنا أحب شرارة NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("ar.embed.bert_base_arabertv2").predict("""أنا أحب شرارة NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_arabic_ar.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_arabic_ar.md index ec1f8a7ed29f13..4308e70edfc031 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_arabic_ar.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_arabic_ar.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_arabic","ar") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["أنا أحب شرارة NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_arabic","ar") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("أنا أحب شرارة NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("ar.embed.bert_base_arabic").predict("""أنا أحب شرارة NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_arabic_camelbert_mix_ar.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_arabic_camelbert_mix_ar.md index 2db1ef256735f2..af99c4af0887d3 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_arabic_camelbert_mix_ar.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_arabic_camelbert_mix_ar.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_arabic_camelbert_mix","ar") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["أنا أحب شرارة NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_arabic_camelbert_mix","ar") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("أنا أحب شرارة NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("ar.embed.bert_base_arabic_camelbert_mix").predict("""أنا أحب شرارة NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_arabic_camelbert_msa_ar.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_arabic_camelbert_msa_ar.md index 97bcdf7edd7fe2..67201d1492542b 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_arabic_camelbert_msa_ar.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_arabic_camelbert_msa_ar.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_arabic_camelbert_msa","ar") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["أنا أحب شرارة NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_arabic_camelbert_msa","ar") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("أنا أحب شرارة NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("ar.embed.bert_base_arabic_camelbert_msa").predict("""أنا أحب شرارة NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_arabic_camelbert_msa_eighth_ar.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_arabic_camelbert_msa_eighth_ar.md index 6d2176403c972d..38f77b087540ed 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_arabic_camelbert_msa_eighth_ar.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_arabic_camelbert_msa_eighth_ar.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_arabic_camelbert_msa_eighth","ar") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["أنا أحب شرارة NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_arabic_camelbert_msa_eighth","ar") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("أنا أحب شرارة NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("ar.embed.bert_base_arabic_camelbert_msa_eighth").predict("""أنا أحب شرارة NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_arabic_camelbert_msa_half_ar.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_arabic_camelbert_msa_half_ar.md index 1ef43767d97397..004a7380dca028 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_arabic_camelbert_msa_half_ar.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_arabic_camelbert_msa_half_ar.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_arabic_camelbert_msa_half","ar") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["أنا أحب شرارة NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_arabic_camelbert_msa_half","ar") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("أنا أحب شرارة NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("ar.embed.bert_base_arabic_camelbert_msa_half").predict("""أنا أحب شرارة NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_arabic_camelbert_msa_quarter_ar.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_arabic_camelbert_msa_quarter_ar.md index 622c54ebe635f9..537baf4955d84a 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_arabic_camelbert_msa_quarter_ar.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_arabic_camelbert_msa_quarter_ar.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_arabic_camelbert_msa_quarter","ar") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["أنا أحب شرارة NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_arabic_camelbert_msa_quarter","ar") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("أنا أحب شرارة NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("ar.embed.bert_base_arabic_camelbert_msa_quarter").predict("""أنا أحب شرارة NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_arabic_camelbert_msa_sixteenth_ar.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_arabic_camelbert_msa_sixteenth_ar.md index efc6980941ceab..4af25c9faf9be9 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_arabic_camelbert_msa_sixteenth_ar.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_arabic_camelbert_msa_sixteenth_ar.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_arabic_camelbert_msa_sixteenth","ar") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["أنا أحب شرارة NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_arabic_camelbert_msa_sixteenth","ar") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("أنا أحب شرارة NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("ar.embed.bert_base_arabic_camelbert_msa_sixteenth").predict("""أنا أحب شرارة NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_cased_pt_lenerbr_pt.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_cased_pt_lenerbr_pt.md index ae5920ac1cb795..24d80be3bc6aa5 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_cased_pt_lenerbr_pt.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_cased_pt_lenerbr_pt.md @@ -33,55 +33,7 @@ Pretrained Legal Bert Embeddings model, uploaded to Hugging Face, adapted and im ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_cased_pt_lenerbr","pt") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Eu amo Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_cased_pt_lenerbr","pt") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Eu amo Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("pt.embed.bert_base_cased_pt_lenerbr").predict("""Eu amo Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_german_cased_oldvocab_de.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_german_cased_oldvocab_de.md index 1f985340872ac9..b69acae6255291 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_german_cased_oldvocab_de.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_german_cased_oldvocab_de.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_german_cased_oldvocab","de") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Ich liebe Funken NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_german_cased_oldvocab","de") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Ich liebe Funken NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("de.embed.bert_base_german_cased_oldvocab").predict("""Ich liebe Funken NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_german_uncased_de.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_german_uncased_de.md index 91fa66ad63e5d8..9fb045ca315d82 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_german_uncased_de.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_german_uncased_de.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_german_uncased","de") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Ich liebe Funken NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_german_uncased","de") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Ich liebe Funken NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("de.embed.bert_base_german_uncased").predict("""Ich liebe Funken NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_gl_cased_pt.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_gl_cased_pt.md index 5b67a75c4e936e..90ce440ba94cdf 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_gl_cased_pt.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_gl_cased_pt.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_gl_cased","pt") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Eu amo Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_gl_cased","pt") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Eu amo Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("pt.embed.bert_base_gl_cased").predict("""Eu amo Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_historical_german_rw_cased_de.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_historical_german_rw_cased_de.md index 4626d471479c49..9d93ab59c6632f 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_historical_german_rw_cased_de.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_historical_german_rw_cased_de.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_historical_german_rw_cased","de") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Ich liebe Funken NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_historical_german_rw_cased","de") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Ich liebe Funken NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("de.embed.bert_base_historical_german_rw_cased").predict("""Ich liebe Funken NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_italian_xxl_cased_it.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_italian_xxl_cased_it.md index ab7513a407cb6c..d0dde731c9eb43 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_italian_xxl_cased_it.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_italian_xxl_cased_it.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_italian_xxl_cased","it") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Adoro Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_italian_xxl_cased","it") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Adoro Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("it.embed.bert_base_italian_xxl_cased").predict("""Adoro Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_italian_xxl_uncased_it.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_italian_xxl_uncased_it.md index 8f1b62389ff59c..cd2ad21dae1dd6 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_italian_xxl_uncased_it.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_italian_xxl_uncased_it.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_italian_xxl_uncased","it") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Adoro Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_italian_xxl_uncased","it") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Adoro Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("it.embed.bert_base_italian_xxl_uncased").predict("""Adoro Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_ko.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_ko.md index 586c43ffa392b7..91703bbd259bd3 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_ko.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_ko.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base","ko") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["나는 Spark NLP를 좋아합니다"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base","ko") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("나는 Spark NLP를 좋아합니다").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("ko.embed.bert").predict("""나는 Spark NLP를 좋아합니다""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_portuguese_cased_finetuned_peticoes_pt.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_portuguese_cased_finetuned_peticoes_pt.md index 1977eade89c812..1ab745538baf8b 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_portuguese_cased_finetuned_peticoes_pt.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_portuguese_cased_finetuned_peticoes_pt.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_portuguese_cased_finetuned_peticoes","pt") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Eu amo Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_portuguese_cased_finetuned_peticoes","pt") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Eu amo Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("pt.embed.bert_base_portuguese_cased_finetuned_peticoes").predict("""Eu amo Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_portuguese_cased_finetuned_tcu_acordaos_pt.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_portuguese_cased_finetuned_tcu_acordaos_pt.md index 51c244361ef7c6..de3e15df5e39b0 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_portuguese_cased_finetuned_tcu_acordaos_pt.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_portuguese_cased_finetuned_tcu_acordaos_pt.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_portuguese_cased_finetuned_tcu_acordaos","pt") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Eu amo Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_portuguese_cased_finetuned_tcu_acordaos","pt") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Eu amo Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("pt.embed.bert_base_portuguese_cased_finetuned_tcu_acordaos").predict("""Eu amo Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_portuguese_cased_pt.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_portuguese_cased_pt.md index 7e8a494e05a9ea..c4c1a343a3ff98 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_portuguese_cased_pt.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_portuguese_cased_pt.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_portuguese_cased","pt") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Eu amo Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_portuguese_cased","pt") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Eu amo Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("pt.embed.bert_base_portuguese_cased").predict("""Eu amo Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_qarib60_1790k_ar.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_qarib60_1790k_ar.md index 82419381d32b36..3868d245812acc 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_qarib60_1790k_ar.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_qarib60_1790k_ar.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_qarib60_1790k","ar") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["أنا أحب شرارة NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_qarib60_1790k","ar") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("أنا أحب شرارة NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("ar.embed.bert_base_qarib60_1790k").predict("""أنا أحب شرارة NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_qarib60_860k_ar.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_qarib60_860k_ar.md index b4cba476c77437..3321ae06713eda 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_qarib60_860k_ar.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_qarib60_860k_ar.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_qarib60_860k","ar") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["أنا أحب شرارة NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_qarib60_860k","ar") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("أنا أحب شرارة NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("ar.embed.bert_base_qarib60_860k").predict("""أنا أحب شرارة NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_qarib_ar.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_qarib_ar.md index 1af0625cf15067..2323faa478498d 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_qarib_ar.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_qarib_ar.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_qarib","ar") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["أنا أحب شرارة NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_qarib","ar") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("أنا أحب شرارة NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("ar.embed.bert_base_qarib").predict("""أنا أحب شرارة NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_uncased_dstc9_en.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_uncased_dstc9_en.md index 082e97e5cb0c38..80c796bbcc74b2 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_uncased_dstc9_en.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_uncased_dstc9_en.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_uncased_dstc9","en") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_uncased_dstc9","en") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("en.embed.bert_base_uncased_dstc9").predict("""I love Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_uncased_mnli_sparse_70_unstructured_no_classifier_en.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_uncased_mnli_sparse_70_unstructured_no_classifier_en.md index ec8779ce8600e9..8243b6e8636b7c 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_uncased_mnli_sparse_70_unstructured_no_classifier_en.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_uncased_mnli_sparse_70_unstructured_no_classifier_en.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_uncased_mnli_sparse_70_unstructured_no_classifier","en") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_uncased_mnli_sparse_70_unstructured_no_classifier","en") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("en.embed.bert_base_uncased_mnli_sparse_70_unstructured_no_classifier").predict("""I love Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_uncased_sparse_70_unstructured_en.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_uncased_sparse_70_unstructured_en.md index 0d1e90b869920a..e6ba3cab7a6701 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_uncased_sparse_70_unstructured_en.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_base_uncased_sparse_70_unstructured_en.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_uncased_sparse_70_unstructured","en") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_base_uncased_sparse_70_unstructured","en") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("en.embed.bert_base_uncased_sparse_70_unstructured").predict("""I love Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_kor_base_ko.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_kor_base_ko.md index cdf41dcad66847..6a5e4f91234bf6 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_kor_base_ko.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_kor_base_ko.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_kor_base","ko") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["나는 Spark NLP를 좋아합니다"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_kor_base","ko") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("나는 Spark NLP를 좋아합니다").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("ko.embed.bert_kor_base").predict("""나는 Spark NLP를 좋아합니다""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_medium_arabic_ar.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_medium_arabic_ar.md index e4ab0e46ec7075..1fe8347a4dec19 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_medium_arabic_ar.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_medium_arabic_ar.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_medium_arabic","ar") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["أنا أحب شرارة NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_medium_arabic","ar") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("أنا أحب شرارة NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("ar.embed.bert_medium_arabic").predict("""أنا أحب شرارة NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_mini_arabic_ar.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_mini_arabic_ar.md index d4f0e3cce03c7e..d93f86e89cb899 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_mini_arabic_ar.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_mini_arabic_ar.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_mini_arabic","ar") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["أنا أحب شرارة NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_mini_arabic","ar") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("أنا أحب شرارة NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("ar.embed.bert_mini_arabic").predict("""أنا أحب شرارة NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_political_election2020_twitter_mlm_en.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_political_election2020_twitter_mlm_en.md index ce6a900f6c10fe..8c8930fb556e20 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_political_election2020_twitter_mlm_en.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bert_political_election2020_twitter_mlm_en.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_political_election2020_twitter_mlm","en") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_bert_political_election2020_twitter_mlm","en") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("en.embed.bert_political_election2020_twitter_mlm").predict("""I love Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_beto_gn_base_cased_es.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_beto_gn_base_cased_es.md index a0e6b0632c7e43..c387471f2549a3 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_beto_gn_base_cased_es.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_beto_gn_base_cased_es.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_beto_gn_base_cased","es") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Me encanta chispa nlp"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_beto_gn_base_cased","es") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Me encanta chispa nlp").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("es.embed.beto_gn_base_cased").predict("""Me encanta chispa nlp""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bioclinicalbert_finetuned_covid_papers_en.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bioclinicalbert_finetuned_covid_papers_en.md index 259fb891ba3560..2f129951af8204 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bioclinicalbert_finetuned_covid_papers_en.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_bioclinicalbert_finetuned_covid_papers_en.md @@ -33,55 +33,7 @@ Pretrained BERT Embeddings model, adapted from Hugging Face and curated to provi ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_bioclinicalbert_finetuned_covid_papers","en") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["PUT YOUR STRING HERE"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCols(Array("text")) - .setOutputCols(Array("document")) - -val tokenizer = new Tokenizer() - .setInputCols("document") - .setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_bioclinicalbert_finetuned_covid_papers","en") - .setInputCols(Array("document", "token")) - .setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("PUT YOUR STRING HERE").toDS.toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("en.embed.bert.covid_bio_clinical.finetuned").predict("""PUT YOUR STRING HERE""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_carlbert_webex_mlm_spatial_en.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_carlbert_webex_mlm_spatial_en.md index 2f13e1e7ba8bd4..e96e1f5b0e291c 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_carlbert_webex_mlm_spatial_en.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_carlbert_webex_mlm_spatial_en.md @@ -33,50 +33,7 @@ Pretrained BertEmbeddings model, adapted from Hugging Face and curated to provid ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} - -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") -embeddings = BertEmbeddings.pretrained("bert_embeddings_carlbert_webex_mlm_spatial","de") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") \ - .setCaseSensitive(True) - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Ich liebe Spark-NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCol("text") - .setOutputCol("document") - -val tokenizer = new Tokenizer() - .setInputCols("document") - .setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_carlbert_webex_mlm_spatial","de") - .setInputCols(Array("document", "token")) - .setOutputCol("embeddings") - .setCaseSensitive(True) - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Ich liebe Spark-NLP").toDS.toDF("text") - -val result = pipeline.fit(data).transform(data) -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_chefberto_italian_cased_it.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_chefberto_italian_cased_it.md index 1e2661ff475de6..3e2795c9dc5348 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_chefberto_italian_cased_it.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_chefberto_italian_cased_it.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_chefberto_italian_cased","it") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Adoro Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_chefberto_italian_cased","it") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Adoro Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("it.embed.chefberto_italian_cased").predict("""Adoro Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_chemical_bert_uncased_en.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_chemical_bert_uncased_en.md index 8b4dcbb11e39e4..973e2514e38b99 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_chemical_bert_uncased_en.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_chemical_bert_uncased_en.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_chemical_bert_uncased","en") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_chemical_bert_uncased","en") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("en.embed.chemical_bert_uncased").predict("""I love Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_chemical_uncased_finetuned_cust_c1_cust_en.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_chemical_uncased_finetuned_cust_c1_cust_en.md index 1d3affe542dc5c..422a8d343b0a40 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_chemical_uncased_finetuned_cust_c1_cust_en.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_chemical_uncased_finetuned_cust_c1_cust_en.md @@ -33,50 +33,7 @@ Pretrained BertEmbeddings model, adapted from Hugging Face and curated to provid ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} - -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") -embeddings = BertEmbeddings.pretrained("bert_embeddings_chemical_uncased_finetuned_cust_c1_cust","en") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") \ - .setCaseSensitive(True) - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCol("text") - .setOutputCol("document") - -val tokenizer = new Tokenizer() - .setInputCols("document") - .setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_chemical_uncased_finetuned_cust_c1_cust","en") - .setInputCols(Array("document", "token")) - .setOutputCol("embeddings") - .setCaseSensitive(True) - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP").toDS.toDF("text") - -val result = pipeline.fit(data).transform(data) -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_chemical_uncased_finetuned_cust_c2_en.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_chemical_uncased_finetuned_cust_c2_en.md index 02fdd7d0894952..6d1c7a0d327ba9 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_chemical_uncased_finetuned_cust_c2_en.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_chemical_uncased_finetuned_cust_c2_en.md @@ -33,50 +33,7 @@ Pretrained BertEmbeddings model, adapted from Hugging Face and curated to provid ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} - -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") -embeddings = BertEmbeddings.pretrained("bert_embeddings_chemical_uncased_finetuned_cust_c2","en") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") \ - .setCaseSensitive(True) - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCol("text") - .setOutputCol("document") - -val tokenizer = new Tokenizer() - .setInputCols("document") - .setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_chemical_uncased_finetuned_cust_c2","en") - .setInputCols(Array("document", "token")) - .setOutputCol("embeddings") - .setCaseSensitive(True) - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP").toDS.toDF("text") - -val result = pipeline.fit(data).transform(data) -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_childes_bert_en.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_childes_bert_en.md index 60503fbe2496d8..8014017794b12e 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_childes_bert_en.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_childes_bert_en.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_childes_bert","en") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_childes_bert","en") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("en.embed.childes_bert").predict("""I love Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_clinical_pubmed_bert_base_128_en.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_clinical_pubmed_bert_base_128_en.md index ecc100c7def6f7..3ad31a7d16eec6 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_clinical_pubmed_bert_base_128_en.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_clinical_pubmed_bert_base_128_en.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_clinical_pubmed_bert_base_128","en") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_clinical_pubmed_bert_base_128","en") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("en.embed.clinical_pubmed_bert_base_128").predict("""I love Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_clinical_pubmed_bert_base_512_en.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_clinical_pubmed_bert_base_512_en.md index 2c83ed64e84a41..beaf0e829739c1 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_clinical_pubmed_bert_base_512_en.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_clinical_pubmed_bert_base_512_en.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_clinical_pubmed_bert_base_512","en") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_clinical_pubmed_bert_base_512","en") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("en.embed.clinical_pubmed_bert_base_512").predict("""I love Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_crosloengual_bert_en.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_crosloengual_bert_en.md index 89a6839a95ee56..c69ade88cba059 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_crosloengual_bert_en.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_crosloengual_bert_en.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_crosloengual_bert","en") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_crosloengual_bert","en") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("en.embed.crosloengual_bert").predict("""I love Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_dbert_ko.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_dbert_ko.md index 0c6f71e2a0ddb4..070d641873d722 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_dbert_ko.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_dbert_ko.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_dbert","ko") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["나는 Spark NLP를 좋아합니다"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_dbert","ko") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("나는 Spark NLP를 좋아합니다").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("ko.embed.dbert").predict("""나는 Spark NLP를 좋아합니다""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_deberta_base_uncased_en.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_deberta_base_uncased_en.md index 22fae6bd9c819c..10f5c4d056bc44 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_deberta_base_uncased_en.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_deberta_base_uncased_en.md @@ -33,57 +33,7 @@ Pretrained BertForMaskedLM model, adapted from Hugging Face and curated to provi ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") - -bert_loaded = BertEmbeddings.pretrained("bert_embeddings_deberta_base_uncased","en") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") \ - .setCaseSensitive(True) - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, bert_loaded]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCol("text") - .setOutputCol("document") -val tokenizer = new Tokenizer() - .setInputCols("document") - .setOutputCol("token") - -val bert_loaded = BertEmbeddings.pretrained("bert_embeddings_deberta_base_uncased","en") - .setInputCols(Array("document", "token")) - .setOutputCol("embeddings") - .setCaseSensitive(True) - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, bert_loaded)) - -val data = Seq("I love Spark NLP").toDS.toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("en.embed.deberta_base_uncased").predict("""I love Spark NLP""") -``` - -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_distil_clinical_en.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_distil_clinical_en.md index e29412f032a148..7300998e4ef53d 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_distil_clinical_en.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_distil_clinical_en.md @@ -33,50 +33,7 @@ Pretrained BertEmbeddings model, adapted from Hugging Face and curated to provid ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} - -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") -embeddings = BertEmbeddings.pretrained("bert_embeddings_distil_clinical","en") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") \ - .setCaseSensitive(True) - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark-NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCol("text") - .setOutputCol("document") - -val tokenizer = new Tokenizer() - .setInputCols("document") - .setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_distil_clinical","en") - .setInputCols(Array("document", "token")) - .setOutputCol("embeddings") - .setCaseSensitive(True) - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark-NLP").toDS.toDF("text") - -val result = pipeline.fit(data).transform(data) -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_dpr_spanish_passage_encoder_allqa_base_es.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_dpr_spanish_passage_encoder_allqa_base_es.md index 622e96cea211e0..084a35b1638067 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_dpr_spanish_passage_encoder_allqa_base_es.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_dpr_spanish_passage_encoder_allqa_base_es.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_dpr_spanish_passage_encoder_allqa_base","es") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Me encanta chispa nlp"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_dpr_spanish_passage_encoder_allqa_base","es") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Me encanta chispa nlp").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("es.embed.dpr_spanish_passage_encoder_allqa_base").predict("""Me encanta chispa nlp""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_dpr_spanish_passage_encoder_squades_base_es.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_dpr_spanish_passage_encoder_squades_base_es.md index 5b4101b177a992..66df617f4a1508 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_dpr_spanish_passage_encoder_squades_base_es.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_dpr_spanish_passage_encoder_squades_base_es.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_dpr_spanish_passage_encoder_squades_base","es") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Me encanta chispa nlp"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_dpr_spanish_passage_encoder_squades_base","es") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Me encanta chispa nlp").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("es.embed.dpr_spanish_passage_encoder_squades_base").predict("""Me encanta chispa nlp""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_dpr_spanish_question_encoder_allqa_base_es.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_dpr_spanish_question_encoder_allqa_base_es.md index fbf26507302d99..bd7fdcc173b6d0 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_dpr_spanish_question_encoder_allqa_base_es.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_dpr_spanish_question_encoder_allqa_base_es.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_dpr_spanish_question_encoder_allqa_base","es") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Me encanta chispa nlp"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_dpr_spanish_question_encoder_allqa_base","es") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Me encanta chispa nlp").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("es.embed.dpr_spanish_question_encoder_allqa_base").predict("""Me encanta chispa nlp""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_dpr_spanish_question_encoder_squades_base_es.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_dpr_spanish_question_encoder_squades_base_es.md index 537f94ae494528..c6b5b68cbcf937 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_dpr_spanish_question_encoder_squades_base_es.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_dpr_spanish_question_encoder_squades_base_es.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_dpr_spanish_question_encoder_squades_base","es") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Me encanta chispa nlp"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_dpr_spanish_question_encoder_squades_base","es") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Me encanta chispa nlp").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("es.embed.dpr_spanish_question_encoder_squades_base").predict("""Me encanta chispa nlp""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_dziribert_ar.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_dziribert_ar.md index 4a1f66ee841cec..74d244071c2976 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_dziribert_ar.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_dziribert_ar.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_dziribert","ar") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["أنا أحب شرارة NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_dziribert","ar") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("أنا أحب شرارة NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("ar.embed.dziribert").predict("""أنا أحب شرارة NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_false_positives_scancode_bert_base_uncased_L8_1_en.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_false_positives_scancode_bert_base_uncased_L8_1_en.md index 8bee08b62d0c53..f17b0bb012a47f 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_false_positives_scancode_bert_base_uncased_L8_1_en.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_false_positives_scancode_bert_base_uncased_L8_1_en.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_false_positives_scancode_bert_base_uncased_L8_1","en") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_false_positives_scancode_bert_base_uncased_L8_1","en") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("en.embed.false_positives_scancode_bert_base_uncased_L8_1").predict("""I love Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_finbert_pretrain_yiyanghkust_en.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_finbert_pretrain_yiyanghkust_en.md index a8f6efb7ae0030..aa34411bb64ddb 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_finbert_pretrain_yiyanghkust_en.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_finbert_pretrain_yiyanghkust_en.md @@ -37,55 +37,7 @@ Financial English Bert Embeddings model, uploaded to Hugging Face, adapted and i ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_finbert_pretrain_yiyanghkust","en") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_finbert_pretrain_yiyanghkust","en") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("en.embed.finbert_pretrain_yiyanghkust").predict("""I love Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_finest_bert_en.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_finest_bert_en.md index e01933d053546d..dbba74c8aed5f5 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_finest_bert_en.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_finest_bert_en.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_finest_bert","en") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_finest_bert","en") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("en.embed.finest_bert").predict("""I love Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_gbert_base_de.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_gbert_base_de.md index f7c53a48bd8905..0afd6bfa4ea8b8 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_gbert_base_de.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_gbert_base_de.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_gbert_base","de") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Ich liebe Funken NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_gbert_base","de") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Ich liebe Funken NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("de.embed.gbert_base").predict("""Ich liebe Funken NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_german_financial_statements_bert_de.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_german_financial_statements_bert_de.md index bd29b725b81ae5..9771a2aeb59ebd 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_german_financial_statements_bert_de.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_german_financial_statements_bert_de.md @@ -33,55 +33,7 @@ Pretrained Financial Bert Word Embeddings model, trained on German Financial Sta ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_german_financial_statements_bert","de") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Ich liebe Funken NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_german_financial_statements_bert","de") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Ich liebe Funken NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("de.embed.german_financial_statements_bert").predict("""Ich liebe Funken NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_hateBERT_en.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_hateBERT_en.md index 82f3c85d2247d3..9b4c9b4143c639 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_hateBERT_en.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_hateBERT_en.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_hateBERT","en") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_hateBERT","en") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("en.embed.hateBERT").predict("""I love Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_hseBert_it_cased_it.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_hseBert_it_cased_it.md index 0ac43ca8f34236..82e3bf45a0a6e1 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_hseBert_it_cased_it.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_hseBert_it_cased_it.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_hseBert_it_cased","it") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Adoro Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_hseBert_it_cased","it") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Adoro Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("it.embed.hseBert_it_cased").predict("""Adoro Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_indic_transformers_hi_bert_hi.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_indic_transformers_hi_bert_hi.md index cb1d065f6341ec..c7d5395588b545 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_indic_transformers_hi_bert_hi.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_indic_transformers_hi_bert_hi.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_indic_transformers_hi_bert","hi") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["मुझे स्पार्क एनएलपी पसंद है"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_indic_transformers_hi_bert","hi") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("मुझे स्पार्क एनएलपी पसंद है").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("hi.embed.indic_transformers_hi_bert").predict("""मुझे स्पार्क एनएलपी पसंद है""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_indic_transformers_te_bert_te.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_indic_transformers_te_bert_te.md index 286777564e9003..c926c64fe0c410 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_indic_transformers_te_bert_te.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_indic_transformers_te_bert_te.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_indic_transformers_te_bert","te") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["నేను స్పార్క్ nlp ను ప్రేమిస్తున్నాను"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_indic_transformers_te_bert","te") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("నేను స్పార్క్ nlp ను ప్రేమిస్తున్నాను").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("te.embed.indic_transformers_te_bert").predict("""నేను స్పార్క్ nlp ను ప్రేమిస్తున్నాను""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_javanese_bert_small_imdb_jv.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_javanese_bert_small_imdb_jv.md index 9f834ccdc83fa0..5d4cb7779b5179 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_javanese_bert_small_imdb_jv.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_javanese_bert_small_imdb_jv.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_javanese_bert_small_imdb","jv") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_javanese_bert_small_imdb","jv") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("jv.embed.javanese_bert_small_imdb").predict("""I love Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_javanese_bert_small_jv.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_javanese_bert_small_jv.md index 92986039f002be..71dfbd37965bd5 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_javanese_bert_small_jv.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_javanese_bert_small_jv.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_javanese_bert_small","jv") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_javanese_bert_small","jv") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("jv.embed.javanese_bert_small").predict("""I love Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_legal_bert_base_uncased_en.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_legal_bert_base_uncased_en.md index a490d46ea569a7..0e7dceeca64069 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_legal_bert_base_uncased_en.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_legal_bert_base_uncased_en.md @@ -33,55 +33,7 @@ Legal Pretrained Bert Embeddings model, trained with uncased text, uploaded to H ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_legal_bert_base_uncased","en") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_legal_bert_base_uncased","en") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("en.embed.legal_bert_base_uncased").predict("""I love Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_lic_class_scancode_bert_base_cased_L32_1_en.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_lic_class_scancode_bert_base_cased_L32_1_en.md index 6e0309525b771a..f8cf4715db4ae2 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_lic_class_scancode_bert_base_cased_L32_1_en.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_lic_class_scancode_bert_base_cased_L32_1_en.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_lic_class_scancode_bert_base_cased_L32_1","en") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_lic_class_scancode_bert_base_cased_L32_1","en") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("en.embed.lic_class_scancode_bert_base_cased_L32_1").predict("""I love Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_marathi_bert_mr.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_marathi_bert_mr.md index 6b39af7927411f..6e5de8362bd022 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_marathi_bert_mr.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_marathi_bert_mr.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_marathi_bert","mr") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["मला स्पार्क एनएलपी आवडते"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_marathi_bert","mr") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("मला स्पार्क एनएलपी आवडते").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("mr.embed.marathi_bert").predict("""मला स्पार्क एनएलपी आवडते""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_mbert_ar_c19_ar.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_mbert_ar_c19_ar.md index 3d6a26c549f735..9f2ed02c7a7a16 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_mbert_ar_c19_ar.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_mbert_ar_c19_ar.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_mbert_ar_c19","ar") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["أنا أحب شرارة NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_mbert_ar_c19","ar") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("أنا أحب شرارة NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("ar.embed.mbert_ar_c19").predict("""أنا أحب شرارة NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_multi_dialect_bert_base_arabic_ar.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_multi_dialect_bert_base_arabic_ar.md index bc40d7959ba191..dfd890b165bf97 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_multi_dialect_bert_base_arabic_ar.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_multi_dialect_bert_base_arabic_ar.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_multi_dialect_bert_base_arabic","ar") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["أنا أحب شرارة NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_multi_dialect_bert_base_arabic","ar") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("أنا أحب شرارة NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("ar.embed.multi_dialect_bert_base_arabic").predict("""أنا أحب شرارة NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_netbert_en.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_netbert_en.md index 2edd51e298a1d8..222fa62d923e86 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_netbert_en.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_netbert_en.md @@ -33,57 +33,7 @@ Pretrained BertForMaskedLM model, adapted from Hugging Face and curated to provi ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") - -bert_loaded = BertEmbeddings.pretrained("bert_embeddings_netbert","en") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") \ - .setCaseSensitive(True) - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, bert_loaded]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCol("text") - .setOutputCol("document") -val tokenizer = new Tokenizer() - .setInputCols("document") - .setOutputCol("token") - -val bert_loaded = BertEmbeddings.pretrained("bert_embeddings_netbert","en") - .setInputCols(Array("document", "token")) - .setOutputCol("embeddings") - .setCaseSensitive(True) - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, bert_loaded)) - -val data = Seq("I love Spark NLP").toDS.toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("en.embed.netbert").predict("""I love Spark NLP""") -``` - -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_olm_base_uncased_oct_2022_en.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_olm_base_uncased_oct_2022_en.md index 3566124863b301..7e639e117689d7 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_olm_base_uncased_oct_2022_en.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_olm_base_uncased_oct_2022_en.md @@ -33,50 +33,7 @@ Pretrained BertEmbeddings model, adapted from Hugging Face and curated to provid ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} - -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") -embeddings = BertEmbeddings.pretrained("bert_embeddings_olm_base_uncased_oct_2022","en") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") \ - .setCaseSensitive(True) - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCol("text") - .setOutputCol("document") - -val tokenizer = new Tokenizer() - .setInputCols("document") - .setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_olm_base_uncased_oct_2022","en") - .setInputCols(Array("document", "token")) - .setOutputCol("embeddings") - .setCaseSensitive(True) - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP").toDS.toDF("text") - -val result = pipeline.fit(data).transform(data) -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_pretrain_ko.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_pretrain_ko.md index 0308fcbcd07582..fda7650d419b4e 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_pretrain_ko.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_pretrain_ko.md @@ -33,50 +33,7 @@ Pretrained BertEmbeddings model, adapted from Hugging Face and curated to provid ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} - -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") -embeddings = BertEmbeddings.pretrained("bert_embeddings_pretrain","ko") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") \ - .setCaseSensitive(True) - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCol("text") - .setOutputCol("document") - -val tokenizer = new Tokenizer() - .setInputCols("document") - .setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_pretrain","ko") - .setInputCols(Array("document", "token")) - .setOutputCol("embeddings") - .setCaseSensitive(true) - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP").toDS.toDF("text") - -val result = pipeline.fit(data).transform(data) -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_psych_search_en.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_psych_search_en.md index f12d896dcbc372..fa3c4d651bce57 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_psych_search_en.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_psych_search_en.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_psych_search","en") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_psych_search","en") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("en.embed.psych_search").predict("""I love Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_scibert_scivocab_finetuned_cord19_en.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_scibert_scivocab_finetuned_cord19_en.md index 1e641bcf5d79b3..6e23b6176de621 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_scibert_scivocab_finetuned_cord19_en.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_scibert_scivocab_finetuned_cord19_en.md @@ -33,55 +33,7 @@ Pretrained BERT Embeddings model, adapted from Hugging Face and curated to provi ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_scibert_scivocab_finetuned_cord19","en") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["PUT YOUR STRING HERE"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCols(Array("text")) - .setOutputCols(Array("document")) - -val tokenizer = new Tokenizer() - .setInputCols("document") - .setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_scibert_scivocab_finetuned_cord19","en") - .setInputCols(Array("document", "token")) - .setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("PUT YOUR STRING HERE").toDS.toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("en.embed.scibert.cord19_scibert.finetuned").predict("""PUT YOUR STRING HERE""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_sec_bert_base_en.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_sec_bert_base_en.md index 8e1158bbb801c8..9db5143da3d138 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_sec_bert_base_en.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_sec_bert_base_en.md @@ -38,55 +38,7 @@ If you are interested in Financial Embeddings, take a look also at these two mod ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_sec_bert_base","en") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_sec_bert_base","en") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("en.embed.sec_bert_base").predict("""I love Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_sec_bert_sh_en.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_sec_bert_sh_en.md index 0958df101c9131..4560a22c0e8c08 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_sec_bert_sh_en.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_sec_bert_sh_en.md @@ -38,56 +38,7 @@ If you are interested in Financial Embeddings, take a look also at these two mod ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python - -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_sec_bert_sh","en") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_sec_bert_sh","en") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("en.embed.sec_bert_sh").predict("""I love Spark NLP""") -``` - -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_sikubert_zh.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_sikubert_zh.md index ce8ab67067aa3f..887b8bfeb407f3 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_sikubert_zh.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_sikubert_zh.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_sikubert","zh") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_sikubert","zh") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("zh.embed.sikubert").predict("""I love Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_sikuroberta_zh.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_sikuroberta_zh.md index 68d128c492b7cd..15264ea6774387 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_sikuroberta_zh.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_sikuroberta_zh.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_sikuroberta","zh") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_sikuroberta","zh") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("zh.embed.sikuroberta").predict("""I love Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_telugu_bertu_te.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_telugu_bertu_te.md index a521a954fb4236..bbd0d09326d723 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_telugu_bertu_te.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_telugu_bertu_te.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_telugu_bertu","te") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["నేను స్పార్క్ nlp ను ప్రేమిస్తున్నాను"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_telugu_bertu","te") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("నేను స్పార్క్ nlp ను ప్రేమిస్తున్నాను").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("te.embed.telugu_bertu").predict("""నేను స్పార్క్ nlp ను ప్రేమిస్తున్నాను""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_wineberto_italian_cased_it.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_wineberto_italian_cased_it.md index 64d487ee4850f5..df8d1762745f19 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_wineberto_italian_cased_it.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_wineberto_italian_cased_it.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_wineberto_italian_cased","it") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Adoro Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_wineberto_italian_cased","it") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Adoro Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("it.embed.wineberto_italian_cased").predict("""Adoro Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_wobert_chinese_plus_zh.md b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_wobert_chinese_plus_zh.md index 698131409af3a5..139c9b65856aab 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_wobert_chinese_plus_zh.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_embeddings_wobert_chinese_plus_zh.md @@ -33,55 +33,7 @@ Pretrained Bert Embeddings model, uploaded to Hugging Face, adapted and imported ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_embeddings_wobert_chinese_plus","zh") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_embeddings_wobert_chinese_plus","zh") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("zh.embed.wobert_chinese_plus").predict("""I love Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-bert_sentence_embeddings_financial_de.md b/docs/_posts/ahmedlone127/2023-06-21-bert_sentence_embeddings_financial_de.md index 13d2898c521b50..31acb1ac4c499a 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-bert_sentence_embeddings_financial_de.md +++ b/docs/_posts/ahmedlone127/2023-06-21-bert_sentence_embeddings_financial_de.md @@ -35,55 +35,7 @@ Financial Pretrained BERT Embeddings model, uploaded to Hugging Face, adapted an ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("bert_sentence_embeddings_financial","de") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Ich liebe Spark-NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCol("text") - .setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("bert_sentence_embeddings_financial","de") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Ich liebe Spark-NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("de.embed.bert.finance").predict("""Ich liebe Spark-NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-biobert_embeddings_all_pt.md b/docs/_posts/ahmedlone127/2023-06-21-biobert_embeddings_all_pt.md index a38274560def80..dcb518b6390b80 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-biobert_embeddings_all_pt.md +++ b/docs/_posts/ahmedlone127/2023-06-21-biobert_embeddings_all_pt.md @@ -33,55 +33,7 @@ Pretrained BioBERT Embeddings model, uploaded to Hugging Face, adapted and impor ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("biobert_embeddings_all","pt") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Odeio o cancro"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("biobert_embeddings_all","pt") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Odeio o cancro").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("pt.embed.gs_all").predict("""Odeio o cancro""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-biobert_embeddings_biomedical_pt.md b/docs/_posts/ahmedlone127/2023-06-21-biobert_embeddings_biomedical_pt.md index b86fe840106cfa..6ec01b4a73af22 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-biobert_embeddings_biomedical_pt.md +++ b/docs/_posts/ahmedlone127/2023-06-21-biobert_embeddings_biomedical_pt.md @@ -33,55 +33,7 @@ Pretrained BioBERT Embeddings model, uploaded to Hugging Face, adapted and impor ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("biobert_embeddings_biomedical","pt") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Odeio o cancro"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("biobert_embeddings_biomedical","pt") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Odeio o cancro").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("pt.embed.gs_biomedical").predict("""Odeio o cancro""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-biobert_embeddings_clinical_pt.md b/docs/_posts/ahmedlone127/2023-06-21-biobert_embeddings_clinical_pt.md index d8a80c64c56b34..58e0d8cb891021 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-biobert_embeddings_clinical_pt.md +++ b/docs/_posts/ahmedlone127/2023-06-21-biobert_embeddings_clinical_pt.md @@ -33,55 +33,7 @@ Pretrained BioBERT Embeddings model, uploaded to Hugging Face, adapted and impor ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("biobert_embeddings_clinical","pt") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Odeio o cancro"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("biobert_embeddings_clinical","pt") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Odeio o cancro").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("pt.embed.gs_clinical").predict("""Odeio o cancro""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-biobert_pubmed_base_cased_v1.2_en.md b/docs/_posts/ahmedlone127/2023-06-21-biobert_pubmed_base_cased_v1.2_en.md index 794836f2f29942..2b7d9fd124435b 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-biobert_pubmed_base_cased_v1.2_en.md +++ b/docs/_posts/ahmedlone127/2023-06-21-biobert_pubmed_base_cased_v1.2_en.md @@ -33,55 +33,7 @@ This model is the v1.2 of [biobert_pubmed_base_cased](https://nlp.johnsnowlabs.c ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("biobert_pubmed_base_cased_v1.2","en") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I hate cancer"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCol("text") - .setOutputCol("document") - -val tokenizer = new Tokenizer() - .setInputCols(Array("document")) - .setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("biobert_pubmed_base_cased_v1.2","en") - .setInputCols(Array("document", "token")) - .setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I hate cancer").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("en.embed.biobert.pubmed.cased_base").predict("""I hate cancer""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_gc4_64k_0_cased_generator_de.md b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_gc4_64k_0_cased_generator_de.md index eb920c7ffb15b9..c920f59afe852d 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_gc4_64k_0_cased_generator_de.md +++ b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_gc4_64k_0_cased_generator_de.md @@ -33,55 +33,7 @@ Pretrained Electra Embeddings model, adapted from Hugging Face and curated to pr ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("electra_embeddings_electra_base_gc4_64k_0_cased_generator","de") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Ich liebe Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCol("text") - .setOutputCol("document") - -val tokenizer = new Tokenizer() - .setInputCols(Array("document")) - .setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("electra_embeddings_electra_base_gc4_64k_0_cased_generator","de") - .setInputCols(Array("document", "token")) - .setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Ich liebe Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("de.embed.electra.cased_base_64d").predict("""Ich liebe Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_gc4_64k_1000000_cased_generator_de.md b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_gc4_64k_1000000_cased_generator_de.md index d6613cc7e8cf70..4b63da86ffc87f 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_gc4_64k_1000000_cased_generator_de.md +++ b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_gc4_64k_1000000_cased_generator_de.md @@ -33,55 +33,7 @@ Pretrained Electra Embeddings model, adapted from Hugging Face and curated to pr ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("electra_embeddings_electra_base_gc4_64k_1000000_cased_generator","de") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Ich liebe Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCol("text") - .setOutputCol("document") - -val tokenizer = new Tokenizer() - .setInputCols(Array("document")) - .setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("electra_embeddings_electra_base_gc4_64k_1000000_cased_generator","de") - .setInputCols(Array("document", "token")) - .setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Ich liebe Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("de.embed.electra.cased_base_gc4_64k_1000000.by_stefan_it").predict("""Ich liebe Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_gc4_64k_100000_cased_generator_de.md b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_gc4_64k_100000_cased_generator_de.md index b1110b5c50cebd..598d68d39e87a6 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_gc4_64k_100000_cased_generator_de.md +++ b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_gc4_64k_100000_cased_generator_de.md @@ -33,55 +33,7 @@ Pretrained Electra Embeddings model, adapted from Hugging Face and curated to pr ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("electra_embeddings_electra_base_gc4_64k_100000_cased_generator","de") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Ich liebe Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCol("text") - .setOutputCol("document") - -val tokenizer = new Tokenizer() - .setInputCols(Array("document")) - .setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("electra_embeddings_electra_base_gc4_64k_100000_cased_generator","de") - .setInputCols(Array("document", "token")) - .setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Ich liebe Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("de.embed.electra.cased_base_gc4_64k_100000.by_stefan_it").predict("""Ich liebe Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_gc4_64k_200000_cased_generator_de.md b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_gc4_64k_200000_cased_generator_de.md index e90872b5cf0574..66661999bd5a40 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_gc4_64k_200000_cased_generator_de.md +++ b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_gc4_64k_200000_cased_generator_de.md @@ -33,55 +33,7 @@ Pretrained Electra Embeddings model, adapted from Hugging Face and curated to pr ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("electra_embeddings_electra_base_gc4_64k_200000_cased_generator","de") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Ich liebe Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCol("text") - .setOutputCol("document") - -val tokenizer = new Tokenizer() - .setInputCols(Array("document")) - .setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("electra_embeddings_electra_base_gc4_64k_200000_cased_generator","de") - .setInputCols(Array("document", "token")) - .setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Ich liebe Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("de.embed.electra.cased_base_gc4_64k_200000.by_stefan_it").predict("""Ich liebe Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_gc4_64k_300000_cased_generator_de.md b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_gc4_64k_300000_cased_generator_de.md index e9a244fe395167..1c49ee4e26a9ec 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_gc4_64k_300000_cased_generator_de.md +++ b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_gc4_64k_300000_cased_generator_de.md @@ -33,55 +33,7 @@ Pretrained Electra Embeddings model, adapted from Hugging Face and curated to pr ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("electra_embeddings_electra_base_gc4_64k_300000_cased_generator","de") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Ich liebe Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCol("text") - .setOutputCol("document") - -val tokenizer = new Tokenizer() - .setInputCols(Array("document")) - .setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("electra_embeddings_electra_base_gc4_64k_300000_cased_generator","de") - .setInputCols(Array("document", "token")) - .setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Ich liebe Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("de.embed.electra.cased_base_gc4_64k_300000.by_stefan_it").predict("""Ich liebe Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_gc4_64k_400000_cased_generator_de.md b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_gc4_64k_400000_cased_generator_de.md index cf463da7d3ede6..fdff17758c3d20 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_gc4_64k_400000_cased_generator_de.md +++ b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_gc4_64k_400000_cased_generator_de.md @@ -33,55 +33,7 @@ Pretrained Electra Embeddings model, adapted from Hugging Face and curated to pr ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("electra_embeddings_electra_base_gc4_64k_400000_cased_generator","de") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Ich liebe Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCol("text") - .setOutputCol("document") - -val tokenizer = new Tokenizer() - .setInputCols(Array("document")) - .setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("electra_embeddings_electra_base_gc4_64k_400000_cased_generator","de") - .setInputCols(Array("document", "token")) - .setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Ich liebe Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("de.embed.electra.cased_base_gc4_64k_400000.by_stefan_it").predict("""Ich liebe Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_gc4_64k_500000_cased_generator_de.md b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_gc4_64k_500000_cased_generator_de.md index 0e0368cae00d7c..f2aa64ef608413 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_gc4_64k_500000_cased_generator_de.md +++ b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_gc4_64k_500000_cased_generator_de.md @@ -33,55 +33,7 @@ Pretrained Electra Embeddings model, adapted from Hugging Face and curated to pr ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("electra_embeddings_electra_base_gc4_64k_500000_cased_generator","de") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Ich liebe Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCol("text") - .setOutputCol("document") - -val tokenizer = new Tokenizer() - .setInputCols(Array("document")) - .setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("electra_embeddings_electra_base_gc4_64k_500000_cased_generator","de") - .setInputCols(Array("document", "token")) - .setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Ich liebe Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("de.embed.electra.cased_base_gc4_64k_500000.by_stefan_it").predict("""Ich liebe Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_gc4_64k_600000_cased_generator_de.md b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_gc4_64k_600000_cased_generator_de.md index 3f63d4ca68b519..87d806fe0189d8 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_gc4_64k_600000_cased_generator_de.md +++ b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_gc4_64k_600000_cased_generator_de.md @@ -33,55 +33,7 @@ Pretrained Electra Embeddings model, adapted from Hugging Face and curated to pr ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("electra_embeddings_electra_base_gc4_64k_600000_cased_generator","de") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Ich liebe Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCol("text") - .setOutputCol("document") - -val tokenizer = new Tokenizer() - .setInputCols(Array("document")) - .setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("electra_embeddings_electra_base_gc4_64k_600000_cased_generator","de") - .setInputCols(Array("document", "token")) - .setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Ich liebe Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("de.embed.electra.cased_base_gc4_64k_600000.by_stefan_it").predict("""Ich liebe Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_gc4_64k_700000_cased_generator_de.md b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_gc4_64k_700000_cased_generator_de.md index 6ce95cc170b433..6c580f4f68a101 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_gc4_64k_700000_cased_generator_de.md +++ b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_gc4_64k_700000_cased_generator_de.md @@ -33,55 +33,7 @@ Pretrained Electra Embeddings model, adapted from Hugging Face and curated to pr ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("electra_embeddings_electra_base_gc4_64k_700000_cased_generator","de") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Ich liebe Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCol("text") - .setOutputCol("document") - -val tokenizer = new Tokenizer() - .setInputCols(Array("document")) - .setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("electra_embeddings_electra_base_gc4_64k_700000_cased_generator","de") - .setInputCols(Array("document", "token")) - .setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Ich liebe Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("de.embed.electra.cased_base_gc4_64k_700000.by_stefan_it").predict("""Ich liebe Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_gc4_64k_800000_cased_generator_de.md b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_gc4_64k_800000_cased_generator_de.md index b3e7e29f1c1fe9..e759fe215faabb 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_gc4_64k_800000_cased_generator_de.md +++ b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_gc4_64k_800000_cased_generator_de.md @@ -33,55 +33,7 @@ Pretrained Electra Embeddings model, adapted from Hugging Face and curated to pr ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("electra_embeddings_electra_base_gc4_64k_800000_cased_generator","de") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Ich liebe Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCol("text") - .setOutputCol("document") - -val tokenizer = new Tokenizer() - .setInputCols(Array("document")) - .setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("electra_embeddings_electra_base_gc4_64k_800000_cased_generator","de") - .setInputCols(Array("document", "token")) - .setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Ich liebe Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("de.embed.electra.cased_base_gc4_64k_800000.by_stefan_it").predict("""Ich liebe Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_gc4_64k_900000_cased_generator_de.md b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_gc4_64k_900000_cased_generator_de.md index 9e2a0a0531c231..87e842838ac52e 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_gc4_64k_900000_cased_generator_de.md +++ b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_gc4_64k_900000_cased_generator_de.md @@ -33,55 +33,7 @@ Pretrained Electra Embeddings model, adapted from Hugging Face and curated to pr ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("electra_embeddings_electra_base_gc4_64k_900000_cased_generator","de") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Ich liebe Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCol("text") - .setOutputCol("document") - -val tokenizer = new Tokenizer() - .setInputCols(Array("document")) - .setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("electra_embeddings_electra_base_gc4_64k_900000_cased_generator","de") - .setInputCols(Array("document", "token")) - .setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Ich liebe Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("de.embed.electra.cased_base_gc4_64k_900000.by_stefan_it").predict("""Ich liebe Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_generator_en.md b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_generator_en.md index e83a14d6f6ba62..df339d80d84000 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_generator_en.md +++ b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_generator_en.md @@ -33,55 +33,7 @@ Pretrained Electra Embeddings model, adapted from Hugging Face and curated to pr ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("electra_embeddings_electra_base_generator","en") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCol("text") - .setOutputCol("document") - -val tokenizer = new Tokenizer() - .setInputCols(Array("document")) - .setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("electra_embeddings_electra_base_generator","en") - .setInputCols(Array("document", "token")) - .setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("en.embed.electra.base").predict("""I love Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_italian_xxl_cased_generator_it.md b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_italian_xxl_cased_generator_it.md index b650a25e829416..af7243f41c550c 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_italian_xxl_cased_generator_it.md +++ b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_italian_xxl_cased_generator_it.md @@ -33,55 +33,7 @@ Pretrained Electra Embeddings model, adapted from Hugging Face and curated to pr ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("electra_embeddings_electra_base_italian_xxl_cased_generator","it") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Adoro Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCol("text") - .setOutputCol("document") - -val tokenizer = new Tokenizer() - .setInputCols(Array("document")) - .setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("electra_embeddings_electra_base_italian_xxl_cased_generator","it") - .setInputCols(Array("document", "token")) - .setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Adoro Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("it.embed.electra.cased_xxl_base").predict("""Adoro Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_turkish_mc4_cased_generator_tr.md b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_turkish_mc4_cased_generator_tr.md index e41b06ae521f40..543df7c17442aa 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_turkish_mc4_cased_generator_tr.md +++ b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_turkish_mc4_cased_generator_tr.md @@ -33,55 +33,7 @@ Pretrained Electra Embeddings model, adapted from Hugging Face and curated to pr ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("electra_embeddings_electra_base_turkish_mc4_cased_generator","tr") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Spark NLP'yi seviyorum"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCol("text") - .setOutputCol("document") - -val tokenizer = new Tokenizer() - .setInputCols(Array("document")) - .setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("electra_embeddings_electra_base_turkish_mc4_cased_generator","tr") - .setInputCols(Array("document", "token")) - .setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Spark NLP'yi seviyorum").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("tr.embed.electra.cased_base").predict("""Spark NLP'yi seviyorum""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_turkish_mc4_uncased_generator_tr.md b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_turkish_mc4_uncased_generator_tr.md index 41859cc555c6a2..1e7838de7edb24 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_turkish_mc4_uncased_generator_tr.md +++ b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_base_turkish_mc4_uncased_generator_tr.md @@ -33,55 +33,7 @@ Pretrained Electra Embeddings model, adapted from Hugging Face and curated to pr ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("electra_embeddings_electra_base_turkish_mc4_uncased_generator","tr") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Spark NLP'yi seviyorum"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCol("text") - .setOutputCol("document") - -val tokenizer = new Tokenizer() - .setInputCols(Array("document")) - .setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("electra_embeddings_electra_base_turkish_mc4_uncased_generator","tr") - .setInputCols(Array("document", "token")) - .setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Spark NLP'yi seviyorum").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("tr.embed.electra.uncased_base").predict("""Spark NLP'yi seviyorum""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_large_generator_en.md b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_large_generator_en.md index bbfb7f281e7a49..e0062b938f8f9f 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_large_generator_en.md +++ b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_large_generator_en.md @@ -33,55 +33,7 @@ Pretrained Electra Embeddings model, adapted from Hugging Face and curated to pr ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("electra_embeddings_electra_large_generator","en") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCol("text") - .setOutputCol("document") - -val tokenizer = new Tokenizer() - .setInputCols(Array("document")) - .setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("electra_embeddings_electra_large_generator","en") - .setInputCols(Array("document", "token")) - .setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("en.embed.electra.large").predict("""I love Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_small_generator_en.md b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_small_generator_en.md index dabe96a7d7b5a2..bc972fbf5e3ca3 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_small_generator_en.md +++ b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_small_generator_en.md @@ -33,55 +33,7 @@ Pretrained Electra Embeddings model, adapted from Hugging Face and curated to pr ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("electra_embeddings_electra_small_generator","en") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCol("text") - .setOutputCol("document") - -val tokenizer = new Tokenizer() - .setInputCols(Array("document")) - .setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("electra_embeddings_electra_small_generator","en") - .setInputCols(Array("document", "token")) - .setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("en.embed.electra.small").predict("""I love Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_small_japanese_generator_ja.md b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_small_japanese_generator_ja.md index 29d87ba99e8341..3f5281e221dc4d 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_small_japanese_generator_ja.md +++ b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_small_japanese_generator_ja.md @@ -33,47 +33,7 @@ Pretrained Electra Embeddings model, adapted from Hugging Face and curated to pr ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("electra_embeddings_electra_small_japanese_generator","ja") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Spark NLPが大好きです"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCol("text") - .setOutputCol("document") - -val tokenizer = new Tokenizer() - .setInputCols(Array("document")) - .setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("electra_embeddings_electra_small_japanese_generator","ja") - .setInputCols(Array("document", "token")) - .setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) -val data = Seq("Spark NLPが大好きです").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_tagalog_base_cased_generator_tl.md b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_tagalog_base_cased_generator_tl.md index 84aeba9befe4a7..61704be090fbec 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_tagalog_base_cased_generator_tl.md +++ b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_tagalog_base_cased_generator_tl.md @@ -33,55 +33,7 @@ Pretrained Electra Embeddings model, adapted from Hugging Face and curated to pr ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("electra_embeddings_electra_tagalog_base_cased_generator","tl") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Mahilig ako sa Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCol("text") - .setOutputCol("document") - -val tokenizer = new Tokenizer() - .setInputCols(Array("document")) - .setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("electra_embeddings_electra_tagalog_base_cased_generator","tl") - .setInputCols(Array("document", "token")) - .setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Mahilig ako sa Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("tl.embed.electra.cased_base").predict("""Mahilig ako sa Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_tagalog_base_uncased_generator_tl.md b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_tagalog_base_uncased_generator_tl.md index e48ebc2ee91dfd..b2a0eacc593a2a 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_tagalog_base_uncased_generator_tl.md +++ b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_tagalog_base_uncased_generator_tl.md @@ -33,55 +33,7 @@ Pretrained Electra Embeddings model, adapted from Hugging Face and curated to pr ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("electra_embeddings_electra_tagalog_base_uncased_generator","tl") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Mahilig ako sa Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCol("text") - .setOutputCol("document") - -val tokenizer = new Tokenizer() - .setInputCols(Array("document")) - .setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("electra_embeddings_electra_tagalog_base_uncased_generator","tl") - .setInputCols(Array("document", "token")) - .setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Mahilig ako sa Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("tl.embed.electra.uncased_base").predict("""Mahilig ako sa Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_tagalog_small_cased_generator_tl.md b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_tagalog_small_cased_generator_tl.md index df146d8836dce7..bf277c77873ae2 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_tagalog_small_cased_generator_tl.md +++ b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_tagalog_small_cased_generator_tl.md @@ -33,55 +33,7 @@ Pretrained Electra Embeddings model, adapted from Hugging Face and curated to pr ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("electra_embeddings_electra_tagalog_small_cased_generator","tl") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Mahilig ako sa Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCol("text") - .setOutputCol("document") - -val tokenizer = new Tokenizer() - .setInputCols(Array("document")) - .setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("electra_embeddings_electra_tagalog_small_cased_generator","tl") - .setInputCols(Array("document", "token")) - .setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Mahilig ako sa Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("tl.embed.electra.cased_small").predict("""Mahilig ako sa Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_tagalog_small_uncased_generator_tl.md b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_tagalog_small_uncased_generator_tl.md index 58cea57ca00683..9f7d6634160407 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_tagalog_small_uncased_generator_tl.md +++ b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electra_tagalog_small_uncased_generator_tl.md @@ -33,55 +33,7 @@ Pretrained Electra Embeddings model, adapted from Hugging Face and curated to pr ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("electra_embeddings_electra_tagalog_small_uncased_generator","tl") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Mahilig ako sa Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCol("text") - .setOutputCol("document") - -val tokenizer = new Tokenizer() - .setInputCols(Array("document")) - .setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("electra_embeddings_electra_tagalog_small_uncased_generator","tl") - .setInputCols(Array("document", "token")) - .setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Mahilig ako sa Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("tl.embed.electra.uncased_small").predict("""Mahilig ako sa Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electricidad_base_generator_es.md b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electricidad_base_generator_es.md index be35b303a82993..9be45ffd4604ee 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electricidad_base_generator_es.md +++ b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_electricidad_base_generator_es.md @@ -33,55 +33,7 @@ Pretrained Electra Embeddings model, adapted from Hugging Face and curated to pr ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("electra_embeddings_electricidad_base_generator","es") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Amo Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCol("text") - .setOutputCol("document") - -val tokenizer = new Tokenizer() - .setInputCols(Array("document")) - .setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("electra_embeddings_electricidad_base_generator","es") - .setInputCols(Array("document", "token")) - .setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Amo Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("es.embed.electra.base").predict("""Amo Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_finance_koelectra_base_generator_ko.md b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_finance_koelectra_base_generator_ko.md index af1b52acd3ac9e..80257ef852acaf 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_finance_koelectra_base_generator_ko.md +++ b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_finance_koelectra_base_generator_ko.md @@ -33,47 +33,7 @@ Pretrained Financial Korean Electra Embeddings model, adapted from Hugging Face ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("electra_embeddings_finance_koelectra_base_generator","ko") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["나는 Spark NLP를 좋아합니다"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCol("text") - .setOutputCol("document") - -val tokenizer = new Tokenizer() - .setInputCols(Array("document")) - .setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("electra_embeddings_finance_koelectra_base_generator","ko") - .setInputCols(Array("document", "token")) - .setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) -val data = Seq("나는 Spark NLP를 좋아합니다").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_finance_koelectra_small_generator_ko.md b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_finance_koelectra_small_generator_ko.md index 76acc791540c7c..5febe5b840d44f 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_finance_koelectra_small_generator_ko.md +++ b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_finance_koelectra_small_generator_ko.md @@ -33,47 +33,7 @@ Pretrained Financial Korean Electra Embeddings model, adapted from Hugging Face ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("electra_embeddings_finance_koelectra_small_generator","ko") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["나는 Spark NLP를 좋아합니다"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCol("text") - .setOutputCol("document") - -val tokenizer = new Tokenizer() - .setInputCols(Array("document")) - .setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("electra_embeddings_finance_koelectra_small_generator","ko") - .setInputCols(Array("document", "token")) - .setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) -val data = Seq("나는 Spark NLP를 좋아합니다").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_gelectra_base_generator_de.md b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_gelectra_base_generator_de.md index 35d0fddb181a54..4c98baae2a093c 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_gelectra_base_generator_de.md +++ b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_gelectra_base_generator_de.md @@ -33,55 +33,7 @@ Pretrained Electra Embeddings model, adapted from Hugging Face and curated to pr ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("electra_embeddings_gelectra_base_generator","de") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Ich liebe Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCol("text") - .setOutputCol("document") - -val tokenizer = new Tokenizer() - .setInputCols(Array("document")) - .setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("electra_embeddings_gelectra_base_generator","de") - .setInputCols(Array("document", "token")) - .setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Ich liebe Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("de.embed.electra.base").predict("""Ich liebe Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_gelectra_large_generator_de.md b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_gelectra_large_generator_de.md index 6d2e16d4eeefb6..7d1524213cf86a 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_gelectra_large_generator_de.md +++ b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_gelectra_large_generator_de.md @@ -33,55 +33,7 @@ Pretrained Electra Embeddings model, adapted from Hugging Face and curated to pr ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("electra_embeddings_gelectra_large_generator","de") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Ich liebe Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCol("text") - .setOutputCol("document") - -val tokenizer = new Tokenizer() - .setInputCols(Array("document")) - .setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("electra_embeddings_gelectra_large_generator","de") - .setInputCols(Array("document", "token")) - .setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Ich liebe Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("de.embed.electra.large").predict("""Ich liebe Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_koelectra_base_generator_ko.md b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_koelectra_base_generator_ko.md index 53e791d787729c..1728665140e95f 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_koelectra_base_generator_ko.md +++ b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_koelectra_base_generator_ko.md @@ -33,47 +33,7 @@ Pretrained Electra Embeddings model, adapted from Hugging Face and curated to pr ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("electra_embeddings_koelectra_base_generator","ko") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["나는 Spark NLP를 좋아합니다"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCol("text") - .setOutputCol("document") - -val tokenizer = new Tokenizer() - .setInputCols(Array("document")) - .setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("electra_embeddings_koelectra_base_generator","ko") - .setInputCols(Array("document", "token")) - .setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) -val data = Seq("나는 Spark NLP를 좋아합니다").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_koelectra_base_v2_generator_ko.md b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_koelectra_base_v2_generator_ko.md index 94addd53290ea6..6c5b26726a9caf 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_koelectra_base_v2_generator_ko.md +++ b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_koelectra_base_v2_generator_ko.md @@ -33,47 +33,7 @@ Pretrained Electra Embeddings model, adapted from Hugging Face and curated to pr ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("electra_embeddings_koelectra_base_v2_generator","ko") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["나는 Spark NLP를 좋아합니다"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCol("text") - .setOutputCol("document") - -val tokenizer = new Tokenizer() - .setInputCols(Array("document")) - .setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("electra_embeddings_koelectra_base_v2_generator","ko") - .setInputCols(Array("document", "token")) - .setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) -val data = Seq("나는 Spark NLP를 좋아합니다").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_koelectra_base_v3_generator_ko.md b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_koelectra_base_v3_generator_ko.md index d08cb9f7252863..4d7a8573b5d12b 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_koelectra_base_v3_generator_ko.md +++ b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_koelectra_base_v3_generator_ko.md @@ -33,47 +33,7 @@ Pretrained Electra Embeddings model, adapted from Hugging Face and curated to pr ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("electra_embeddings_koelectra_base_v3_generator","ko") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["나는 Spark NLP를 좋아합니다"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCol("text") - .setOutputCol("document") - -val tokenizer = new Tokenizer() - .setInputCols(Array("document")) - .setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("electra_embeddings_koelectra_base_v3_generator","ko") - .setInputCols(Array("document", "token")) - .setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) -val data = Seq("나는 Spark NLP를 좋아합니다").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_koelectra_small_generator_ko.md b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_koelectra_small_generator_ko.md index e323b62a1bbec4..7283cc29579396 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_koelectra_small_generator_ko.md +++ b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_koelectra_small_generator_ko.md @@ -33,47 +33,7 @@ Pretrained Electra Embeddings model, adapted from Hugging Face and curated to pr ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("electra_embeddings_koelectra_small_generator","ko") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["나는 Spark NLP를 좋아합니다"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCol("text") - .setOutputCol("document") - -val tokenizer = new Tokenizer() - .setInputCols(Array("document")) - .setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("electra_embeddings_koelectra_small_generator","ko") - .setInputCols(Array("document", "token")) - .setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) -val data = Seq("나는 Spark NLP를 좋아합니다").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_kr_electra_generator_ko.md b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_kr_electra_generator_ko.md index 0aeb0d295a40c1..e2f35366f4f696 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_kr_electra_generator_ko.md +++ b/docs/_posts/ahmedlone127/2023-06-21-electra_embeddings_kr_electra_generator_ko.md @@ -33,47 +33,7 @@ Pretrained Electra Embeddings model, adapted from Hugging Face and curated to pr ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") - -embeddings = BertEmbeddings.pretrained("electra_embeddings_kr_electra_generator","ko") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["나는 Spark NLP를 좋아합니다"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCol("text") - .setOutputCol("document") - -val tokenizer = new Tokenizer() - .setInputCols(Array("document")) - .setOutputCol("token") - -val embeddings = BertEmbeddings.pretrained("electra_embeddings_kr_electra_generator","ko") - .setInputCols(Array("document", "token")) - .setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) -val data = Seq("나는 Spark NLP를 좋아합니다").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-legalectra_base_es.md b/docs/_posts/ahmedlone127/2023-06-21-legalectra_base_es.md index ed972bedaa7edf..4245ee3f06c1b4 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-legalectra_base_es.md +++ b/docs/_posts/ahmedlone127/2023-06-21-legalectra_base_es.md @@ -33,55 +33,7 @@ Pretrained Spanish Legal Word Embeddings model, adapted from Hugging Face and cu ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") - -electra = BertEmbeddings.pretrained("legalectra_base","es") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, electra]) - -data = spark.createDataFrame([["Amo a Spark NLP."]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCol("text") - .setOutputCol("document") - -val tokenizer = new Tokenizer() - .setInputCols(Array("document")) - .setOutputCol("token") - -val electra = BertEmbeddings.pretrained("legalectra_base","es") - .setInputCols(Array("document", "token")) - .setOutputCol("class") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, electra)) - -val data = Seq("Amo a Spark NLP.").toDS.toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("es.embed.bert.base_legal").predict("""Amo a Spark NLP.""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-legalectra_small_es.md b/docs/_posts/ahmedlone127/2023-06-21-legalectra_small_es.md index a2fb304397a6a0..153274bc0b1d2d 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-legalectra_small_es.md +++ b/docs/_posts/ahmedlone127/2023-06-21-legalectra_small_es.md @@ -33,55 +33,7 @@ Pretrained Spanish Legal Word Embeddings model, adapted from Hugging Face and cu ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") - -electra = BertEmbeddings.pretrained("legalectra_small","es") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, electra]) - -data = spark.createDataFrame([["Amo a Spark NLP."]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCol("text") - .setOutputCol("document") - -val tokenizer = new Tokenizer() - .setInputCols(Array("document")) - .setOutputCol("token") - -val electra = BertEmbeddings.pretrained("legalectra_small","es") - .setInputCols(Array("document", "token")) - .setOutputCol("class") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, electra)) - -val data = Seq("Amo a Spark NLP.").toDS.toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("es.embed.bert.small_legal").predict("""Amo a Spark NLP.""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-21-ms_bluebert_base_uncased_en.md b/docs/_posts/ahmedlone127/2023-06-21-ms_bluebert_base_uncased_en.md index bf7539ce60805d..14a2d437d7ec97 100644 --- a/docs/_posts/ahmedlone127/2023-06-21-ms_bluebert_base_uncased_en.md +++ b/docs/_posts/ahmedlone127/2023-06-21-ms_bluebert_base_uncased_en.md @@ -38,23 +38,7 @@ Next sentence prediction (NSP): the models concatenate two masked sentences as i ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -embeddings = BertEmbeddings.pretrained("ms_bluebert_base_uncased", "en") \ - .setInputCols(["sentence", "token"]) \ - .setOutputCol("embeddings") - -nlp_pipeline = Pipeline(stages=[document_assembler, sentence_detector, tokenizer, embeddings]) -``` -```scala -val embeddings = BertEmbeddings.pretrained("ms_bluebert_base_uncased", "en") - .setInputCols("sentence", "token") - .setOutputCol("embeddings") -val pipeline = new Pipeline().setStages(Array(document_assembler, sentence_detector, tokenizer, embeddings)) -``` -
{% include programmingLanguageSelectScalaPythonNLU.html %} diff --git a/docs/_posts/ahmedlone127/2023-06-26-deberta_embeddings_erlangshen_v2_chinese_sentencepiece_zh.md b/docs/_posts/ahmedlone127/2023-06-26-deberta_embeddings_erlangshen_v2_chinese_sentencepiece_zh.md index 169e9a31db0eb5..8c0c61af05239d 100644 --- a/docs/_posts/ahmedlone127/2023-06-26-deberta_embeddings_erlangshen_v2_chinese_sentencepiece_zh.md +++ b/docs/_posts/ahmedlone127/2023-06-26-deberta_embeddings_erlangshen_v2_chinese_sentencepiece_zh.md @@ -33,50 +33,7 @@ Pretrained DebertaV2ForMaskedLM model, adapted from Hugging Face and curated to ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} - -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") -embeddings = DeBertaEmbeddings.pretrained("deberta_embeddings_erlangshen_v2_chinese_sentencepiece","zh") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") \ - .setCaseSensitive(True) - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark-NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCol("text") - .setOutputCol("document") - -val tokenizer = new Tokenizer() - .setInputCols("document") - .setOutputCol("token") - -val embeddings = DeBertaEmbeddings.pretrained("deberta_embeddings_erlangshen_v2_chinese_sentencepiece","zh") - .setInputCols(Array("document", "token")) - .setOutputCol("embeddings") - .setCaseSensitive(True) - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark-NLP").toDS.toDF("text") - -val result = pipeline.fit(data).transform(data) -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-26-deberta_embeddings_mlm_test_en.md b/docs/_posts/ahmedlone127/2023-06-26-deberta_embeddings_mlm_test_en.md index 2ee4b096c3fc6c..386c355f2cfbf9 100644 --- a/docs/_posts/ahmedlone127/2023-06-26-deberta_embeddings_mlm_test_en.md +++ b/docs/_posts/ahmedlone127/2023-06-26-deberta_embeddings_mlm_test_en.md @@ -33,50 +33,7 @@ Pretrained DebertaEmbeddings model, adapted from Hugging Face and curated to pro ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} - -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") -embeddings = DeBertaEmbeddings.pretrained("deberta_embeddings_mlm_test","en") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") \ - .setCaseSensitive(True) - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCol("text") - .setOutputCol("document") - -val tokenizer = new Tokenizer() - .setInputCols("document") - .setOutputCol("token") - -val embeddings = DeBertaEmbeddings.pretrained("deberta_embeddings_mlm_test","en") - .setInputCols(Array("document", "token")) - .setOutputCol("embeddings") - .setCaseSensitive(true) - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP").toDS.toDF("text") - -val result = pipeline.fit(data).transform(data) -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-26-deberta_embeddings_spm_vie_vie.md b/docs/_posts/ahmedlone127/2023-06-26-deberta_embeddings_spm_vie_vie.md index 8f303ff4ccea17..5551148c7cf964 100644 --- a/docs/_posts/ahmedlone127/2023-06-26-deberta_embeddings_spm_vie_vie.md +++ b/docs/_posts/ahmedlone127/2023-06-26-deberta_embeddings_spm_vie_vie.md @@ -33,50 +33,7 @@ Pretrained DebertaEmbeddings model, adapted from Hugging Face and curated to pro ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} - -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") -embeddings = DeBertaEmbeddings.pretrained("deberta_embeddings_spm_vie","vie") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") \ - .setCaseSensitive(True) - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCol("text") - .setOutputCol("document") - -val tokenizer = new Tokenizer() - .setInputCols("document") - .setOutputCol("token") - -val embeddings = DeBertaEmbeddings.pretrained("deberta_embeddings_spm_vie","vie") - .setInputCols(Array("document", "token")) - .setOutputCol("embeddings") - .setCaseSensitive(true) - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP").toDS.toDF("text") - -val result = pipeline.fit(data).transform(data) -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-26-deberta_embeddings_tapt_nbme_v3_base_en.md b/docs/_posts/ahmedlone127/2023-06-26-deberta_embeddings_tapt_nbme_v3_base_en.md index 30f49fc915d1a6..2a3f75dd9b26c9 100644 --- a/docs/_posts/ahmedlone127/2023-06-26-deberta_embeddings_tapt_nbme_v3_base_en.md +++ b/docs/_posts/ahmedlone127/2023-06-26-deberta_embeddings_tapt_nbme_v3_base_en.md @@ -33,50 +33,7 @@ Pretrained DebertaEmbeddings model, adapted from Hugging Face and curated to pro ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} - -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") -embeddings = DeBertaEmbeddings.pretrained("deberta_embeddings_tapt_nbme_v3_base","en") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") \ - .setCaseSensitive(True) - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCol("text") - .setOutputCol("document") - -val tokenizer = new Tokenizer() - .setInputCols("document") - .setOutputCol("token") - -val embeddings = DeBertaEmbeddings.pretrained("deberta_embeddings_tapt_nbme_v3_base","en") - .setInputCols(Array("document", "token")) - .setOutputCol("embeddings") - .setCaseSensitive(true) - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP").toDS.toDF("text") - -val result = pipeline.fit(data).transform(data) -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-26-deberta_embeddings_vie_small_vie.md b/docs/_posts/ahmedlone127/2023-06-26-deberta_embeddings_vie_small_vie.md index 6b33b485b4900c..1551e827369464 100644 --- a/docs/_posts/ahmedlone127/2023-06-26-deberta_embeddings_vie_small_vie.md +++ b/docs/_posts/ahmedlone127/2023-06-26-deberta_embeddings_vie_small_vie.md @@ -33,50 +33,7 @@ Pretrained DebertaEmbeddings model, adapted from Hugging Face and curated to pro ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} - -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") -embeddings = DeBertaEmbeddings.pretrained("deberta_embeddings_vie_small","vie") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") \ - .setCaseSensitive(True) - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCol("text") - .setOutputCol("document") - -val tokenizer = new Tokenizer() - .setInputCols("document") - .setOutputCol("token") - -val embeddings = DeBertaEmbeddings.pretrained("deberta_embeddings_vie_small","vie") - .setInputCols(Array("document", "token")) - .setOutputCol("embeddings") - .setCaseSensitive(true) - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP").toDS.toDF("text") - -val result = pipeline.fit(data).transform(data) -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-26-deberta_embeddings_xsmall_dapt_scientific_papers_pubmed_en.md b/docs/_posts/ahmedlone127/2023-06-26-deberta_embeddings_xsmall_dapt_scientific_papers_pubmed_en.md index 50107e47b2c704..06f7be3e4bfa64 100644 --- a/docs/_posts/ahmedlone127/2023-06-26-deberta_embeddings_xsmall_dapt_scientific_papers_pubmed_en.md +++ b/docs/_posts/ahmedlone127/2023-06-26-deberta_embeddings_xsmall_dapt_scientific_papers_pubmed_en.md @@ -33,50 +33,7 @@ Pretrained DebertaEmbeddings model, adapted from Hugging Face and curated to pro ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} - -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") -embeddings = DeBertaEmbeddings.pretrained("deberta_embeddings_xsmall_dapt_scientific_papers_pubmed","en") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") \ - .setCaseSensitive(True) - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCol("text") - .setOutputCol("document") - -val tokenizer = new Tokenizer() - .setInputCols("document") - .setOutputCol("token") - -val embeddings = DeBertaEmbeddings.pretrained("deberta_embeddings_xsmall_dapt_scientific_papers_pubmed","en") - .setInputCols(Array("document", "token")) - .setOutputCol("embeddings") - .setCaseSensitive(true) - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP").toDS.toDF("text") - -val result = pipeline.fit(data).transform(data) -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-26-deberta_v3_small_en.md b/docs/_posts/ahmedlone127/2023-06-26-deberta_v3_small_en.md index 4f13393720b21f..4d5f8281662ff1 100644 --- a/docs/_posts/ahmedlone127/2023-06-26-deberta_v3_small_en.md +++ b/docs/_posts/ahmedlone127/2023-06-26-deberta_v3_small_en.md @@ -33,27 +33,7 @@ The DeBERTa model was proposed in [[https://arxiv.org/abs/2006.03654 DeBERTa: De ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -embeddings = DeBertaEmbeddings.pretrained("deberta_v3_small", "en") \ -.setInputCols("sentence", "token") \ -.setOutputCol("embeddings") -``` -```scala -val embeddings = DeBertaEmbeddings.pretrained("deberta_v3_small", "en") -.setInputCols("sentence", "token") -.setOutputCol("embeddings") -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("en.embed.deberta_v3_small").predict("""Put your text here.""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-26-deberta_v3_xsmall_en.md b/docs/_posts/ahmedlone127/2023-06-26-deberta_v3_xsmall_en.md index 9f3baaee954b9e..e0e826cfcf39ce 100644 --- a/docs/_posts/ahmedlone127/2023-06-26-deberta_v3_xsmall_en.md +++ b/docs/_posts/ahmedlone127/2023-06-26-deberta_v3_xsmall_en.md @@ -33,30 +33,8 @@ The DeBERTa model was proposed in [[https://arxiv.org/abs/2006.03654 DeBERTa: De ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -embeddings = DeBertaEmbeddings.pretrained("deberta_v3_xsmall", "en") \ -.setInputCols("sentence", "token") \ -.setOutputCol("embeddings") - -``` -```scala -val embeddings = DeBertaEmbeddings.pretrained("deberta_v3_xsmall", "en") -.setInputCols("sentence", "token") -.setOutputCol("embeddings") - -``` -{:.nlu-block} -```python -import nlu -nlu.load("en.embed.deberta_v3_xsmall").predict("""Put your text here.""") -``` - -
- {:.model-param}
diff --git a/docs/_posts/ahmedlone127/2023-06-26-distilbert_embeddings_BERTino_it.md b/docs/_posts/ahmedlone127/2023-06-26-distilbert_embeddings_BERTino_it.md index 7233e7dd8045ec..c51718ac20e32e 100644 --- a/docs/_posts/ahmedlone127/2023-06-26-distilbert_embeddings_BERTino_it.md +++ b/docs/_posts/ahmedlone127/2023-06-26-distilbert_embeddings_BERTino_it.md @@ -33,55 +33,7 @@ Pretrained DistilBERT Embeddings model, uploaded to Hugging Face, adapted and im ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = DistilBertEmbeddings.pretrained("distilbert_embeddings_BERTino","it") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Adoro Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = DistilBertEmbeddings.pretrained("distilbert_embeddings_BERTino","it") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Adoro Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("it.embed.BERTino").predict("""Adoro Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-26-distilbert_embeddings_distilbert_base_indonesian_id.md b/docs/_posts/ahmedlone127/2023-06-26-distilbert_embeddings_distilbert_base_indonesian_id.md index 4e1fad3954642c..324b0e4dc41bcc 100644 --- a/docs/_posts/ahmedlone127/2023-06-26-distilbert_embeddings_distilbert_base_indonesian_id.md +++ b/docs/_posts/ahmedlone127/2023-06-26-distilbert_embeddings_distilbert_base_indonesian_id.md @@ -33,55 +33,7 @@ Pretrained DistilBERT Embeddings model, uploaded to Hugging Face, adapted and im ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = DistilBertEmbeddings.pretrained("distilbert_embeddings_distilbert_base_indonesian","id") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Saya suka percikan NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = DistilBertEmbeddings.pretrained("distilbert_embeddings_distilbert_base_indonesian","id") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Saya suka percikan NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("id.embed.distilbert").predict("""Saya suka percikan NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-26-distilbert_embeddings_distilbert_base_uncased_sparse_85_unstructured_pruneofa_en.md b/docs/_posts/ahmedlone127/2023-06-26-distilbert_embeddings_distilbert_base_uncased_sparse_85_unstructured_pruneofa_en.md index 9202845526f1ca..b74288176549cb 100644 --- a/docs/_posts/ahmedlone127/2023-06-26-distilbert_embeddings_distilbert_base_uncased_sparse_85_unstructured_pruneofa_en.md +++ b/docs/_posts/ahmedlone127/2023-06-26-distilbert_embeddings_distilbert_base_uncased_sparse_85_unstructured_pruneofa_en.md @@ -33,55 +33,7 @@ Pretrained DistilBERT Embeddings model, uploaded to Hugging Face, adapted and im ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = DistilBertEmbeddings.pretrained("distilbert_embeddings_distilbert_base_uncased_sparse_85_unstructured_pruneofa","en") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = DistilBertEmbeddings.pretrained("distilbert_embeddings_distilbert_base_uncased_sparse_85_unstructured_pruneofa","en") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("en.embed.distilbert_base_uncased_sparse_85_unstructured_pruneofa").predict("""I love Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-26-distilbert_embeddings_distilbert_base_uncased_sparse_90_unstructured_pruneofa_en.md b/docs/_posts/ahmedlone127/2023-06-26-distilbert_embeddings_distilbert_base_uncased_sparse_90_unstructured_pruneofa_en.md index d172172048e1b6..8fac062d88d7e6 100644 --- a/docs/_posts/ahmedlone127/2023-06-26-distilbert_embeddings_distilbert_base_uncased_sparse_90_unstructured_pruneofa_en.md +++ b/docs/_posts/ahmedlone127/2023-06-26-distilbert_embeddings_distilbert_base_uncased_sparse_90_unstructured_pruneofa_en.md @@ -33,55 +33,7 @@ Pretrained DistilBERT Embeddings model, uploaded to Hugging Face, adapted and im ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = DistilBertEmbeddings.pretrained("distilbert_embeddings_distilbert_base_uncased_sparse_90_unstructured_pruneofa","en") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = DistilBertEmbeddings.pretrained("distilbert_embeddings_distilbert_base_uncased_sparse_90_unstructured_pruneofa","en") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("en.embed.distilbert_base_uncased_sparse_90_unstructured_pruneofa").predict("""I love Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-26-distilbert_embeddings_distilbert_fa_zwnj_base_fa.md b/docs/_posts/ahmedlone127/2023-06-26-distilbert_embeddings_distilbert_fa_zwnj_base_fa.md index 6e1c4d47a4a93b..4e137e618ae65e 100644 --- a/docs/_posts/ahmedlone127/2023-06-26-distilbert_embeddings_distilbert_fa_zwnj_base_fa.md +++ b/docs/_posts/ahmedlone127/2023-06-26-distilbert_embeddings_distilbert_fa_zwnj_base_fa.md @@ -33,55 +33,7 @@ Pretrained DistilBERT Embeddings model, uploaded to Hugging Face, adapted and im ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = DistilBertEmbeddings.pretrained("distilbert_embeddings_distilbert_fa_zwnj_base","fa") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["من عاشق جرقه NLP هستم"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = DistilBertEmbeddings.pretrained("distilbert_embeddings_distilbert_fa_zwnj_base","fa") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("من عاشق جرقه NLP هستم").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("fa.embed.distilbert_fa_zwnj_base").predict("""من عاشق جرقه NLP هستم""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-26-distilbert_embeddings_finetuned_sarcasm_classification_en.md b/docs/_posts/ahmedlone127/2023-06-26-distilbert_embeddings_finetuned_sarcasm_classification_en.md index 7df586e990947a..fcf58d1a18f0f6 100644 --- a/docs/_posts/ahmedlone127/2023-06-26-distilbert_embeddings_finetuned_sarcasm_classification_en.md +++ b/docs/_posts/ahmedlone127/2023-06-26-distilbert_embeddings_finetuned_sarcasm_classification_en.md @@ -33,55 +33,7 @@ Pretrained DistilBERT Embeddings model, adapted from Hugging Face and curated to ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") - -embeddings = DistilBertEmbeddings.pretrained("distilbert_embeddings_finetuned_sarcasm_classification","en") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["PUT YOUR STRING HERE."]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCol("text") - .setOutputCol("document") - -val tokenizer = new Tokenizer() - .setInputCols(Array("document")) - .setOutputCol("token") - -val embeddings = DistilBertEmbeddings.pretrained("distilbert_embeddings_finetuned_sarcasm_classification","en") - .setInputCols(Array("document", "token")) - .setOutputCol("class") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("PUT YOUR STRING HERE.").toDS.toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("en.embed.distil_bert.finetuned").predict("""PUT YOUR STRING HERE.""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-26-distilbert_embeddings_indic_transformers_bn_distilbert_bn.md b/docs/_posts/ahmedlone127/2023-06-26-distilbert_embeddings_indic_transformers_bn_distilbert_bn.md index 750a960889bb4e..2bd594b92ac0b6 100644 --- a/docs/_posts/ahmedlone127/2023-06-26-distilbert_embeddings_indic_transformers_bn_distilbert_bn.md +++ b/docs/_posts/ahmedlone127/2023-06-26-distilbert_embeddings_indic_transformers_bn_distilbert_bn.md @@ -33,55 +33,7 @@ Pretrained DistilBERT Embeddings model, uploaded to Hugging Face, adapted and im ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = DistilBertEmbeddings.pretrained("distilbert_embeddings_indic_transformers_bn_distilbert","bn") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["আমি স্পার্ক এনএলপি ভালোবাসি"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = DistilBertEmbeddings.pretrained("distilbert_embeddings_indic_transformers_bn_distilbert","bn") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("আমি স্পার্ক এনএলপি ভালোবাসি").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("bn.embed.indic_transformers_bn_distilbert").predict("""আমি স্পার্ক এনএলপি ভালোবাসি""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-26-distilbert_embeddings_indic_transformers_hi_distilbert_hi.md b/docs/_posts/ahmedlone127/2023-06-26-distilbert_embeddings_indic_transformers_hi_distilbert_hi.md index 709aae71d5d5cb..b5b435182a7266 100644 --- a/docs/_posts/ahmedlone127/2023-06-26-distilbert_embeddings_indic_transformers_hi_distilbert_hi.md +++ b/docs/_posts/ahmedlone127/2023-06-26-distilbert_embeddings_indic_transformers_hi_distilbert_hi.md @@ -33,55 +33,7 @@ Pretrained DistilBERT Embeddings model, uploaded to Hugging Face, adapted and im ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = DistilBertEmbeddings.pretrained("distilbert_embeddings_indic_transformers_hi_distilbert","hi") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["मुझे स्पार्क एनएलपी पसंद है"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = DistilBertEmbeddings.pretrained("distilbert_embeddings_indic_transformers_hi_distilbert","hi") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("मुझे स्पार्क एनएलपी पसंद है").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("hi.embed.indic_transformers_hi_distilbert").predict("""मुझे स्पार्क एनएलपी पसंद है""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-26-distilbert_embeddings_javanese_distilbert_small_imdb_jv.md b/docs/_posts/ahmedlone127/2023-06-26-distilbert_embeddings_javanese_distilbert_small_imdb_jv.md index 9ddef8bf45a2fc..ec085b830ca872 100644 --- a/docs/_posts/ahmedlone127/2023-06-26-distilbert_embeddings_javanese_distilbert_small_imdb_jv.md +++ b/docs/_posts/ahmedlone127/2023-06-26-distilbert_embeddings_javanese_distilbert_small_imdb_jv.md @@ -33,55 +33,7 @@ Pretrained DistilBERT Embeddings model, uploaded to Hugging Face, adapted and im ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = DistilBertEmbeddings.pretrained("distilbert_embeddings_javanese_distilbert_small_imdb","jv") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = DistilBertEmbeddings.pretrained("distilbert_embeddings_javanese_distilbert_small_imdb","jv") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("jv.embed.javanese_distilbert_small_imdb").predict("""I love Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-26-distilbert_embeddings_javanese_distilbert_small_jv.md b/docs/_posts/ahmedlone127/2023-06-26-distilbert_embeddings_javanese_distilbert_small_jv.md index 15b0dcb0b86cda..abf161154855c8 100644 --- a/docs/_posts/ahmedlone127/2023-06-26-distilbert_embeddings_javanese_distilbert_small_jv.md +++ b/docs/_posts/ahmedlone127/2023-06-26-distilbert_embeddings_javanese_distilbert_small_jv.md @@ -33,55 +33,7 @@ Pretrained DistilBERT Embeddings model, uploaded to Hugging Face, adapted and im ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = DistilBertEmbeddings.pretrained("distilbert_embeddings_javanese_distilbert_small","jv") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = DistilBertEmbeddings.pretrained("distilbert_embeddings_javanese_distilbert_small","jv") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("jv.embed.distilbert").predict("""I love Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-26-distilbert_embeddings_malaysian_distilbert_small_ms.md b/docs/_posts/ahmedlone127/2023-06-26-distilbert_embeddings_malaysian_distilbert_small_ms.md index 9092f73999f3c2..81dc1d74b54af2 100644 --- a/docs/_posts/ahmedlone127/2023-06-26-distilbert_embeddings_malaysian_distilbert_small_ms.md +++ b/docs/_posts/ahmedlone127/2023-06-26-distilbert_embeddings_malaysian_distilbert_small_ms.md @@ -33,55 +33,7 @@ Pretrained DistilBERT Embeddings model, uploaded to Hugging Face, adapted and im ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = DistilBertEmbeddings.pretrained("distilbert_embeddings_malaysian_distilbert_small","ms") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Saya suka Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = DistilBertEmbeddings.pretrained("distilbert_embeddings_malaysian_distilbert_small","ms") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Saya suka Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("ms.embed.distilbert").predict("""Saya suka Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-26-distilbert_embeddings_marathi_distilbert_mr.md b/docs/_posts/ahmedlone127/2023-06-26-distilbert_embeddings_marathi_distilbert_mr.md index 9ca015f1047ab5..1b342179ec3499 100644 --- a/docs/_posts/ahmedlone127/2023-06-26-distilbert_embeddings_marathi_distilbert_mr.md +++ b/docs/_posts/ahmedlone127/2023-06-26-distilbert_embeddings_marathi_distilbert_mr.md @@ -33,55 +33,7 @@ Pretrained DistilBERT Embeddings model, uploaded to Hugging Face, adapted and im ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = DistilBertEmbeddings.pretrained("distilbert_embeddings_marathi_distilbert","mr") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["मला स्पार्क एनएलपी आवडते"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = DistilBertEmbeddings.pretrained("distilbert_embeddings_marathi_distilbert","mr") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("मला स्पार्क एनएलपी आवडते").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("mr.embed.distilbert").predict("""मला स्पार्क एनएलपी आवडते""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-26-roberta_base_swiss_legal_gsw.md b/docs/_posts/ahmedlone127/2023-06-26-roberta_base_swiss_legal_gsw.md index 8cc4701ee197fc..755bba585f5518 100644 --- a/docs/_posts/ahmedlone127/2023-06-26-roberta_base_swiss_legal_gsw.md +++ b/docs/_posts/ahmedlone127/2023-06-26-roberta_base_swiss_legal_gsw.md @@ -33,20 +33,7 @@ Pretrained Legal Roberta Embeddings model, adapted from Hugging Face and curated ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -sentence_embeddings = RoBertaEmbeddings.pretrained("roberta_base_swiss_legal", "gsw")\ - .setInputCols(["sentence"])\ - .setOutputCol("embeddings") -``` -```scala -val sentence_embeddings = RoBertaEmbeddings.pretrained("roberta_base_swiss_legal", "gsw") - .setInputCols("sentence") - .setOutputCol("embeddings")) -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_BR_BERTo_pt.md b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_BR_BERTo_pt.md index aa0ec4ff6f25d1..5e12c752d13a8a 100644 --- a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_BR_BERTo_pt.md +++ b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_BR_BERTo_pt.md @@ -33,55 +33,7 @@ Pretrained RoBERTa Embeddings model, uploaded to Hugging Face, adapted and impor ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_BR_BERTo","pt") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Eu amo Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_BR_BERTo","pt") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Eu amo Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("pt.embed.BR_BERTo").predict("""Eu amo Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_Bible_roberta_base_en.md b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_Bible_roberta_base_en.md index ae2c8f33cc9d83..055209da574a9c 100644 --- a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_Bible_roberta_base_en.md +++ b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_Bible_roberta_base_en.md @@ -33,55 +33,7 @@ Pretrained RoBERTa Embeddings model, uploaded to Hugging Face, adapted and impor ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_Bible_roberta_base","en") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_Bible_roberta_base","en") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("en.embed.Bible_roberta_base").predict("""I love Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_KNUBert_kn.md b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_KNUBert_kn.md index f5810aa56beba4..693859de616e84 100644 --- a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_KNUBert_kn.md +++ b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_KNUBert_kn.md @@ -33,55 +33,7 @@ Pretrained RoBERTa Embeddings model, uploaded to Hugging Face, adapted and impor ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_KNUBert","kn") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["ನಾನು ಸ್ಪಾರ್ಕ್ ಎನ್ಎಲ್ಪಿ ಪ್ರೀತಿಸುತ್ತೇನೆ"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_KNUBert","kn") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("ನಾನು ಸ್ಪಾರ್ಕ್ ಎನ್ಎಲ್ಪಿ ಪ್ರೀತಿಸುತ್ತೇನೆ").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("kn.embed.KNUBert").predict("""ನಾನು ಸ್ಪಾರ್ಕ್ ಎನ್ಎಲ್ಪಿ ಪ್ರೀತಿಸುತ್ತೇನೆ""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_KanBERTo_kn.md b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_KanBERTo_kn.md index 3b7e500c1b61cf..d672d2d0e88788 100644 --- a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_KanBERTo_kn.md +++ b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_KanBERTo_kn.md @@ -33,55 +33,7 @@ Pretrained RoBERTa Embeddings model, uploaded to Hugging Face, adapted and impor ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_KanBERTo","kn") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["ನಾನು ಸ್ಪಾರ್ಕ್ ಎನ್ಎಲ್ಪಿ ಪ್ರೀತಿಸುತ್ತೇನೆ"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_KanBERTo","kn") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("ನಾನು ಸ್ಪಾರ್ಕ್ ಎನ್ಎಲ್ಪಿ ಪ್ರೀತಿಸುತ್ತೇನೆ").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("kn.embed.KanBERTo").predict("""ನಾನು ಸ್ಪಾರ್ಕ್ ಎನ್ಎಲ್ಪಿ ಪ್ರೀತಿಸುತ್ತೇನೆ""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_MedRoBERTa.nl_nl.md b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_MedRoBERTa.nl_nl.md index 954d50c138bddb..d9420dc2bdeed1 100644 --- a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_MedRoBERTa.nl_nl.md +++ b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_MedRoBERTa.nl_nl.md @@ -33,47 +33,7 @@ Pretrained RoBERTa Embeddings model, uploaded to Hugging Face, adapted and impor ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") - -embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_MedRoBERTa.nl","nl") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Ik hou van vonk nlp"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCol("text") - .setOutputCol("document") - -val tokenizer = new Tokenizer() - .setInputCols(Array("document")) - .setOutputCol("token") - -val embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_MedRoBERTa.nl","nl") - .setInputCols(Array("document", "token")) - .setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) -val data = Seq("Ik hou van vonk nlp").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_RoBERTalex_es.md b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_RoBERTalex_es.md index 6db5ee04644354..61a76ea2ee1c9f 100644 --- a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_RoBERTalex_es.md +++ b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_RoBERTalex_es.md @@ -33,55 +33,7 @@ RoBERTa Legal Embeddings, trained by `PlanTL-GOB-ES`. ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_RoBERTalex","es") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Me encanta chispa nlp"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_RoBERTalex","es") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Me encanta chispa nlp").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("es.embed.RoBERTalex").predict("""Me encanta chispa nlp""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_RuPERTa_base_es.md b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_RuPERTa_base_es.md index 70dbfe309f033b..57cd226d06c2fc 100644 --- a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_RuPERTa_base_es.md +++ b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_RuPERTa_base_es.md @@ -33,55 +33,7 @@ Pretrained RoBERTa Embeddings model, uploaded to Hugging Face, adapted and impor ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_RuPERTa_base","es") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Me encanta chispa nlp"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_RuPERTa_base","es") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Me encanta chispa nlp").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("es.embed.RuPERTa_base").predict("""Me encanta chispa nlp""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_SecRoBERTa_en.md b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_SecRoBERTa_en.md index d5ad2b1a0d58e3..50ce4ede430255 100644 --- a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_SecRoBERTa_en.md +++ b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_SecRoBERTa_en.md @@ -33,55 +33,7 @@ Pretrained RoBERTa Embeddings model, uploaded to Hugging Face, adapted and impor ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_SecRoBERTa","en") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_SecRoBERTa","en") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("en.embed.SecRoBERTa").predict("""I love Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_bertin_base_gaussian_es.md b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_bertin_base_gaussian_es.md index 6920c29287a315..8f82ae6d7ebfe2 100644 --- a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_bertin_base_gaussian_es.md +++ b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_bertin_base_gaussian_es.md @@ -33,55 +33,7 @@ Pretrained RoBERTa Embeddings model, uploaded to Hugging Face, adapted and impor ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_bertin_base_gaussian","es") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Me encanta chispa nlp"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_bertin_base_gaussian","es") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Me encanta chispa nlp").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("es.embed.bertin_base_gaussian").predict("""Me encanta chispa nlp""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_bertin_base_gaussian_exp_512seqlen_es.md b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_bertin_base_gaussian_exp_512seqlen_es.md index 0dbfd7bbf1f936..dd9f71a25b111b 100644 --- a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_bertin_base_gaussian_exp_512seqlen_es.md +++ b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_bertin_base_gaussian_exp_512seqlen_es.md @@ -33,55 +33,7 @@ Pretrained RoBERTa Embeddings model, uploaded to Hugging Face, adapted and impor ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_bertin_base_gaussian_exp_512seqlen","es") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Me encanta chispa nlp"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_bertin_base_gaussian_exp_512seqlen","es") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Me encanta chispa nlp").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("es.embed.bertin_base_gaussian_exp_512seqlen").predict("""Me encanta chispa nlp""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_bertin_base_random_es.md b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_bertin_base_random_es.md index 9653c8545ae5ba..202438105a4e44 100644 --- a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_bertin_base_random_es.md +++ b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_bertin_base_random_es.md @@ -33,55 +33,7 @@ Pretrained RoBERTa Embeddings model, uploaded to Hugging Face, adapted and impor ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_bertin_base_random","es") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Me encanta chispa nlp"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_bertin_base_random","es") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Me encanta chispa nlp").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("es.embed.bertin_base_random").predict("""Me encanta chispa nlp""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_bertin_base_random_exp_512seqlen_es.md b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_bertin_base_random_exp_512seqlen_es.md index cba118e80030f6..5a21435e068d64 100644 --- a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_bertin_base_random_exp_512seqlen_es.md +++ b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_bertin_base_random_exp_512seqlen_es.md @@ -33,55 +33,7 @@ Pretrained RoBERTa Embeddings model, uploaded to Hugging Face, adapted and impor ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_bertin_base_random_exp_512seqlen","es") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Me encanta chispa nlp"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_bertin_base_random_exp_512seqlen","es") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Me encanta chispa nlp").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("es.embed.bertin_base_random_exp_512seqlen").predict("""Me encanta chispa nlp""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_bertin_base_stepwise_es.md b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_bertin_base_stepwise_es.md index b668d63c59d89c..3b8fc35f977432 100644 --- a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_bertin_base_stepwise_es.md +++ b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_bertin_base_stepwise_es.md @@ -33,55 +33,7 @@ Pretrained RoBERTa Embeddings model, uploaded to Hugging Face, adapted and impor ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_bertin_base_stepwise","es") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Me encanta chispa nlp"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_bertin_base_stepwise","es") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Me encanta chispa nlp").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("es.embed.bertin_base_stepwise").predict("""Me encanta chispa nlp""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_bertin_base_stepwise_exp_512seqlen_es.md b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_bertin_base_stepwise_exp_512seqlen_es.md index ef023c27d100e6..cfe7544bc01cb8 100644 --- a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_bertin_base_stepwise_exp_512seqlen_es.md +++ b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_bertin_base_stepwise_exp_512seqlen_es.md @@ -33,55 +33,7 @@ Pretrained RoBERTa Embeddings model, uploaded to Hugging Face, adapted and impor ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_bertin_base_stepwise_exp_512seqlen","es") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Me encanta chispa nlp"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_bertin_base_stepwise_exp_512seqlen","es") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Me encanta chispa nlp").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("es.embed.bertin_base_stepwise_exp_512seqlen").predict("""Me encanta chispa nlp""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_bertin_roberta_base_spanish_es.md b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_bertin_roberta_base_spanish_es.md index 462366bdad47ef..fc23492b15d492 100644 --- a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_bertin_roberta_base_spanish_es.md +++ b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_bertin_roberta_base_spanish_es.md @@ -33,55 +33,7 @@ Pretrained RoBERTa Embeddings model for Spanish Language, trained within the Ber ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_bertin_roberta_base_spanish","es") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Me encanta chispa nlp"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_bertin_roberta_base_spanish","es") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Me encanta chispa nlp").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("es.embed.bertin_roberta_base_spanish").predict("""Me encanta chispa nlp""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_bertin_roberta_large_spanish_es.md b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_bertin_roberta_large_spanish_es.md index 1a10a0441cc6d9..e52590f9051e96 100644 --- a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_bertin_roberta_large_spanish_es.md +++ b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_bertin_roberta_large_spanish_es.md @@ -33,55 +33,7 @@ Pretrained RoBERTa Embeddings model, uploaded to Hugging Face, adapted and impor ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_bertin_roberta_large_spanish","es") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Me encanta chispa nlp"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_bertin_roberta_large_spanish","es") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Me encanta chispa nlp").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("es.embed.bertin_roberta_large_spanish").predict("""Me encanta chispa nlp""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_distilroberta_base_climate_d_en.md b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_distilroberta_base_climate_d_en.md index 235066a9fad86d..40748e78ff58c5 100644 --- a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_distilroberta_base_climate_d_en.md +++ b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_distilroberta_base_climate_d_en.md @@ -35,55 +35,7 @@ Sampling strategy d: As expressed in the author's paper [here](https://arxiv.o ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_distilroberta_base_climate_d","en") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_distilroberta_base_climate_d","en") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("en.embed.distilroberta_base_climate_d").predict("""I love Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_distilroberta_base_climate_d_s_en.md b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_distilroberta_base_climate_d_s_en.md index bd8c33572f99c2..f7c565016f71f6 100644 --- a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_distilroberta_base_climate_d_s_en.md +++ b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_distilroberta_base_climate_d_s_en.md @@ -35,55 +35,7 @@ Sampling strategy ds:As expressed in the author's paper [here](https://arxiv.o ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_distilroberta_base_climate_d_s","en") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_distilroberta_base_climate_d_s","en") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("en.embed.distilroberta_base_climate_d_s").predict("""I love Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_distilroberta_base_climate_f_en.md b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_distilroberta_base_climate_f_en.md index 1c3db397a2a509..c74ae36804270b 100644 --- a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_distilroberta_base_climate_f_en.md +++ b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_distilroberta_base_climate_f_en.md @@ -35,55 +35,7 @@ Sampling strategy f: As expressed in the author's paper [here](https://arxiv.o ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_distilroberta_base_climate_f","en") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_distilroberta_base_climate_f","en") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("en.embed.distilroberta_base_climate_f").predict("""I love Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_distilroberta_base_finetuned_jira_qt_issue_title_en.md b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_distilroberta_base_finetuned_jira_qt_issue_title_en.md index f9a2af7472f6ca..c5b1aa26f94d8a 100644 --- a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_distilroberta_base_finetuned_jira_qt_issue_title_en.md +++ b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_distilroberta_base_finetuned_jira_qt_issue_title_en.md @@ -33,55 +33,7 @@ Pretrained RoBERTa Embeddings model, uploaded to Hugging Face, adapted and impor ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_distilroberta_base_finetuned_jira_qt_issue_title","en") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_distilroberta_base_finetuned_jira_qt_issue_title","en") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("en.embed.distilroberta_base_finetuned_jira_qt_issue_title").predict("""I love Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_distilroberta_base_finetuned_jira_qt_issue_titles_and_bodies_en.md b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_distilroberta_base_finetuned_jira_qt_issue_titles_and_bodies_en.md index b9661e848333d1..e091a4599df359 100644 --- a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_distilroberta_base_finetuned_jira_qt_issue_titles_and_bodies_en.md +++ b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_distilroberta_base_finetuned_jira_qt_issue_titles_and_bodies_en.md @@ -33,55 +33,7 @@ Pretrained RoBERTa Embeddings model, uploaded to Hugging Face, adapted and impor ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_distilroberta_base_finetuned_jira_qt_issue_titles_and_bodies","en") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_distilroberta_base_finetuned_jira_qt_issue_titles_and_bodies","en") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("en.embed.distilroberta_base_finetuned_jira_qt_issue_titles_and_bodies").predict("""I love Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_fairlex_ecthr_minilm_en.md b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_fairlex_ecthr_minilm_en.md index 5a32da11d9de7d..86d1ffbd95cbaa 100644 --- a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_fairlex_ecthr_minilm_en.md +++ b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_fairlex_ecthr_minilm_en.md @@ -33,55 +33,7 @@ Pretrained RoBERTa Embeddings model, uploaded to Hugging Face, adapted and impor ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_fairlex_ecthr_minilm","en") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_fairlex_ecthr_minilm","en") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("en.embed.fairlex_ecthr_minilm").predict("""I love Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_fairlex_scotus_minilm_en.md b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_fairlex_scotus_minilm_en.md index 773d7bcf2c57d3..02116808b9ed43 100644 --- a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_fairlex_scotus_minilm_en.md +++ b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_fairlex_scotus_minilm_en.md @@ -33,55 +33,7 @@ Pretrained RoBERTa Embeddings model, uploaded to Hugging Face, adapted and impor ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_fairlex_scotus_minilm","en") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_fairlex_scotus_minilm","en") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("en.embed.fairlex_scotus_minilm").predict("""I love Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_hindi_hi.md b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_hindi_hi.md index 01ad5f075cbd15..d3d98b4cd322d6 100644 --- a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_hindi_hi.md +++ b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_hindi_hi.md @@ -33,55 +33,7 @@ Pretrained RoBERTa Embeddings model, adapted from Hugging Face and curated to pr ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") - -embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_hindi","hi") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["PUT YOUR STRING HERE"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCols(Array("text")) - .setOutputCols(Array("document")) - -val tokenizer = new Tokenizer() - .setInputCols("document") - .setOutputCol("token") - -val embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_hindi","hi") - .setInputCols(Array("document", "token")) - .setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("PUT YOUR STRING HERE").toDS.toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("hi.embed.roberta").predict("""PUT YOUR STRING HERE""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_indic_transformers_hi_roberta_hi.md b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_indic_transformers_hi_roberta_hi.md index f69f15963140ca..c126e7c873af74 100644 --- a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_indic_transformers_hi_roberta_hi.md +++ b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_indic_transformers_hi_roberta_hi.md @@ -33,55 +33,7 @@ Pretrained RoBERTa Embeddings model, uploaded to Hugging Face, adapted and impor ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_indic_transformers_hi_roberta","hi") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["मुझे स्पार्क एनएलपी पसंद है"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_indic_transformers_hi_roberta","hi") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("मुझे स्पार्क एनएलपी पसंद है").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("hi.embed.indic_transformers_hi_roberta").predict("""मुझे स्पार्क एनएलपी पसंद है""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_indic_transformers_te_roberta_te.md b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_indic_transformers_te_roberta_te.md index 08583c9e8b8960..5177c5bc6d1af1 100644 --- a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_indic_transformers_te_roberta_te.md +++ b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_indic_transformers_te_roberta_te.md @@ -33,55 +33,7 @@ Pretrained RoBERTa Embeddings model, uploaded to Hugging Face, adapted and impor ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_indic_transformers_te_roberta","te") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["నేను స్పార్క్ nlp ను ప్రేమిస్తున్నాను"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_indic_transformers_te_roberta","te") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("నేను స్పార్క్ nlp ను ప్రేమిస్తున్నాను").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("te.embed.indic_transformers_te_roberta").predict("""నేను స్పార్క్ nlp ను ప్రేమిస్తున్నాను""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_indo_roberta_small_id.md b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_indo_roberta_small_id.md index 6331c54d43f671..64a7f478625df0 100644 --- a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_indo_roberta_small_id.md +++ b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_indo_roberta_small_id.md @@ -33,55 +33,7 @@ Pretrained RoBERTa Embeddings model, uploaded to Hugging Face, adapted and impor ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_indo_roberta_small","id") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Saya suka percikan NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_indo_roberta_small","id") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Saya suka percikan NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("id.embed.indo_roberta_small").predict("""Saya suka percikan NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_indonesian_roberta_base_id.md b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_indonesian_roberta_base_id.md index 77ff6a04ce597b..aa0a3123954d4c 100644 --- a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_indonesian_roberta_base_id.md +++ b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_indonesian_roberta_base_id.md @@ -33,55 +33,7 @@ Pretrained RoBERTa Embeddings model, uploaded to Hugging Face, adapted and impor ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_indonesian_roberta_base","id") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Saya suka percikan NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_indonesian_roberta_base","id") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Saya suka percikan NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("id.embed.indonesian_roberta_base").predict("""Saya suka percikan NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_javanese_roberta_small_imdb_jv.md b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_javanese_roberta_small_imdb_jv.md index 19408b12a0bed8..3f42ce73af9a6b 100644 --- a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_javanese_roberta_small_imdb_jv.md +++ b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_javanese_roberta_small_imdb_jv.md @@ -33,55 +33,7 @@ Pretrained RoBERTa Embeddings model, uploaded to Hugging Face, adapted and impor ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_javanese_roberta_small_imdb","jv") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_javanese_roberta_small_imdb","jv") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("jv.embed.javanese_roberta_small_imdb").predict("""I love Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_javanese_roberta_small_jv.md b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_javanese_roberta_small_jv.md index 1da0c11ee775fd..29c0824369b104 100644 --- a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_javanese_roberta_small_jv.md +++ b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_javanese_roberta_small_jv.md @@ -33,55 +33,7 @@ Pretrained RoBERTa Embeddings model, uploaded to Hugging Face, adapted and impor ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_javanese_roberta_small","jv") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_javanese_roberta_small","jv") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("jv.embed.javanese_roberta_small").predict("""I love Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_jurisbert_es.md b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_jurisbert_es.md index 685198ff9883b0..d54c0e557f087d 100644 --- a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_jurisbert_es.md +++ b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_jurisbert_es.md @@ -33,55 +33,7 @@ Pretrained RoBERTa Embeddings model, uploaded to Hugging Face, adapted and impor ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_jurisbert","es") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Me encanta chispa nlp"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_jurisbert","es") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Me encanta chispa nlp").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("es.embed.jurisbert").predict("""Me encanta chispa nlp""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_mlm_spanish_roberta_base_es.md b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_mlm_spanish_roberta_base_es.md index 0ad5d20ef3fe54..24cdd395bb019f 100644 --- a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_mlm_spanish_roberta_base_es.md +++ b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_mlm_spanish_roberta_base_es.md @@ -33,55 +33,7 @@ Pretrained RoBERTa Embeddings model, uploaded to Hugging Face, adapted and impor ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_mlm_spanish_roberta_base","es") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Me encanta chispa nlp"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_mlm_spanish_roberta_base","es") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Me encanta chispa nlp").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("es.embed.mlm_spanish_roberta_base").predict("""Me encanta chispa nlp""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_muppet_roberta_base_en.md b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_muppet_roberta_base_en.md index 238181eea3e7a3..aa2ad61218e6f7 100644 --- a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_muppet_roberta_base_en.md +++ b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_muppet_roberta_base_en.md @@ -33,55 +33,7 @@ Pretrained RoBERTa Embeddings model, uploaded to Hugging Face, adapted and impor ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_muppet_roberta_base","en") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_muppet_roberta_base","en") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("en.embed.muppet_roberta_base").predict("""I love Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_robasqu_eu.md b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_robasqu_eu.md index 90ed07b322abfb..538cbb13655710 100644 --- a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_robasqu_eu.md +++ b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_robasqu_eu.md @@ -33,55 +33,7 @@ Pretrained RoBERTa Embeddings model, adapted from Hugging Face and curated to pr ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") - -embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_robasqu","eu") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["PUT YOUR STRING HERE"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCols(Array("text")) - .setOutputCols(Array("document")) - -val tokenizer = new Tokenizer() - .setInputCols("document") - .setOutputCol("token") - -val embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_robasqu","eu") - .setInputCols(Array("document", "token")) - .setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("PUT YOUR STRING HERE").toDS.toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("eu.embed.roberta").predict("""PUT YOUR STRING HERE""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_roberta_base_bne_es.md b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_roberta_base_bne_es.md index 4412023121038a..2d9c469f33f322 100644 --- a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_roberta_base_bne_es.md +++ b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_roberta_base_bne_es.md @@ -33,55 +33,7 @@ Pretrained RoBERTa Embeddings model, uploaded to Hugging Face, adapted and impor ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_roberta_base_bne","es") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Me encanta chispa nlp"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_roberta_base_bne","es") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Me encanta chispa nlp").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("es.embed.roberta_base_bne").predict("""Me encanta chispa nlp""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_roberta_base_indonesian_522M_id.md b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_roberta_base_indonesian_522M_id.md index 30a5a85951db7d..afb1ba3a5f6f53 100644 --- a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_roberta_base_indonesian_522M_id.md +++ b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_roberta_base_indonesian_522M_id.md @@ -33,55 +33,7 @@ Pretrained RoBERTa Embeddings model, uploaded to Hugging Face, adapted and impor ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_roberta_base_indonesian_522M","id") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Saya suka percikan NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_roberta_base_indonesian_522M","id") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Saya suka percikan NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("id.embed.roberta_base_indonesian_522M").predict("""Saya suka percikan NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_roberta_base_russian_v0_ru.md b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_roberta_base_russian_v0_ru.md index 5d49a37350de0f..db6efdbfb93358 100644 --- a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_roberta_base_russian_v0_ru.md +++ b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_roberta_base_russian_v0_ru.md @@ -33,55 +33,7 @@ Pretrained RoBERTa Embeddings model, uploaded to Hugging Face, adapted and impor ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_roberta_base_russian_v0","ru") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Я люблю искра NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_roberta_base_russian_v0","ru") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Я люблю искра NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("ru.embed.roberta_base_russian_v0").predict("""Я люблю искра NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_roberta_base_wechsel_chinese_zh.md b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_roberta_base_wechsel_chinese_zh.md index 6b0bc0e8bcf727..35d790ffc2fca4 100644 --- a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_roberta_base_wechsel_chinese_zh.md +++ b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_roberta_base_wechsel_chinese_zh.md @@ -33,55 +33,7 @@ Pretrained RoBERTa Embeddings model, uploaded to Hugging Face, adapted and impor ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_roberta_base_wechsel_chinese","zh") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["我喜欢Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_roberta_base_wechsel_chinese","zh") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("我喜欢Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("zh.embed.roberta_base_wechsel_chinese").predict("""我喜欢Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_roberta_base_wechsel_french_fr.md b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_roberta_base_wechsel_french_fr.md index 61dc5c17eb026f..1a39fce2f4fc59 100644 --- a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_roberta_base_wechsel_french_fr.md +++ b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_roberta_base_wechsel_french_fr.md @@ -33,55 +33,7 @@ Pretrained RoBERTa Embeddings model, uploaded to Hugging Face, adapted and impor ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_roberta_base_wechsel_french","fr") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["J'adore Spark Nlp"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_roberta_base_wechsel_french","fr") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("J'adore Spark Nlp").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("fr.embed.roberta_base_wechsel_french").predict("""J'adore Spark Nlp""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_roberta_base_wechsel_german_de.md b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_roberta_base_wechsel_german_de.md index f1c52bdc3df88e..7c75d9b9934994 100644 --- a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_roberta_base_wechsel_german_de.md +++ b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_roberta_base_wechsel_german_de.md @@ -33,55 +33,7 @@ Pretrained RoBERTa Embeddings model, uploaded to Hugging Face, adapted and impor ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_roberta_base_wechsel_german","de") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Ich liebe Funken NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_roberta_base_wechsel_german","de") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Ich liebe Funken NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("de.embed.roberta_base_wechsel_german").predict("""Ich liebe Funken NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_roberta_ko_small_ko.md b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_roberta_ko_small_ko.md index 12b377d5c0d070..51d6e2296ad2c3 100644 --- a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_roberta_ko_small_ko.md +++ b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_roberta_ko_small_ko.md @@ -33,55 +33,7 @@ Pretrained RoBERTa Embeddings model, uploaded to Hugging Face, adapted and impor ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_roberta_ko_small","ko") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["나는 Spark NLP를 좋아합니다"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_roberta_ko_small","ko") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("나는 Spark NLP를 좋아합니다").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("ko.embed.roberta_ko_small").predict("""나는 Spark NLP를 좋아합니다""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_roberta_pubmed_en.md b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_roberta_pubmed_en.md index e3a64ba4f52a29..f2c124601a0532 100644 --- a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_roberta_pubmed_en.md +++ b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_roberta_pubmed_en.md @@ -33,55 +33,7 @@ Pretrained RoBERTa Embeddings model, uploaded to Hugging Face, adapted and impor ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_roberta_pubmed","en") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["I love Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_roberta_pubmed","en") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("I love Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("en.embed.roberta_pubmed").predict("""I love Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_roberta_urdu_small_ur.md b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_roberta_urdu_small_ur.md index 8f5a603c1976a8..c2726b34c76779 100644 --- a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_roberta_urdu_small_ur.md +++ b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_roberta_urdu_small_ur.md @@ -33,55 +33,7 @@ Pretrained RoBERTa Embeddings model, uploaded to Hugging Face, adapted and impor ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_roberta_urdu_small","ur") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["مجھے سپارک این ایل پی سے محبت ہے"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_roberta_urdu_small","ur") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("مجھے سپارک این ایل پی سے محبت ہے").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("ur.embed.roberta_urdu_small").predict("""مجھے سپارک این ایل پی سے محبت ہے""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_robertinh_gl.md b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_robertinh_gl.md index d587c92f3a8366..d5d2d16ed8bac9 100644 --- a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_robertinh_gl.md +++ b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_robertinh_gl.md @@ -33,55 +33,7 @@ Pretrained RoBERTa Embeddings model, adapted from Hugging Face and curated to pr ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") - -embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_robertinh","gl") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["PUT YOUR STRING HERE"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCols(Array("text")) - .setOutputCols(Array("document")) - -val tokenizer = new Tokenizer() - .setInputCols("document") - .setOutputCol("token") - -val embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_robertinh","gl") - .setInputCols(Array("document", "token")) - .setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("PUT YOUR STRING HERE").toDS.toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("gl.embed.roberta").predict("""PUT YOUR STRING HERE""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_ruperta_base_finetuned_spa_constitution_en.md b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_ruperta_base_finetuned_spa_constitution_en.md index 2b84c9374f5630..00f228661e217a 100644 --- a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_ruperta_base_finetuned_spa_constitution_en.md +++ b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_ruperta_base_finetuned_spa_constitution_en.md @@ -33,55 +33,7 @@ Pretrained RoBERTa Embeddings model, adapted from Hugging Face and curated to pr ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ - .setInputCol("text") \ - .setOutputCol("document") - -tokenizer = Tokenizer() \ - .setInputCols("document") \ - .setOutputCol("token") - -embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_ruperta_base_finetuned_spa_constitution","en") \ - .setInputCols(["document", "token"]) \ - .setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["PUT YOUR STRING HERE"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() - .setInputCols(Array("text")) - .setOutputCols(Array("document")) - -val tokenizer = new Tokenizer() - .setInputCols("document") - .setOutputCol("token") - -val embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_ruperta_base_finetuned_spa_constitution","en") - .setInputCols(Array("document", "token")) - .setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("PUT YOUR STRING HERE").toDS.toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("en.embed.roberta.base_finetuned").predict("""PUT YOUR STRING HERE""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_sundanese_roberta_base_su.md b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_sundanese_roberta_base_su.md index 7585bf0774d018..9bae396f9df976 100644 --- a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_sundanese_roberta_base_su.md +++ b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_sundanese_roberta_base_su.md @@ -33,55 +33,7 @@ Pretrained RoBERTa Embeddings model, uploaded to Hugging Face, adapted and impor ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_sundanese_roberta_base","su") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Abdi bogoh Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_sundanese_roberta_base","su") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Abdi bogoh Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("su.embed.sundanese_roberta_base").predict("""Abdi bogoh Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_ukr_roberta_base_uk.md b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_ukr_roberta_base_uk.md index 00a9d4227090f5..5759a6fb262144 100644 --- a/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_ukr_roberta_base_uk.md +++ b/docs/_posts/ahmedlone127/2023-06-27-roberta_embeddings_ukr_roberta_base_uk.md @@ -33,55 +33,7 @@ Pretrained RoBERTa Embeddings model, uploaded to Hugging Face, adapted and impor ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_ukr_roberta_base","uk") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Я люблю Spark NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = RoBertaEmbeddings.pretrained("roberta_embeddings_ukr_roberta_base","uk") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Я люблю Spark NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("uk.embed.ukr_roberta_base").predict("""Я люблю Spark NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-28-distilbert_base_cased_en.md b/docs/_posts/ahmedlone127/2023-06-28-distilbert_base_cased_en.md index 2a6be63cb79d9b..7da5164c748ef6 100644 --- a/docs/_posts/ahmedlone127/2023-06-28-distilbert_base_cased_en.md +++ b/docs/_posts/ahmedlone127/2023-06-28-distilbert_base_cased_en.md @@ -33,30 +33,8 @@ This model is a distilled version of the [BERT base model](https://huggingface.c ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -embeddings = DistilBertEmbeddings.pretrained("distilbert_base_cased", "en") \ -.setInputCols("sentence", "token") \ -.setOutputCol("embeddings") -nlp_pipeline = Pipeline(stages=[document_assembler, sentence_detector, tokenizer, embeddings]) -``` -```scala -val embeddings = DistilBertEmbeddings.pretrained("distilbert_base_cased", "en") -.setInputCols("sentence", "token") -.setOutputCol("embeddings") -val pipeline = new Pipeline().setStages(Array(document_assembler, sentence_detector, tokenizer, embeddings)) -``` -{:.nlu-block} -```python -import nlu -nlu.load("en.embed.distilbert").predict("""Put your text here.""") -``` - -
- {:.model-param}
diff --git a/docs/_posts/ahmedlone127/2023-06-28-distilbert_embeddings_distilbert_base_german_cased_de.md b/docs/_posts/ahmedlone127/2023-06-28-distilbert_embeddings_distilbert_base_german_cased_de.md index 5ded15b165dcb2..795157372e83b9 100644 --- a/docs/_posts/ahmedlone127/2023-06-28-distilbert_embeddings_distilbert_base_german_cased_de.md +++ b/docs/_posts/ahmedlone127/2023-06-28-distilbert_embeddings_distilbert_base_german_cased_de.md @@ -33,55 +33,7 @@ Pretrained DistilBERT Embeddings model, uploaded to Hugging Face, adapted and im ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = DistilBertEmbeddings.pretrained("distilbert_embeddings_distilbert_base_german_cased","de") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Ich liebe Funken NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = DistilBertEmbeddings.pretrained("distilbert_embeddings_distilbert_base_german_cased","de") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Ich liebe Funken NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("de.embed.distilbert_base_german_cased").predict("""Ich liebe Funken NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-28-distilbert_embeddings_distilbert_base_german_cased_opt_de.md b/docs/_posts/ahmedlone127/2023-06-28-distilbert_embeddings_distilbert_base_german_cased_opt_de.md index aa7520c32d32f5..381873114ba53c 100644 --- a/docs/_posts/ahmedlone127/2023-06-28-distilbert_embeddings_distilbert_base_german_cased_opt_de.md +++ b/docs/_posts/ahmedlone127/2023-06-28-distilbert_embeddings_distilbert_base_german_cased_opt_de.md @@ -33,55 +33,7 @@ Pretrained DistilBERT Embeddings model, uploaded to Hugging Face, adapted and im ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = DistilBertEmbeddings.pretrained("distilbert_embeddings_distilbert_base_german_cased","de") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Ich liebe Funken NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = DistilBertEmbeddings.pretrained("distilbert_embeddings_distilbert_base_german_cased","de") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Ich liebe Funken NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("de.embed.distilbert_base_german_cased").predict("""Ich liebe Funken NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-28-distilbert_embeddings_distilbert_base_german_cased_quantized_de.md b/docs/_posts/ahmedlone127/2023-06-28-distilbert_embeddings_distilbert_base_german_cased_quantized_de.md index 57b94449d930ed..7798f1e06d0585 100644 --- a/docs/_posts/ahmedlone127/2023-06-28-distilbert_embeddings_distilbert_base_german_cased_quantized_de.md +++ b/docs/_posts/ahmedlone127/2023-06-28-distilbert_embeddings_distilbert_base_german_cased_quantized_de.md @@ -33,55 +33,7 @@ Pretrained DistilBERT Embeddings model, uploaded to Hugging Face, adapted and im ## How to use -
-{% include programmingLanguageSelectScalaPythonNLU.html %} -```python -documentAssembler = DocumentAssembler() \ -.setInputCol("text") \ -.setOutputCol("document") - -tokenizer = Tokenizer() \ -.setInputCols("document") \ -.setOutputCol("token") - -embeddings = DistilBertEmbeddings.pretrained("distilbert_embeddings_distilbert_base_german_cased","de") \ -.setInputCols(["document", "token"]) \ -.setOutputCol("embeddings") - -pipeline = Pipeline(stages=[documentAssembler, tokenizer, embeddings]) - -data = spark.createDataFrame([["Ich liebe Funken NLP"]]).toDF("text") - -result = pipeline.fit(data).transform(data) -``` -```scala -val documentAssembler = new DocumentAssembler() -.setInputCol("text") -.setOutputCol("document") - -val tokenizer = new Tokenizer() -.setInputCols(Array("document")) -.setOutputCol("token") - -val embeddings = DistilBertEmbeddings.pretrained("distilbert_embeddings_distilbert_base_german_cased","de") -.setInputCols(Array("document", "token")) -.setOutputCol("embeddings") - -val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, embeddings)) - -val data = Seq("Ich liebe Funken NLP").toDF("text") - -val result = pipeline.fit(data).transform(data) -``` - - -{:.nlu-block} -```python -import nlu -nlu.load("de.embed.distilbert_base_german_cased").predict("""Ich liebe Funken NLP""") -``` -
{:.model-param} diff --git a/docs/_posts/gadde5300/2023-07-05-image_classifier_convnext_tiny_224_local_en.md b/docs/_posts/gadde5300/2023-07-05-image_classifier_convnext_tiny_224_local_en.md new file mode 100644 index 00000000000000..9d4e1557756535 --- /dev/null +++ b/docs/_posts/gadde5300/2023-07-05-image_classifier_convnext_tiny_224_local_en.md @@ -0,0 +1,75 @@ +--- +layout: model +title: ConvNextForImageClassification - image_classifier_convnext_tiny_224_local +author: John Snow Labs +name: image_classifier_convnext_tiny_224_local +date: 2023-07-05 +tags: [convnext, en, engligh, image_classification, imagenet, convolution, open_source, tensorflow] +task: Image Classification +language: en +edition: Spark NLP 5.0.0 +spark_version: 3.0 +supported: true +engine: tensorflow +annotator: ConvNextForImageClassification +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Pretrained ConvNext model for Image Classification, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. + +The ConvNeXT model was proposed in A ConvNet for the 2020s by Zhuang Liu, Hanzi Mao, Chao-Yuan Wu, Christoph Feichtenhofer, Trevor Darrell, Saining Xie. + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/image_classifier_convnext_tiny_224_local_en_5.0.0_3.0_1688564243397.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/image_classifier_convnext_tiny_224_local_en_5.0.0_3.0_1688564243397.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +image_assembler = ImageAssembler()\ + .setInputCol("image")\ + .setOutputCol("image_assembler") + +imageClassifier = ConvNextForImageClassification.pretrained("image_classifier_convnext_tiny_224_local", "en")\ + .setInputCols("image_assembler")\ + .setOutputCol("class") + +pipeline = Pipeline(stages=[ + image_assembler, + imageClassifier, +]) + +pipelineModel = pipeline.fit(imageDF) + +pipelineDF = pipelineModel.transform(imageDF) +``` + +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|image_classifier_convnext_tiny_224_local| +|Compatibility:|Spark NLP 5.0.0+| +|License:|Open Source| +|Edition:|Official| +|Input Labels:|[image_assembler]| +|Output Labels:|[class]| +|Language:|en| +|Size:|107.6 MB| \ No newline at end of file diff --git a/docs/_posts/purulalwani/2023-07-06-quora_distilbert_multilingual_en.md b/docs/_posts/purulalwani/2023-07-06-quora_distilbert_multilingual_en.md new file mode 100644 index 00000000000000..699f6458d53c74 --- /dev/null +++ b/docs/_posts/purulalwani/2023-07-06-quora_distilbert_multilingual_en.md @@ -0,0 +1,59 @@ +--- +layout: model +title: Embeddings For Similarity Search +author: purulalwani +name: quora_distilbert_multilingual +date: 2023-07-06 +tags: [en, open_source, tensorflow] +task: Embeddings +language: en +edition: Spark NLP 5.0.0 +spark_version: 3.2 +supported: false +engine: tensorflow +annotator: DistilBertEmbeddings +article_header: + type: cover +use_language_switcher: "Python-Scala-Java" +--- + +## Description + +Copy of https://huggingface.co/sentence-transformers/quora-distilbert-multilingual + +## Predicted Entities + + + +{:.btn-box} + + +[Download](https://s3.amazonaws.com/community.johnsnowlabs.com/purulalwani/quora_distilbert_multilingual_en_5.0.0_3.2_1688648417016.zip){:.button.button-orange.button-orange-trans.arr.button-icon} +[Copy S3 URI](s3://community.johnsnowlabs.com/purulalwani/quora_distilbert_multilingual_en_5.0.0_3.2_1688648417016.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3} + +## How to use + + + +
+{% include programmingLanguageSelectScalaPythonNLU.html %} +```python +See -> https://huggingface.co/sentence-transformers/quora-distilbert-multilingual +``` + +
+ +{:.model-param} +## Model Information + +{:.table-model} +|---|---| +|Model Name:|quora_distilbert_multilingual| +|Compatibility:|Spark NLP 5.0.0+| +|License:|Open Source| +|Edition:|Community| +|Input Labels:|[sentence, token]| +|Output Labels:|[embeddings]| +|Language:|en| +|Size:|506.5 MB| +|Case sensitive:|false| \ No newline at end of file