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 4865e4220887..bfb5f90b83c9 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 16f8004a7107..b7d0aa182eb8 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 87defa5ce1ce..7c68325df1b0 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 2cafdec0c1da..949f6dbcb9d8 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 5786fc442e5e..9ddbf5591d4d 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 1ddb38d59949..ed2b3c47d29a 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 2cb06faa2f87..a904a73ca508 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 716a8c7ef93b..df429bdeeaa1 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 7242cd87aba8..80db50d91533 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 710aa1f053ff..a74f8c38d2ff 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 3fcefb1d7eb3..c26ea7dd887e 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 055d160c31f8..0e48aa6ecbea 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 95b2ce6a9e50..fe6a089067f2 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 926f24a29a77..069a6fcfad8e 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 fd6967e6b74e..4487b2ba269a 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 c67e8675e84d..6b0e05370f82 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 d1d0a027101f..b8021add1f02 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 1e109782e040..1231adcb2910 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 bb3533370321..e28d3e58a4d9 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 5d271a57a015..1b2d28985077 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 52cb640bdccc..262f0a71cba8 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 49ca3e37d263..a5e2d2b07c75 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 0b61c71f04ca..727f842171f4 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 e87e9642c617..62139e7aaf7e 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 d0bc40acb6ec..49b6b871c0b5 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 cfeb1b836428..498f3354ec4a 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 f71f8d6fbd6c..92700cc73669 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 4213fa76ba1f..7c3088631df4 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 8955e9f3dade..d99e36091656 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 cc54bb0dab81..36e9fcacdab5 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 754751812997..2b71e0b74261 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 55ebf123c1df..993586c78c50 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 dff7cd9661e9..1c5d740b65f0 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 8699ac760ad0..37a59b0796c4 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 b25eb321ead9..322cf40e2bc8 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 141a06d8077e..80deb5025851 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 fcf058e50dc6..39a1c27dfc0f 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 7f3490502e13..0a1a16fac9b1 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 65da90593326..9a242227e864 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 a9a6c2bdd55d..3661a875c833 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 3529cfbc437f..4c8aaa9f5a64 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 e67072c399a5..1dcc4094f5f9 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 3f575cab2d81..f5a70f9e33b6 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 0c1f23aa64fe..73c4520e8fca 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 a3be16bd99c7..bb39d3e3d8c0 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 303ae0989da4..7081936b631e 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 481dbe7d2460..fd22b0474f3d 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 793d02168e20..6af5cfc1cef5 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 40887242a00e..84e09d742e4d 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 2077b8eb5eaf..af79802db59e 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 26691aca25af..2063746c4cfc 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 8084d8e7b4fe..0138947598d5 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 440ff38002a3..6c3399bbfcba 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 dcf425acc834..dabde7c5fd2a 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 5a2c307dbda3..9ad3c6690fa8 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 a72929290d4e..a3e48901c38a 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 916e0c895d79..e4d4e3628e32 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 2ea14f5b2331..cfb05e3e4711 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 2907d7a7c35f..d67a50a81025 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 71b87ab1245b..348e59f61e68 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 8558af1efeba..02d37c890230 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 c679540f9b03..6ba65fd95a81 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 0483eb827139..e278d418a550 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 9d60898c5ec6..4ac55e5f37df 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 9fb4075ae18c..29316f66d38b 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 85d99ba60925..fe2f1eaf9784 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 21fbb60d5981..7d5627c90b13 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 38585aedaa18..d12e29fd1138 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 ec8aec2971da..42da296e420c 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 23ff94d86357..c400941b4d06 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 1172ee55ae06..fee32be7ddc1 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 0e7bb1cabc63..37d5b30f676a 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 a400d3f53f1c..fdb8a8575de6 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 6e5bda94df3f..f2354f3df356 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 b0d7072f07eb..7998bd9d1a51 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 87e96cf134ef..a5c5ef53878a 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 b922543e2b7a..846f9fe71c57 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 3bc0840d862e..55dec840aeb4 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 14b73191a945..65282f7e0453 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 d1cccd62c635..35c56706a58f 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 558a056a497f..f6bf63975757 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 fe1c34d91f31..946c3f59fb77 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 ac1128949d45..f0603b75a24e 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 3dda6bffca3e..7946e1c2b4e5 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 ed9a31526cc8..09b5d8473ac5 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 973ef3cece13..22848bb5a595 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 0d388eff34fa..9678e18b9570 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 9e6cd9bc8b4e..4ee3fa20cb8b 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 0778fc9a6992..dd1ac545aea6 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 896a3bee6473..7a0f8c978296 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 43d61d827833..96214182883b 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 5636ff0f7d2a..1f694d0f8887 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 f49f81cfbb1e..f7dfb7c4cebb 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 50b9658933ce..f217407e8318 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 2450fe258fcc..b81b2b80ac2b 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 66efd2854225..ee5036f57a4a 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 61da217d710f..79f524129202 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 bb9753961cb0..9faccd3fc167 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 549d4b28e970..49e146c5ca5a 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 4f77ba520573..f5bcba0621a9 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 74dfe5133cd1..b1406aa89850 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 8fa9ae510aa1..ac0910cc8e90 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 15bc10dee1a5..023b1c2b54cd 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 491f9477630b..4e65d749a609 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 f941f83ee783..0ffc760b94d8 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 b28842b096cb..60d3a66eb5ce 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 12dad0707077..7caae5228343 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 9a8e3fb42796..00e876b279f9 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 42d4d0ad25c7..388e8693da5e 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 e344aa5f0b4f..dce7d90f7510 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 0dbde13ed545..2dea52a19b93 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 96ecea3ee6a2..ba899a9e4743 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 d1a29a03fad8..19adf6f12337 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 d3ce8b843188..2e4ddf591055 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 b9e9ad4659bc..8f5cbc8c1a47 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 68fd4a0067cb..f1baf41eafd8 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 5264facb5737..a9c358bb0155 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 27235c582611..fbbcda436810 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 3db719c60800..e5e389ac248f 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 e610fe29fc94..d83f24ea8fde 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 3379529b426e..7b40c5992a64 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 19276be9edc2..b1d5ba6252fb 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 b0724b67df63..6d5482fe230e 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 a833bd49ae91..cc03ff7f2e57 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 9b7cfa38872a..de431938a6d5 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 b62f280417de..4b560929e248 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 592f8f3daee7..610bc6930f70 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 ea42724fa41a..4d24f5823ec9 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 250bce40234d..453bd325ccba 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 f65fb8fc1941..f84017805ca4 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 481e6272b3ea..f49762c33198 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 a136eb2862bb..2f49e226c74d 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 f1cc75df9acf..ab5d71f95242 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 ce25923c56e4..53a78a0f6fa6 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 99598085e143..e475a3407c8c 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 d4099b832610..900f51c5e137 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 01a6ba6a68fa..e09667a5dba0 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 c034fd3a3a45..7d383507125b 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 a31fd7161684..642498faf547 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 59ff12c659a0..cf937ac1b7f4 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 d791648f8b3f..0fc735790284 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 be54bafe49fe..dac74a420ff9 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 22525f8c0909..214aa7846e4d 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 b763647ec89c..a79791781db4 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 76a63466d126..08106ad6c587 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 84e43520c89a..a721a749078c 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 58e772adc296..902f7a21a48e 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 b323facb0ee8..36c0ec6e88a2 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 0d05cd015312..1cad18e958ed 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 d0511eec69f4..5fc96f5b0763 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 7d8c9d76430d..59ef17f80c2b 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 dd22a740c2da..f82936d39975 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 90c527826353..4db986c41526 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 914f74e1b22e..127f4e849470 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 5d10909e8fc2..808da2a4fd70 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 cbc9c3020748..042dba72cb5b 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 994633443fdf..1abbbc466e56 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 c172b6ae4150..888875a101b2 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 099cacbd8124..2affd7493ff6 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 bd110694edd1..d49491a56168 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 8d69d6805b99..590230eb640b 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 9a66e31df60f..100d65667cca 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 a81133879157..0cf0116a1bb1 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 f401f38e1a3a..27e517431691 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 3878cb8b9935..d0e9e735bcc0 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 d22ba6ca506a..3a0765bd9fde 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 cfb0fd4d59d7..06c2b74410b2 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 57932b42257f..f80a11e7fa78 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 4c55bc1f6ce2..481caef65b1f 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 cc0ac4fc6f62..560156c89d76 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 9ca480fccdef..0b5111e8d0f8 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 6337f0136a98..86920d4eef13 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 15f6f43e5b81..a40cc0735dda 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 d63528bb521f..9bf91e1036a3 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 f362f3d323a6..7b6ec2cf5421 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 519d1c16b5c6..6d5325576584 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 9bb36244046f..e3e30b745e28 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 07de2dd5f536..6fa55447acd7 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 1a722c34fa70..d7f03e348d71 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 905ff9956574..31f126c38a1b 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 1e68b4e62370..7fd51a3c25d6 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 1177daf831da..4a212a1ced14 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 a03017071dfa..b0832c47fbf9 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 9895cd6398d8..74528f8b336b 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 e5c889d05ef3..690fbfa93c7b 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 ac7290c2c2f4..ad32d266f1e0 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 ee25fc3f75a5..9c02e144ca8c 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 722e3d586232..51a551c41149 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 0ec192b82de7..5fab17c3b9af 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 a7d710875988..1ea8fa9a308f 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 ff1f64782cf1..3afc986f0768 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 61688280e98e..9920b51285fa 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 93eb4f1b9a89..846081aa6031 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 02d60cf8b49f..9d2b944659aa 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 bd21c3c74648..191bb5e3da08 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 b01501066476..bd7c77c8df70 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 9b0a4e00a3cb..c62562d48e60 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 a5cde6f39d05..ee9bd6e7dc86 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 b50cc0a119e8..33c74c86cfb9 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 33594be3b849..a0a6092a8e43 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 e11013676e77..9395b9b04501 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 58dc4fccd0d7..b4f98b17e2fb 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 5d9c83df977d..4b610cebf162 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 b9f91f44783f..8f0083c01c48 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 b13244944aa9..7b07fd0486db 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 6068e038ad1e..0226561f3acd 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 dd930bea9c5b..c4b97d494b20 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 51c2508bf37b..855f0fed257a 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 18c3447a08a0..c2d22843e89c 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 2c911b740264..31f27d1708a8 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 4cefe051b56a..c8b7aab8a115 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 2955701471bf..193f16302af8 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 4b1cde8456ac..6a5dc77670e5 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 49dfad88bac2..066285352e68 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 2d7712cc130e..7fdb92324adf 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 2598aa243304..e0413a8449c2 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 16fc2ffd0cc2..f5d3feb29f7b 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 72dac1583e9b..6a8542f87337 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 5e43ac4f67f8..d83b24fdd460 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 daa6bd25d170..ef852e7b641b 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 e2153d5b120c..372841e0a9dd 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 53cfb3b43086..525acf5f72da 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 37a8591fe2ef..b0ae7737cb36 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 6ae289377718..5705b7a501cb 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 f7642a41d111..bb3360f31b31 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 ce04a272f78d..373095bcd9ae 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 81358c6d0358..2ca4a444df90 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 9702d2322204..927822969f81 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 9fdae922e46e..64c7829a9140 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 132f8cdbb495..147cc6720b1e 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 3d4f4dc3ef29..bf618f14deec 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 0ce6e3cfe832..0a4b97317d5d 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 a43059872d03..a42c90e8fcb1 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 d0fc0624d92e..722979d39c98 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 761bb44e1825..d009a4bbde89 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 395727eadff2..2e3085c84f1d 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 c8c470caefcf..4261fe366170 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 edcce5d9a5a7..95b955ce51bc 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 52a43cf866c2..6b300ca302d5 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 782cc68a2a9e..b1c0f204de25 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 eb5584612476..04a0d72c777f 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 bc4e550333f2..27edbcd4dcba 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 14a0f3958959..3d4f27313209 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 f6664a3ddd1c..05e23273179e 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 ffc88a8a21c0..1e277044f153 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 c53073ddb80d..b2d21a19e91b 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 61c9e4f51088..250716e139ac 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 b57803f6d35a..6b3629ad27c3 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 aad937ec1cdd..2706b675fcf0 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 df3850fb08eb..1fb49f48f295 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 e2e1cc820d93..1a614340b5e4 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 8e78af9a3180..218612f0a2d0 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 4ae7fcc69bac..4a76a5ffdcb4 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 8bdc4ac6e9d3..0772d9c28e4f 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 2706b7b2ff19..161023da722d 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 e58bd487c8d5..e261c7c911c9 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 a60580df8324..3bebd8be5a25 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 334a754c8aad..0a5d83e6f0cc 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 cec6fc28e13e..9658e8185191 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 1d374a3449d6..d62223e03a0a 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 f8f32369a4ed..3792288064fa 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 0f2a945ce528..23a7966fc4f1 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 51bb9ddb9ce8..d48859e9a7b2 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 16dcc217ef93..f99979eac55a 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 02feb817995b..3efd91f556d7 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 7d8c43b01b75..f13b797bf406 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 a914f9245e69..59802a0bcbad 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 ac74fffbb102..4f21140076eb 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 dcaf88d51af2..88a630747ad3 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 013f16d4dbdb..eca405694552 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 9c4e73c2af60..1be455c32ecb 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 fd4314e0006b..c477ba006ebc 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 35fa6de66de6..7ee980b966fd 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 44db088ba284..7826ebab1b0b 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 82b823e2afca..915503690ea2 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 a4c97678e652..276a15804f03 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 d7bb9221fbf9..fe7caf70f6fc 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 8aaa0181ed98..cd0afbbbbae3 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 ad7bc5c4ca7a..33c4398a8892 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 83f9541829c9..6a72f30df6c8 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 fe05574fe254..29dbedc01549 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 3b4d8d57efb6..4970917de162 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 fd95d668ad2f..eeaaafd113c2 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 c05bbe85ae6a..db13ad587869 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 0d31ac7e45be..cfb85ccecf88 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 b51c4758a0cf..c5b677dd9af2 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 d6b573223d9f..4c8bbeedc296 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 b3a87b93f6ed..3594c571a5ca 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 123e86283717..91c845f8ff6d 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 0ed56858781a..bb4f4ec3b936 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 5d8cd94201d0..cf1c0d7f06c1 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 48ac092cf761..789368cfc440 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 0ccf156f06db..208b052cd924 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 60436844a502..beb2306b3c97 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 159abee951a0..34b28453b2e8 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 43f95fdfc89a..220fe0f0c816 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 4aef430d1f1d..4b0702a4b417 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 61113b16764d..abce79b09042 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 fbfeb598e42d..f1dd80cebc99 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 61a671d663cc..c756947dbfb4 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 750f307ec55d..571ddc9bc289 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 a5a183487a9f..539fba448f04 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 4e3bd64d36f4..fb84245d482d 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 ed848865a3f1..96a44a3ed6ef 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 10741f307e1a..f8f01b7898cf 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 bd0827564809..02935afd61c1 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 ab3e62efb1a1..2090bf2deca2 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 3bdacc90f826..1c1a6475d3d1 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 38a2e76ff4e2..7372b1d7c3c8 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 be1359fc0832..71c4c5ea468e 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 1e76fef347c4..6a82aaa37580 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 73af8d334fe5..e48cc027987e 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 014650d0410a..9722bf8681fd 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 5aa26c0b319b..bcd2ee3b6fc2 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 648159c17e83..64408b19d828 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 903012f4a225..3f9c07cc9200 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 e5f01baffac3..13303393ba9b 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 67b720cb60cb..009754c8228a 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 1aa1e43fe345..d8980a4ca672 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 576e051d5bc9..e42dce8104bd 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 df56e3145883..3ca2a8bc9b48 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 35b24d5bdc70..83a1cb386171 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 4991fe056193..0d6cece91ccb 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 e34af1639fe2..c856a1a4aa51 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 5e5b33a34999..8493b81a06be 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 18514bae2878..eeacbfa75c69 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 b6278456400e..585e1d24700b 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 7efda03ad07c..dac2005d1165 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 b85ab4b633b4..905c5523afcb 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 91b5c23ebbd3..13841dccd44d 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 8ccf11eed918..e451c9d69915 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 0425702cf6b0..9d6883feb15a 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 91b9700a46de..379c8723aba6 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 294502080883..229e3294938b 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 404c38a15a40..d453db71ef8b 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 0c3dc5fcf95c..3af3b54ebd40 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 67c967a63ba6..1b9faf990a29 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 4d4c5e36796b..2fb9ad5732ff 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 35380043fb79..0931979b5d90 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 26d479aef030..f9ba55ec390a 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 fa8f705e0b01..3b10c5444ac0 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 16f045eb4391..195f67e86bad 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 16069df0f43f..223b7ef1633a 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 52c450ba6f87..3401f567de7c 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 9de2e5ceda88..48b822439269 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 3b4f28b84010..d2753ee87ba8 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 a66592362aef..7d873291073a 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 0644860ec4af..702ff0c9c5e3 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 ef6310376136..0213c1cab9a5 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 ab857ce93611..e251dfcc9ced 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 a7692a3b4a98..8b1c8aaf7d1e 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 78c671f91f89..ddfc68a5bf74 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 4f4443a9414f..55a46993bb08 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 1cfd1f3b1eea..55722ec014ba 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 7f4939e8c4dc..3bb66c51cb8d 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 3990534aee8c..ac200ce8945f 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 76147872e1ab..4aafb4c2c2d3 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 bc5223db3091..e8540e8ce3e7 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 e2f6ac52e621..4ed75b1a684b 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 9fb584b272e0..3ffabc3016f8 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 2892cf85cbea..fc6aec47a4ad 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 050826db3843..adf0267d9e2d 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 61a39c2b402a..74cfd4179e71 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 8d3a12f5bdae..09757e0d6e48 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 bb275a83e66a..52d9049bd4d0 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 27eca880193a..320fdaa9dd75 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 5275f8a0281e..e3428ef23882 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 1cd9bd857b7d..46af091aebde 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 5fef7a9e1b29..c2702092f5b1 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 f3050a29f18a..b1adad1961fa 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 52cb3c799c48..f654b8b3289b 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 617edc160336..790fb6ffaafe 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 8ac615bb296f..b980cbc5fabf 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 b128a453a67f..c618f3be9344 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 973b35a190fd..1d2b29cf0a8e 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 fa564958af1b..4ebd7962c791 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 83c7e0e7dc12..93bb842ac0a7 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 bfc143f88891..5d034ba613c9 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 d7b6d8ec978e..fad522176966 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 32a4f08022b6..ac1207126da6 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 effb202a3b61..dd99100e318f 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 aa40cf3ff9bb..6df7c6058a36 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 ed3e5055d407..fdef44b9b80f 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 d2d6e700c449..27cbd61e3274 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 308cd3d0f450..6588c8f77410 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 9704b0293fda..1582fc0e45f0 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 15ae7376dcae..8c2791c7de3f 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 13ee9647ab1e..c47d16779497 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 27a4701e7436..cbf4fe98bc05 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 587003918440..317830b7d466 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 8a0322af18fe..b8ec408c8f60 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 96a1e85db5fc..c82fc583dadf 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 29eb984bfbc2..cf7eba7ac820 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 c25863d88ce5..faa2cdd4393f 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 f394d0121d9c..be4e00ba4855 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 1ae8f9c38f5e..4d45aaeb23d0 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 43ac09fbb7b9..2097fe15c023 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 6569533a9d3a..0f1c5f0b0a10 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 ccb91b9f89fa..8c6400f5c9f9 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 956306f8d608..8f0cc8a8514e 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 57ae48b9514a..2a25c7bdc49a 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 3601a98f89ce..5692e0385f16 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 74e7136b7380..50b060e15af4 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 9151aaed57cb..ab6affb487c8 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 621011ca394a..27d4fee565fe 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 d40cd9f57879..0b3d24883f94 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 f0043de69ccb..edcd3f6946f0 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 9a2d737cb0e5..52aa85f4e274 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 7822530b0cbb..3f5763c45c8b 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 c2f3168eccac..199edf2e70fd 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 28dffc056a2e..78ac4deae949 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 8e0f9e44a29a..1b93791f84bf 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 bd33f278f598..aa2374f1e480 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 3f58127152c0..1d7e86af5459 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 d1690b75b4d2..34984b9b6598 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 ff202edb8a36..c691a9d49de4 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 d3430b136bf9..ee5c1900bdc3 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 9d062a431575..ad9918b5d0bd 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 139ac16d41ff..c2b37b2ba2ef 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 93b1542ce8ee..de62befcc5c4 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 9c21b117ae96..137e13cb56db 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 51924c114e80..f7385a54878a 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 287938422ba3..cee0376d9281 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 2541ef1cbada..13dff453d3e0 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 84215d71bd76..b34e8580ac77 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 17117261cdc0..47ea232d475f 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 d5356eb6525b..c0fe24d9346c 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 36c29d4e2273..42025dd97501 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 e1d8b9650bb7..67f28b68d529 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 af9a8fcbf5b8..41a9534bd16d 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 deb88f991be6..a3da39a918bd 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 ad7874fdb22d..cc59a8b51116 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 1c44491294c4..4519c12aa36e 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 7a9a3bf643f2..59e2760ef0fb 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 653cb4d41f77..693a8c1aa166 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 9548b616c401..0169d22c6dc4 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 b76bcabec180..17c43f65e36b 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 1282459dd465..94da63baca08 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 6609ffedcfe7..a145772faf3f 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 1f90a7517888..b5a883c462ad 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 6a2168b7edb2..ca08330f4f8c 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 88f723a3345c..da8ab6fd5991 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 ba3d50e3fec8..d2b5db8a9e5b 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 6055beeb1282..43fd4bb3243d 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 687caeeaf525..17873b089243 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 a4f21b19d3ec..2d9e96371749 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 de9bbef58143..ae8e23d378bf 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 15162e39f249..a3b56517b099 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 9c488db1353a..9898486d6d0d 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 1cc522ddabbc..f849fe616613 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 c2af72d8b6e5..b6e6389029aa 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 cfb98943b61a..5a4407bc3963 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 56e37a064f95..70187c7950b4 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 71dbb3a9287c..01bfc499f614 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 5c3d1ce0babc..5725d27c63b1 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 832d938cfe27..56156639399c 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 b8df4408ff18..20b20a43bffe 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 e5666e98d41e..98b8bae55c34 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 276f8362594d..019576d2caf5 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 582c6fa2b9a7..5d2a23a2d340 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 c2fc94369704..d37f39be47ca 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 165075633a30..6cc2fd6bf8ae 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 e87af232ca89..6e28cc917aed 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 2ce881cd270a..d30ab3a371ae 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 bc9cd1df9dce..4a12badcf469 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 0f90874f95c6..df748f94a3ff 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 9b67727f8877..50889e46707e 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 cc4cbd0d2a02..2a4580e26293 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 895bf290c52c..a2feddf4ea83 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 e6fadd932f60..80da0508ce5b 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 c6ca506e5295..df6f0f9eff52 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 72dcd995dc01..d75d117fa4d4 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 81a467a8d3d2..de6d6a227610 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 44c64073d378..c5dced1a6399 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 28e0ea1c3e11..97a09915f482 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 af1fc87cbdba..e7617f4c2353 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 07657f6ad771..42e23d2663dc 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 6ce93076e23c..d923913d37f7 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 8a4803722754..229713b9a289 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 bf1d04ed8366..595292996a28 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 78657d8c33e3..3189a75e5c3c 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 b585db60590c..ed173c9ffc36 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 09b33d78c6bd..1c3238ebde73 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 6db5dbe6f40b..b20dd92e9e41 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 2b1a76c0a318..6dddfbb31413 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 a8bde5a93731..f372d9feb1aa 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 507d80ddf48d..b049b73e4014 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 aa25c8bbbd15..ece2d7def201 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 1156a1820329..b181f33ad505 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 019db2765f56..a610ecf9d985 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 f209c346ba5e..5aac6f8deafa 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 6f9f54bac449..f824ce2b421f 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 df8e6020ce97..1a8337eb2f62 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 26d222b5c236..1f7c518cfda6 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 0f8dd6b3d732..80f22e0b87bd 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 334f6947d007..652b29ca0f02 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 d94b26d12cfe..b3ec63b05fd1 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 05609a11fcf3..ffad26793c5b 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 27aac09a7bc7..3895c761091b 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 5679c83687a6..355a23fe4c43 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 99f607f5c153..8ec6c83c0a2e 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 e8151fef0046..1f937e2eb43d 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 b0ffc23c7e5d..654bc887a67c 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 00a46a50c9de..493095aa7f48 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 527a150609fd..6e97176e6428 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 28aa7881be3b..bc52734b92b8 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 ec1f8a7ed29f..4308e70edfc0 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 2db1ef256735..af99c4af0887 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 97bcdf7edd7f..67201d149254 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 6d2176403c97..38f77b087540 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 1ef43767d973..004a7380dca0 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 622c54ebe635..537baf4955d8 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 efc6980941ce..4af25c9faf9b 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 ae5920ac1cb7..24d80be3bc6a 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 1f985340872a..b69acae62552 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 91fa66ad63e5..9fb045ca315d 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 5b67a75c4e93..90ce440ba94c 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 4626d471479c..9d93ab59c663 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 ab7513a407cb..d0dde731c9eb 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 8f1b62389ff5..cd2ad21dae1d 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 586c43ffa392..91703bbd259b 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 1977eade89c8..1ab745538baf 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 51c244361ef7..de3e15df5e39 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 7e8a494e05a9..c4c1a343a3ff 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 82419381d32b..3868d245812a 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 b4cba476c774..3321ae06713e 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 1af0625cf150..2323faa47849 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 082e97e5cb0c..80c796bbcc74 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 ec8779ce8600..8243b6e8636b 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 0d1e90b86992..e6ba3cab7a67 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 cdf41dcad668..6a5e4f91234b 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 e4ab0e46ec70..1fe8347a4dec 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 d4f0e3cce03c..d93f86e89cb8 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 ce6a900f6c10..8c8930fb556e 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 a0e6b0632c7e..c387471f2549 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 259fb891ba35..2f129951af82 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 2f13e1e7ba8b..e96e1f5b0e29 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 1e2661ff475d..3e2795c9dc53 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 8b4dcbb11e39..973e2514e38b 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 1d3affe542dc..422a8d343b0a 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 02fdd7d08949..6d1c7a0d327b 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 60503fbe2496..8014017794b1 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 ecc100c7def6..3ad31a7d16ee 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 2c83ed64e84a..beaf0e829739 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 89a6839a95ee..c69ade88cba0 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 0c6f71e2a0dd..070d641873d7 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 22fae6bd9c81..10f5c4d056bc 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 e29412f032a1..7300998e4ef5 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 622e96cea211..084a35b16380 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 5b4101b177a9..66df617f4a15 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 fbf26507302d..bd7fdcc173b6 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 537f94ae4945..c6b5b68cbcf9 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 4a1f66ee841c..74d244071c29 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 8bee08b62d0c..f17b0bb012a4 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 a8f6efb7ae00..aa34411bb64d 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 e01933d05354..dbba74c8aed5 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 f7c53a48bd89..0afd6bfa4ea8 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 bd29b725b81a..9771a2aeb59e 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 82f3c85d2247..9b4c9b4143c6 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 0ac43ca8f342..82e3bf45a0a6 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 cb1d065f6341..c7d5395588b5 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 286777564e90..c926c64fe0c4 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 9f834ccdc83f..5d4cb7779b51 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 92986039f002..71dfbd37965b 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 a490d46ea569..0e7dceeca640 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 6e0309525b77..f8cf4715db4a 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 6b39af792741..6e5de8362bd0 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 3d6a26c549f7..9f2ed02c7a7a 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 bc40d7959ba1..dfd890b165bf 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 2edd51e298a1..222fa62d923e 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 3566124863b3..7e639e117689 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 0308fcbcd075..fda7650d419b 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 f12d896dcbc3..fa3c4d651bce 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 1e641bcf5d79..6e23b6176de6 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 8e1158bbb801..9db5143da3d1 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 0958df101c91..4560a22c0e8c 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 ce8ab67067aa..887b8bfeb407 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 68d128c492b7..15264ea67743 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 a521a954fb42..bbd0d09326d7 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 64d487ee4850..df8d1762745f 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 698131409af3..139c9b65856a 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 13d2898c521b..31acb1ac4c49 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 a38274560def..dcb518b6390b 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 b86fe840106c..6ec01b4a73af 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 d8a80c64c56b..58e0d8cb8910 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 794836f2f299..2b7d9fd12443 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 eb920c7ffb15..c920f59afe85 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 d6613cc7e8cf..4b63da86ffc8 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 b1110b5c50ce..598d68d39e87 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 e90872b5cf05..66661999bd5a 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 e9a244fe3951..1c49ee4e26a9 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 cf463da7d3ed..fdff17758c3d 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 0e0368cae00d..f2aa64ef6084 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 3f63d4ca68b5..87d806fe0189 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 6ce95cc170b4..6c580f4f68a1 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 b3e7e29f1c1f..e759fe215faa 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 9e2a0a0531c2..87e842838ac5 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 e83a14d6f6ba..df339d80d840 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 b650a25e8294..af7243f41c55 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 e41b06ae521f..543df7c17442 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 41859cc555c6..1e7838de7edb 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 bbfb7f281e7a..e0062b938f8f 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 dabe96a7d7b5..bc972fbf5e3c 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 29d87ba99e83..3f5281e221dc 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 84aeba9befe4..61704be090fb 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 e48ebc2ee91d..b2a0eacc593a 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 df146d8836dc..bf277c77873a 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 58cea57ca006..9f7d66341604 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 be35b303a829..9be45ffd4604 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 af1b52acd3ac..80257ef852ac 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 76acc791540c..5febe5b840d4 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 35d0fddb181a..4c98baae2a09 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 6d2e16d4eeef..7d1524213cf8 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 53e791d78772..1728665140e9 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 94addd53290e..6c5b26726a9c 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 d08cb9f72528..4d7a8573b5d1 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 e323b62a1bbe..7283cc295793 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 0aeb0d295a40..e2f35366f4f6 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 ed972bedaa7e..4245ee3f06c1 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 a2fb304397a6..153274bc0b1d 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 bf7539ce6080..14a2d437d7ec 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 169e9a31db0e..8c0c61af0523 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 2ee4b096c3fc..386c355f2cfb 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 8f303ff4ccea..5551148c7cf9 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 30f49fc915d1..2a3f75dd9b26 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 6b33b485b490..1551e8273694 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 50107e47b2c7..06f7be3e4bfa 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 4f13393720b2..4d5f8281662f 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 9f3baaee954b..e0e826cfcf39 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 7233e7dd8045..c51718ac20e3 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 4e1fad395464..324b0e4dc41b 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 9202845526f1..b74288176549 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 d172172048e1..8fac062d88d7 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 6e1c4d47a4a9..4e137e618ae6 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 7df586e99094..fcf58d1a18f0 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 750a960889bb..2bd594b92ac0 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 709aae71d5d5..b5b435182a72 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 9ddef8bf45a2..ec085b830ca8 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 15b0dcb0b86c..abf161154855 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 9092f73999f3..81dc1d74b54a 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 9ca015f1047a..1b342179ec34 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 8cc4701ee197..755bba585f55 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 aa0ec4ff6f25..5e12c752d13a 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 ae2c8f33cc9d..055209da574a 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 f5810aa56beb..693859de616e 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 3b7e500c1b61..d672d2d0e887 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 954d50c138bd..d9420dc2bdee 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 6db5ee046443..61a76ea2ee1c 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 70dbfe309f03..57cd226d06c2 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 d5ad2b1a0d58..50ce4ede4302 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 6920c29287a3..8f82ae6d7ebf 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 0dbfd7bbf1f9..dd9f71a25b11 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 9653c8545ae5..202438105a4e 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 cba118e80030..5a21435e068d 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 b668d63c59d8..3b8fc35f9774 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 ef023c27d100..cfe7544bc01c 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 462366bdad47..fc23492b15d4 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 1a10a0441cc6..e52590f9051e 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 235066a9fad8..40748e78ff58 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 bd8c33572f99..f7c565016f71 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 1c3db397a2a5..c74ae3680427 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 f9a2af7472f6..c5b1aa26f94d 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 b9661e848333..e091a4599df3 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 5a32da11d9de..86d1ffbd95cb 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 773d7bcf2c57..02116808b9ed 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 01ad5f075cbd..d3d98b4cd322 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 f69f15963140..c126e7c873af 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 08583c9e8b89..5177c5bc6d1a 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 6331c54d43f6..64a7f478625d 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 77ff6a04ce59..aa0a3123954d 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 19408b12a0be..3f42ce73af9a 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 1da0c11ee775..29c0824369b1 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 685198ff9883..d54c0e557f08 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 0ad5d20ef3fe..24cdd395bb01 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 238181eea3e7..aa2ad61218e6 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 90ed07b322ab..538cbb136557 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 441202312103..2d9c469f33f3 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 30a5a85951db..afb1ba3a5f6f 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 5d49a37350de..db6efdbfb933 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 6b0bc0e8bcf7..35d790ffc2fc 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 61dc5c17eb02..1a39fce2f4fc 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 f1c52bdc3df8..7c75d9b99349 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 12b377d5c0d0..51d6e2296ad2 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 e3a64ba4f52a..f2c124601a05 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 8f5a603c1976..c2726b34c767 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 d587c92f3a83..d5d2d16ed8ba 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 2b84c9374f56..00f228661e21 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 7585bf0774d0..9bae396f9df9 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 00a9d4227090..5759a6fb2621 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 2a6be63cb79d..7da5164c748e 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 5ded15b165dc..795157372e83 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 aa7520c32d32..381873114ba5 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 57b94449d930..7798f1e06d05 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 000000000000..9d4e15577565 --- /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 000000000000..699f6458d53c --- /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