Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

2023-11-01-negbleurt_en #14050

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
126 commits
Select commit Hold shift + click to select a range
fb14b0c
Add model 2023-11-01-negbleurt_en
ahmedlone127 Nov 1, 2023
b24652e
Add model 2023-11-01-bert_roman_urdu_ur
ahmedlone127 Nov 1, 2023
8d3bad6
Add model 2023-11-01-dialect_recognitionv2_en
ahmedlone127 Nov 1, 2023
c52b9a3
Add model 2023-11-01-indobert_sentiment_analysis_en
ahmedlone127 Nov 1, 2023
337ba78
Add model 2023-11-01-convxai_diversity_model_en
ahmedlone127 Nov 1, 2023
105b0c0
Add model 2023-11-01-bert_base_uncased_ear_misogyny_en
ahmedlone127 Nov 1, 2023
6990824
Add model 2023-11-01-bert_book_zipper_en
ahmedlone127 Nov 1, 2023
2166f15
Add model 2023-11-01-cross_encoder_llamaindex_demo_v2_en
ahmedlone127 Nov 1, 2023
dec0481
Add model 2023-11-01-dronology_bert_uncased_en
ahmedlone127 Nov 1, 2023
118f6ec
Add model 2023-11-01-feather_berts_46_jeevesh8_en
ahmedlone127 Nov 1, 2023
27db8d3
Add model 2023-11-01-hebemo_fear_en
ahmedlone127 Nov 1, 2023
de9b94e
Add model 2023-11-01-factcc_en
ahmedlone127 Nov 1, 2023
33117ef
Add model 2023-11-01-autonlp_swahili_sentiment_615517563_en
ahmedlone127 Nov 1, 2023
489e786
Add model 2023-11-01-kambert_en
ahmedlone127 Nov 1, 2023
13c2bc4
Add model 2023-11-01-topic_xdistil_uncased_en
ahmedlone127 Nov 1, 2023
7daa9b2
Add model 2023-11-01-bert_hatexplain_tum_nlp_en
ahmedlone127 Nov 1, 2023
0bbb721
Add model 2023-11-01-bert_base_uncased_rte_yoshitomo_matsubara_en
ahmedlone127 Nov 1, 2023
9a6dabe
Add model 2023-11-01-hebemo_disgust_en
ahmedlone127 Nov 1, 2023
1d5076a
Add model 2023-11-01-biomednlp_pubmedbert_base_uncased_abstract_fullt…
ahmedlone127 Nov 1, 2023
84f41d8
Add model 2023-11-01-re2g_reranker_trex_en
ahmedlone127 Nov 1, 2023
8df40c1
Add model 2023-11-01-readability_spanish_benchmark_mbert_english_span…
ahmedlone127 Nov 1, 2023
a25b494
Add model 2023-11-01-text_complexity_classification_de
ahmedlone127 Nov 1, 2023
58092b5
Add model 2023-11-01-distilbert_base_uncased_go_emotion_empathetic_di…
ahmedlone127 Nov 1, 2023
390e40e
Add model 2023-11-01-english_grammar_checker_en
ahmedlone127 Nov 1, 2023
680eb82
Add model 2023-11-01-bert_election2020_twitter_stance_biden_ke_mlm_en
ahmedlone127 Nov 1, 2023
39e9ca7
Add model 2023-11-01-bert_base_cased_ag_news_odunola_en
ahmedlone127 Nov 1, 2023
3be92da
Add model 2023-11-01-partypress_monolingual_germany_de
ahmedlone127 Nov 1, 2023
61b588e
Add model 2023-11-01-scicite_classification_model_en
ahmedlone127 Nov 1, 2023
3f704f2
Add model 2023-11-01-turkish_bert_uncased_sentiment_en
ahmedlone127 Nov 1, 2023
6b55b48
Add model 2023-11-01-category_of_article_bert_nepal_bhasa_en
ahmedlone127 Nov 1, 2023
686d32a
Add model 2023-11-01-bert_base_german_cased_hatespeech_germeval18_en
ahmedlone127 Nov 1, 2023
aae1ca1
Add model 2023-11-01-bert_mnli_classifier_en
ahmedlone127 Nov 1, 2023
6fe498b
Add model 2023-11-01-jobclassifier_en
ahmedlone127 Nov 1, 2023
da50602
Add model 2023-11-01-bbb_prediction_classification_iupac_en
ahmedlone127 Nov 1, 2023
527c7de
Add model 2023-11-01-hebemo_trust_en
ahmedlone127 Nov 1, 2023
8b55eb3
Add model 2023-11-01-hinglish_bert_class_en
ahmedlone127 Nov 1, 2023
15601cc
Add model 2023-11-01-pico_evidence_classification_model_en
ahmedlone127 Nov 1, 2023
ae5350f
Add model 2023-11-01-udot_mk1_en
ahmedlone127 Nov 1, 2023
25e711d
Add model 2023-11-01-autotrain_intent_classification_5categories_9027…
ahmedlone127 Nov 1, 2023
01507c9
Add model 2023-11-01-udot_forunf_mk1_en
ahmedlone127 Nov 1, 2023
67fd834
Add model 2023-11-01-hatebert_hate_offensive_oriya_normal_speech_en
ahmedlone127 Nov 1, 2023
1f2727c
Add model 2023-11-01-rubert_base_russian_emotion_detection_ru
ahmedlone127 Nov 1, 2023
c537743
Add model 2023-11-01-scotus_v10_en
ahmedlone127 Nov 1, 2023
c5b7735
Add model 2023-11-01-finetuned_bleurt_large_en
ahmedlone127 Nov 1, 2023
148bf5b
Add model 2023-11-01-huggingface_sentiment_analysis_en
ahmedlone127 Nov 1, 2023
2c325ed
Add model 2023-11-01-moresexistbert_edos_en
ahmedlone127 Nov 1, 2023
218e765
Add model 2023-11-01-bert_tiny_ita_lemma_classification_it
ahmedlone127 Nov 1, 2023
5b45c1d
Add model 2023-11-01-category_categorization_en
ahmedlone127 Nov 1, 2023
c83ec2d
Add model 2023-11-01-disaster_tweet_bert_en
ahmedlone127 Nov 1, 2023
437eea0
Add model 2023-11-01-binary_question_classifier_bert_en
ahmedlone127 Nov 1, 2023
3ee4729
Add model 2023-11-01-parlabert_en
ahmedlone127 Nov 1, 2023
26a49f0
Add model 2023-11-01-yt_list_en
ahmedlone127 Nov 1, 2023
bf0eeb5
Add model 2023-11-01-bert_large_uncased_cola_en
ahmedlone127 Nov 1, 2023
2190f78
Add model 2023-11-01-frugalscore_medium_bert_base_mover_score_en
ahmedlone127 Nov 1, 2023
efe639a
Add model 2023-11-01-sentiment_ohb3_hubert_hungarian_hu
ahmedlone127 Nov 1, 2023
b63d29a
Add model 2023-11-01-hebemo_anger_en
ahmedlone127 Nov 1, 2023
fa6c2ce
Add model 2023-11-01-bert_finetuned_imdb_katrin_kc_en
ahmedlone127 Nov 1, 2023
2f996dc
Add model 2023-11-01-bert_jigsaw_en
ahmedlone127 Nov 1, 2023
d0b6e1b
Add model 2023-11-01-bert_eec_emotion_en
ahmedlone127 Nov 1, 2023
0d2cc31
Add model 2023-11-01-frugalscore_tiny_bert_base_mover_score_en
ahmedlone127 Nov 1, 2023
1604db6
Add model 2023-11-01-negativeresultdetector_en
ahmedlone127 Nov 1, 2023
300a2ff
Add model 2023-11-01-topic_classification_20ng_bert_en
ahmedlone127 Nov 1, 2023
0a3bf36
Add model 2023-11-01-trading_ai_en
ahmedlone127 Nov 1, 2023
42274dc
Add model 2023-11-01-hebemo_surprise_en
ahmedlone127 Nov 1, 2023
7171971
Add model 2023-11-01-beto_sentiment_analysis_spanish_es
ahmedlone127 Nov 1, 2023
85c2f79
Add model 2023-11-01-hebemo_joy_en
ahmedlone127 Nov 1, 2023
001a56b
Add model 2023-11-01-rubert_base_cased_sentiment_study_feedbacks_soly…
ahmedlone127 Nov 1, 2023
1748a5d
Add model 2023-11-01-codeswitch_spaeng_sentiment_analysis_lince_es
ahmedlone127 Nov 1, 2023
d579b67
Add model 2023-11-01-unbias_classifier_en
ahmedlone127 Nov 1, 2023
0552b91
Add model 2023-11-01-bert_large_uncased_wwm_finetuned_boolq_en
ahmedlone127 Nov 1, 2023
8da47ba
Add model 2023-11-01-bert_base_uncased_sst2_modeltc_en
ahmedlone127 Nov 1, 2023
d314282
Add model 2023-11-01-distilbert_portuguese_cased_finetuned_quantity_en
ahmedlone127 Nov 1, 2023
1526ba2
Add model 2023-11-01-rosatom_survey_sentiment_classifier_en
ahmedlone127 Nov 1, 2023
78ea306
Add model 2023-11-01-hse_vk_nlp_sentiment_version7_en
ahmedlone127 Nov 1, 2023
76bd7b4
Add model 2023-11-01-persian_text_sentiment_bert_v1_fa
ahmedlone127 Nov 1, 2023
b9a8060
Add model 2023-11-01-dummy_model_helloworld2307_en
ahmedlone127 Nov 1, 2023
05f3238
Add model 2023-11-01-comment_detection_prop_16_en
ahmedlone127 Nov 1, 2023
00ea950
Add model 2023-11-01-bert_bank_model_tr
ahmedlone127 Nov 1, 2023
0aa9e6a
Add model 2023-11-01-bibert_subjectivity_en
ahmedlone127 Nov 1, 2023
d0833af
Add model 2023-11-01-spam_ham_classifier_just_text_en
ahmedlone127 Nov 1, 2023
6af0a2d
Add model 2023-11-01-bert_finetuned_gender_classification_en
ahmedlone127 Nov 1, 2023
3ffb2c7
Add model 2023-11-01-bert_election2020_twitter_stance_trump_en
ahmedlone127 Nov 1, 2023
5ff3045
Add model 2023-11-01-german_covid_vaccine_misinformation_classifier_en
ahmedlone127 Nov 1, 2023
8a9148e
Add model 2023-11-01-bert_amazon_product_classification_epoch_0_en
ahmedlone127 Nov 1, 2023
8fa7f53
Add model 2023-11-01-bert_base_multilingual_cased_finetuned_emotion_t…
ahmedlone127 Nov 1, 2023
52e0a2c
Add model 2023-11-01-bert_ft_qqp_6ep_42_en
ahmedlone127 Nov 1, 2023
d2bd7f1
Add model 2023-11-01-modified_bert_toxicity_classification_en
ahmedlone127 Nov 1, 2023
eb6e69b
Add model 2023-11-01-iljp_incaselawbert_fine_tuned_5_epochs_en
ahmedlone127 Nov 1, 2023
61dce48
Add model 2023-11-01-lyric_tonga_tonga_islands_genre_en
ahmedlone127 Nov 1, 2023
266ae32
Add model 2023-11-01-tiny_random_bertforsequenceclassification_ydshie…
ahmedlone127 Nov 1, 2023
ade2ccd
Add model 2023-11-01-dr_en
ahmedlone127 Nov 1, 2023
139801b
Add model 2023-11-01-bert_base_uncased_finetuned_boolq_en
ahmedlone127 Nov 1, 2023
ea85ed3
Add model 2023-11-01-tinybert_29_med_intents_en
ahmedlone127 Nov 1, 2023
004fdb0
Add model 2023-11-01-finbert_fomc_en
ahmedlone127 Nov 1, 2023
a1aa3bc
Add model 2023-11-01-halacha_classifier_en
ahmedlone127 Nov 1, 2023
0dbc014
Add model 2023-11-01-log_classifier_distilbert_en
ahmedlone127 Nov 1, 2023
0690145
Add model 2023-11-01-headlinepopularity_en
ahmedlone127 Nov 1, 2023
9dabe0d
Add model 2023-11-01-jailbreak_classifier_en
ahmedlone127 Nov 1, 2023
925c7b4
Add model 2023-11-01-bert_base_uncased_header_textsim_en
ahmedlone127 Nov 1, 2023
cd61983
Add model 2023-11-01-indobert_classification_en
ahmedlone127 Nov 1, 2023
79765b8
Add model 2023-11-01-hebemo_sadness_en
ahmedlone127 Nov 1, 2023
0705128
Add model 2023-11-01-ag_news1_en
ahmedlone127 Nov 1, 2023
e5d33b9
Add model 2023-11-01-rubert_conversational_russian_sentiment_rusentim…
ahmedlone127 Nov 1, 2023
7012471
Add model 2023-11-01-mbzuai_political_bias_bert_en
ahmedlone127 Nov 1, 2023
9fe208a
Add model 2023-11-01-guardrail_en
ahmedlone127 Nov 1, 2023
18317d1
Add model 2023-11-01-indobert_crossencoder_mmarco_en
ahmedlone127 Nov 1, 2023
84dd875
Add model 2023-11-01-hackmit_finetuned_sst2_blaine_mason_en
ahmedlone127 Nov 1, 2023
10d6018
Add model 2023-11-01-chinesesequenceclassification_en
ahmedlone127 Nov 1, 2023
60e82e2
Add model 2023-11-01-hebemo_anticipation_en
ahmedlone127 Nov 1, 2023
8c64668
Add model 2023-11-01-hate_speech_detection_in_amharic_language_mbert_am
ahmedlone127 Nov 1, 2023
260cdff
Add model 2023-11-01-adultcontentclassifier_en
ahmedlone127 Nov 1, 2023
3c6cd92
Add model 2023-11-01-pubmed_biobert_text_classification_en
ahmedlone127 Nov 1, 2023
08d602f
Add model 2023-11-01-intent_cls_en
ahmedlone127 Nov 1, 2023
26cca4c
Add model 2023-11-01-toxicitymodelpt_pt
ahmedlone127 Nov 1, 2023
acc4fb9
Add model 2023-11-01-bert_french_en
ahmedlone127 Nov 1, 2023
1d31d14
Add model 2023-11-01-16_combo_webscrap_1709_v1_en
ahmedlone127 Nov 1, 2023
f3671e1
Add model 2023-11-01-finetuning_multilingual_bert_other_xx
ahmedlone127 Nov 1, 2023
5d826aa
Add model 2023-11-01-bert_base_turkish_cased_offensive_tr
ahmedlone127 Nov 1, 2023
3ec5e78
Add model 2023-11-01-maverick_midas_en
ahmedlone127 Nov 1, 2023
14a50d1
Add model 2023-11-01-absa_aspectsentiment_hotels_en
ahmedlone127 Nov 1, 2023
75dd947
Add model 2023-11-01-swahbert_sw
ahmedlone127 Nov 1, 2023
ef9b961
Add model 2023-11-01-bert_base_uncased_cola_yoshitomo_matsubara_en
ahmedlone127 Nov 1, 2023
5f54e8d
Add model 2023-11-01-odio_bert_en
ahmedlone127 Nov 1, 2023
25e38f0
Add model 2023-11-01-told_breton_binary_samoan_bertimbau_pt
ahmedlone127 Nov 1, 2023
39eb764
Add model 2023-11-01-autotrain_crenderping1_0_89162143881_en
ahmedlone127 Nov 1, 2023
751746a
Add model 2023-11-01-hse_vk_nlp_sentiment_version3_en
ahmedlone127 Nov 1, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
---
layout: model
title: English 16_combo_webscrap_1709_v1 BertForSequenceClassification from dsmsb
author: John Snow Labs
name: 16_combo_webscrap_1709_v1
date: 2023-11-01
tags: [bert, en, open_source, sequence_classification, onnx]
task: Text Classification
language: en
edition: Spark NLP 5.1.4
spark_version: 3.4
supported: true
engine: onnx
annotator: BertForSequenceClassification
article_header:
type: cover
use_language_switcher: "Python-Scala-Java"
---

