Skip to content

Commit

Permalink
2023-03-06-distilbert_token_classifier_ner_roles_openapi_en (#13613)
Browse files Browse the repository at this point in the history
* Add model 2023-03-06-distilbert_token_classifier_ner_roles_openapi_en

* Add model 2023-03-06-distilbert_token_classifier_base_ner_en

* Add model 2023-03-06-distilbert_token_classifier_base_uncased_ft_conll2003_en

* Add model 2023-03-06-distilbert_token_classifier_keyphrase_extraction_kptimes_en

* Add model 2023-03-06-distilbert_token_classifier_keyphrase_extraction_inspec_en

* Add model 2023-03-06-distilbert_token_classifier_base_uncased_finetuned_conll2003_en

* Add model 2023-03-06-distilbert_token_classifier_autotrain_job_all_903929564_en

* Add model 2023-03-06-distilbert_token_classifier_autotrain_company_vs_all_902129475_en

* Add model 2023-03-06-distilbert_token_classifier_autotrain_final_784824218_en

* Add model 2023-03-06-distilbert_token_classifier_autotrain_ner_778023879_en

* Add model 2023-03-06-distilbert_token_classifier_autotrain_name_all_904029577_en

* Add model 2023-03-06-distilbert_tok_classifier_typo_detector_en

* Add model 2023-03-06-distilbert_token_classifier_autotrain_name_all_904029569_en

* Add model 2023-03-06-distilbert_token_classifier_autotrain_name_vsv_all_901529445_en

* Add model 2023-03-06-dtilbert_token_classifier_typo_detector_is

* Add model 2023-03-06-distilbert_token_classifier_icelandic_ner_distilbert_is

* Add model 2023-03-06-distilbert_token_classifier_autotrain_final_784824211_en

* Add model 2023-03-06-distilbert_token_classifier_autotrain_company_all_903429548_en

* Add model 2023-03-06-distilbert_token_classifier_autotrain_final_784824209_en

* Add model 2023-03-06-distilbert_token_classifier_keyphrase_extraction_openkp_en

* Add model 2023-03-06-distilbert_token_classifier_autotrain_company_all_903429540_en

* Add model 2023-03-06-distilbert_token_classifier_cpener_test_en

* Update 2023-03-06-dtilbert_token_classifier_typo_detector_is.md

Fixed typo

* Update 2023-03-06-distilbert_token_classifier_icelandic_ner_distilbert_is.md

Fixed model name

---------

Co-authored-by: gokhanturer <mgturer@gmail.com>
Co-authored-by: Gökhan <81560784+gokhanturer@users.noreply.github.com>
  • Loading branch information
3 people authored Mar 12, 2023
1 parent e21e07c commit 84986ff
Show file tree
Hide file tree
Showing 22 changed files with 2,172 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
---
layout: model
title: English DistilBertForTokenClassification Cased model (from m3hrdadfi)
author: John Snow Labs
name: distilbert_tok_classifier_typo_detector
date: 2023-03-06
tags: [en, open_source, distilbert, token_classification, ner, tensorflow]
task: Named Entity Recognition
language: en
edition: Spark NLP 4.3.1
spark_version: 3.0
supported: true
engine: tensorflow
annotator: DistilBertForTokenClassification
article_header:
type: cover
use_language_switcher: "Python-Scala-Java"
---

## Description

Pretrained DistilBertForTokenClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `typo-detector-distilbert-en` is a English model originally trained by `m3hrdadfi`.

## Predicted Entities

`TYPO`

{:.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/distilbert_tok_classifier_typo_detector_en_4.3.1_3.0_1678134333311.zip){:.button.button-orange}
[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/distilbert_tok_classifier_typo_detector_en_4.3.1_3.0_1678134333311.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
documentAssembler = DocumentAssembler() \
.setInputCols(["text"]) \
.setOutputCols("document")

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

tokenClassifier = DistilBertForTokenClassification.pretrained("distilbert_tok_classifier_typo_detector","en") \
.setInputCols(["document", "token"]) \
.setOutputCol("ner")

pipeline = Pipeline(stages=[documentAssembler, tokenizer, tokenClassifier])

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 tokenClassifier = DistilBertForTokenClassification.pretrained("distilbert_tok_classifier_typo_detector","en")
.setInputCols(Array("document", "token"))
.setOutputCol("ner")

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

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:|distilbert_tok_classifier_typo_detector|
|Compatibility:|Spark NLP 4.3.1+|
|License:|Open Source|
|Edition:|Official|
|Input Labels:|[document, token]|
|Output Labels:|[ner]|
|Language:|en|
|Size:|244.1 MB|
|Case sensitive:|true|
|Max sentence length:|128|

## References

- https://huggingface.co/m3hrdadfi/typo-detector-distilbert-en
- https://github.com/neuspell/neuspell
- https://github.com/m3hrdadfi/typo-detector/issues
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
---
layout: model
title: English DistilBertForTokenClassification Cased model (from ismail-lucifer011)
author: John Snow Labs
name: distilbert_token_classifier_autotrain_company_all_903429540
date: 2023-03-06
tags: [en, open_source, distilbert, token_classification, ner, tensorflow]
task: Named Entity Recognition
language: en
edition: Spark NLP 4.3.1
spark_version: 3.0
supported: true
engine: tensorflow
annotator: DistilBertForTokenClassification
article_header:
type: cover
use_language_switcher: "Python-Scala-Java"
---

## Description

Pretrained DistilBertForTokenClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `autotrain-company_all-903429540` is a English model originally trained by `ismail-lucifer011`.

## Predicted Entities

`Company`, `OOV`

{:.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/distilbert_token_classifier_autotrain_company_all_903429540_en_4.3.1_3.0_1678134087932.zip){:.button.button-orange}
[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/distilbert_token_classifier_autotrain_company_all_903429540_en_4.3.1_3.0_1678134087932.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
documentAssembler = DocumentAssembler() \
.setInputCols(["text"]) \
.setOutputCols("document")

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

tokenClassifier = DistilBertForTokenClassification.pretrained("distilbert_token_classifier_autotrain_company_all_903429540","en") \
.setInputCols(["document", "token"]) \
.setOutputCol("ner")

pipeline = Pipeline(stages=[documentAssembler, tokenizer, tokenClassifier])

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 tokenClassifier = DistilBertForTokenClassification.pretrained("distilbert_token_classifier_autotrain_company_all_903429540","en")
.setInputCols(Array("document", "token"))
.setOutputCol("ner")

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

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:|distilbert_token_classifier_autotrain_company_all_903429540|
|Compatibility:|Spark NLP 4.3.1+|
|License:|Open Source|
|Edition:|Official|
|Input Labels:|[document, token]|
|Output Labels:|[ner]|
|Language:|en|
|Size:|247.5 MB|
|Case sensitive:|true|
|Max sentence length:|128|

## References

- https://huggingface.co/ismail-lucifer011/autotrain-company_all-903429540
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
---
layout: model
title: English DistilBertForTokenClassification Cased model (from ismail-lucifer011)
author: John Snow Labs
name: distilbert_token_classifier_autotrain_company_all_903429548
date: 2023-03-06
tags: [en, open_source, distilbert, token_classification, ner, tensorflow]
task: Named Entity Recognition
language: en
edition: Spark NLP 4.3.1
spark_version: 3.0
supported: true
engine: tensorflow
annotator: DistilBertForTokenClassification
article_header:
type: cover
use_language_switcher: "Python-Scala-Java"
---

## Description

Pretrained DistilBertForTokenClassification model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. `autotrain-company_all-903429548` is a English model originally trained by `ismail-lucifer011`.

## Predicted Entities

`Company`, `OOV`

{:.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/distilbert_token_classifier_autotrain_company_all_903429548_en_4.3.1_3.0_1678134060472.zip){:.button.button-orange}
[Copy S3 URI](s3://auxdata.johnsnowlabs.com/public/models/distilbert_token_classifier_autotrain_company_all_903429548_en_4.3.1_3.0_1678134060472.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
documentAssembler = DocumentAssembler() \
.setInputCols(["text"]) \
.setOutputCols("document")

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

tokenClassifier = DistilBertForTokenClassification.pretrained("distilbert_token_classifier_autotrain_company_all_903429548","en") \
.setInputCols(["document", "token"]) \
.setOutputCol("ner")

pipeline = Pipeline(stages=[documentAssembler, tokenizer, tokenClassifier])

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 tokenClassifier = DistilBertForTokenClassification.pretrained("distilbert_token_classifier_autotrain_company_all_903429548","en")
.setInputCols(Array("document", "token"))
.setOutputCol("ner")

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

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:|distilbert_token_classifier_autotrain_company_all_903429548|
|Compatibility:|Spark NLP 4.3.1+|
|License:|Open Source|
|Edition:|Official|
|Input Labels:|[document, token]|
|Output Labels:|[ner]|
|Language:|en|
|Size:|247.5 MB|
|Case sensitive:|true|
|Max sentence length:|128|

## References

- https://huggingface.co/ismail-lucifer011/autotrain-company_all-903429548
Loading

0 comments on commit 84986ff

Please sign in to comment.