## Description

Pretrained BertForSequenceClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`16_combo_webscrap_1709_v1` is a English model originally trained by dsmsb.

{:.btn-box}
<button class="button button-orange" disabled>Live Demo</button>
<button class="button button-orange" disabled>Open in Colab</button>
[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/16_combo_webscrap_1709_v1_en_5.1.4_3.4_1698870052077.zip){:.button.button-orange.button-orange-trans.arr.button-icon}
[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/16_combo_webscrap_1709_v1_en_5.1.4_3.4_1698870052077.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}

## How to use



<div class="tabs-box" markdown="1">
{% include programmingLanguageSelectScalaPythonNLU.html %}
```python

document_assembler = DocumentAssembler()\
.setInputCol("text")\
.setOutputCol("document")

tokenizer = Tokenizer()\
.setInputCols("document")\
.setOutputCol("token")

sequenceClassifier = BertForSequenceClassification.pretrained("16_combo_webscrap_1709_v1","en")\
.setInputCols(["document","token"])\
.setOutputCol("class")

pipeline = Pipeline().setStages([document_assembler, tokenizer, sequenceClassifier])

data = spark.createDataFrame([["PUT YOUR STRING HERE"]]).toDF("text")

result = pipeline.fit(data).transform(data)

```
```scala

val document_assembler = new DocumentAssembler()
.setInputCol("text")
.setOutputCol("document")

val tokenizer = new Tokenizer()
.setInputCols("document")
.setOutputCol("token")

val sequenceClassifier = BertForSequenceClassification.pretrained("16_combo_webscrap_1709_v1","en")
.setInputCols(Array("document","token"))
.setOutputCol("class")

val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, sequenceClassifier))

val data = Seq("PUT YOUR STRING HERE").toDS.toDF("text")

val result = pipeline.fit(data).transform(data)


```
</div>

{:.model-param}
## Model Information

{:.table-model}
|---|---|
|Model Name:|16_combo_webscrap_1709_v1|
|Compatibility:|Spark NLP 5.1.4+|
|License:|Open Source|
|Edition:|Official|
|Input Labels:|[documents, token]|
|Output Labels:|[class]|
|Language:|en|
|Size:|667.3 MB|

## References

https://huggingface.co/dsmsb/16_combo_webscrap_1709_v1
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
---
layout: model
title: English absa_aspectsentiment_hotels BertForSequenceClassification from MutazYoune
author: John Snow Labs
name: absa_aspectsentiment_hotels
date: 2023-11-01
tags: [bert, en, open_source, sequence_classification, onnx]
task: Text Classification
language: en
edition: Spark NLP 5.1.4
spark_version: 3.4
supported: true
engine: onnx
annotator: BertForSequenceClassification
article_header:
type: cover
use_language_switcher: "Python-Scala-Java"
---

## Description

Pretrained BertForSequenceClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`absa_aspectsentiment_hotels` is a English model originally trained by MutazYoune.

{:.btn-box}
<button class="button button-orange" disabled>Live Demo</button>
<button class="button button-orange" disabled>Open in Colab</button>
[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/absa_aspectsentiment_hotels_en_5.1.4_3.4_1698871310830.zip){:.button.button-orange.button-orange-trans.arr.button-icon}
[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/absa_aspectsentiment_hotels_en_5.1.4_3.4_1698871310830.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}

## How to use



<div class="tabs-box" markdown="1">
{% include programmingLanguageSelectScalaPythonNLU.html %}
```python

document_assembler = DocumentAssembler()\
.setInputCol("text")\
.setOutputCol("document")

tokenizer = Tokenizer()\
.setInputCols("document")\
.setOutputCol("token")

sequenceClassifier = BertForSequenceClassification.pretrained("absa_aspectsentiment_hotels","en")\
.setInputCols(["document","token"])\
.setOutputCol("class")

pipeline = Pipeline().setStages([document_assembler, tokenizer, sequenceClassifier])

data = spark.createDataFrame([["PUT YOUR STRING HERE"]]).toDF("text")

result = pipeline.fit(data).transform(data)

```
```scala

val document_assembler = new DocumentAssembler()
.setInputCol("text")
.setOutputCol("document")

val tokenizer = new Tokenizer()
.setInputCols("document")
.setOutputCol("token")

val sequenceClassifier = BertForSequenceClassification.pretrained("absa_aspectsentiment_hotels","en")
.setInputCols(Array("document","token"))
.setOutputCol("class")

val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, sequenceClassifier))

val data = Seq("PUT YOUR STRING HERE").toDS.toDF("text")

val result = pipeline.fit(data).transform(data)


```
</div>

{:.model-param}
## Model Information

{:.table-model}
|---|---|
|Model Name:|absa_aspectsentiment_hotels|
|Compatibility:|Spark NLP 5.1.4+|
|License:|Open Source|
|Edition:|Official|
|Input Labels:|[documents, token]|
|Output Labels:|[class]|
|Language:|en|
|Size:|408.6 MB|

## References

https://huggingface.co/MutazYoune/Absa_AspectSentiment_hotels
97 changes: 97 additions & 0 deletions docs/_posts/ahmedlone127/2023-11-01-adultcontentclassifier_en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
---
layout: model
title: English adultcontentclassifier BertForSequenceClassification from ziadA123
author: John Snow Labs
name: adultcontentclassifier
date: 2023-11-01
tags: [bert, en, open_source, sequence_classification, onnx]
task: Text Classification
language: en
edition: Spark NLP 5.1.4
spark_version: 3.4
supported: true
engine: onnx
annotator: BertForSequenceClassification
article_header:
type: cover
use_language_switcher: "Python-Scala-Java"
---

## Description

Pretrained BertForSequenceClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`adultcontentclassifier` is a English model originally trained by ziadA123.

{:.btn-box}
<button class="button button-orange" disabled>Live Demo</button>
<button class="button button-orange" disabled>Open in Colab</button>
[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/adultcontentclassifier_en_5.1.4_3.4_1698868207729.zip){:.button.button-orange.button-orange-trans.arr.button-icon}
[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/adultcontentclassifier_en_5.1.4_3.4_1698868207729.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}

## How to use



<div class="tabs-box" markdown="1">
{% include programmingLanguageSelectScalaPythonNLU.html %}
```python

document_assembler = DocumentAssembler()\
.setInputCol("text")\
.setOutputCol("document")

tokenizer = Tokenizer()\
.setInputCols("document")\
.setOutputCol("token")

sequenceClassifier = BertForSequenceClassification.pretrained("adultcontentclassifier","en")\
.setInputCols(["document","token"])\
.setOutputCol("class")

pipeline = Pipeline().setStages([document_assembler, tokenizer, sequenceClassifier])

data = spark.createDataFrame([["PUT YOUR STRING HERE"]]).toDF("text")

result = pipeline.fit(data).transform(data)

```
```scala

val document_assembler = new DocumentAssembler()
.setInputCol("text")
.setOutputCol("document")

val tokenizer = new Tokenizer()
.setInputCols("document")
.setOutputCol("token")

val sequenceClassifier = BertForSequenceClassification.pretrained("adultcontentclassifier","en")
.setInputCols(Array("document","token"))
.setOutputCol("class")

val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, sequenceClassifier))

val data = Seq("PUT YOUR STRING HERE").toDS.toDF("text")

val result = pipeline.fit(data).transform(data)


```
</div>

{:.model-param}
## Model Information

{:.table-model}
|---|---|
|Model Name:|adultcontentclassifier|
|Compatibility:|Spark NLP 5.1.4+|
|License:|Open Source|
|Edition:|Official|
|Input Labels:|[documents, token]|
|Output Labels:|[class]|
|Language:|en|
|Size:|608.8 MB|

## References

https://huggingface.co/ziadA123/adultcontentclassifier
97 changes: 97 additions & 0 deletions docs/_posts/ahmedlone127/2023-11-01-ag_news1_en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
---
layout: model
title: English ag_news1 BertForSequenceClassification from Lumos
author: John Snow Labs
name: ag_news1
date: 2023-11-01
tags: [bert, en, open_source, sequence_classification, onnx]
task: Text Classification
language: en
edition: Spark NLP 5.1.4
spark_version: 3.4
supported: true
engine: onnx
annotator: BertForSequenceClassification
article_header:
type: cover
use_language_switcher: "Python-Scala-Java"
---

## Description

Pretrained BertForSequenceClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.`ag_news1` is a English model originally trained by Lumos.

{:.btn-box}
<button class="button button-orange" disabled>Live Demo</button>
<button class="button button-orange" disabled>Open in Colab</button>
[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/ag_news1_en_5.1.4_3.4_1698864743178.zip){:.button.button-orange.button-orange-trans.arr.button-icon}
[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/ag_news1_en_5.1.4_3.4_1698864743178.zip){:.button.button-orange.button-orange-trans.button-icon.button-copy-s3}

## How to use



<div class="tabs-box" markdown="1">
{% include programmingLanguageSelectScalaPythonNLU.html %}
```python

document_assembler = DocumentAssembler()\
.setInputCol("text")\
.setOutputCol("document")

tokenizer = Tokenizer()\
.setInputCols("document")\
.setOutputCol("token")

sequenceClassifier = BertForSequenceClassification.pretrained("ag_news1","en")\
.setInputCols(["document","token"])\
.setOutputCol("class")

pipeline = Pipeline().setStages([document_assembler, tokenizer, sequenceClassifier])

data = spark.createDataFrame([["PUT YOUR STRING HERE"]]).toDF("text")

result = pipeline.fit(data).transform(data)

```
```scala

val document_assembler = new DocumentAssembler()
.setInputCol("text")
.setOutputCol("document")

val tokenizer = new Tokenizer()
.setInputCols("document")
.setOutputCol("token")

val sequenceClassifier = BertForSequenceClassification.pretrained("ag_news1","en")
.setInputCols(Array("document","token"))
.setOutputCol("class")

val pipeline = new Pipeline().setStages(Array(documentAssembler, tokenizer, sequenceClassifier))

val data = Seq("PUT YOUR STRING HERE").toDS.toDF("text")

val result = pipeline.fit(data).transform(data)


```
</div>

{:.model-param}
## Model Information

{:.table-model}
|---|---|
|Model Name:|ag_news1|
|Compatibility:|Spark NLP 5.1.4+|
|License:|Open Source|
|Edition:|Official|
|Input Labels:|[documents, token]|
|Output Labels:|[class]|
|Language:|en|
|Size:|409.4 MB|

## References

https://huggingface.co/Lumos/ag_news1
Loading