Unverified Commit cc4ba79f authored by Sagor Sarker's avatar Sagor Sarker Committed by GitHub
Browse files

added model card for codeswitch-spaeng-sentiment-analysis-lince (#6727)

* added model card for codeswitch-spaeng-sentiment-analysis-lince model also update other model card

* fixed typo

* fixed typo

* fixed typo

* fixed typo

* fixed typo

* fixed typo

* fixed typo

* Update README.md
parent e10fb9cb
......@@ -2,19 +2,35 @@
language:
- hi
- en
datasets:
- LinCE
license: "MIT"
tags:
- codeswitching
- hindi-english
- language-identification
---
# codeswitch-hineng-lid-lince
This is a pretrained model for **language identification** of `hindi-english` code-mixed data used from [LinCE](https://ritual.uh.edu/lince/home)
This model is trained for this below repository.
[https://github.com/sagorbrur/codeswitch](https://github.com/sagorbrur/codeswitch)
To install codeswitch:
```
pip install codeswitch
```
## Identify Language
* Method-1
* **Method-1**
```py
from transformers import AutoTokenizer, AutoModelForTokenClassification
from transformers import AutoTokenizer, AutoModelForTokenClassification, pipeline
tokenizer = AutoTokenizer.from_pretrained("sagorsarker/codeswitch-hineng-lid-lince")
......@@ -25,10 +41,9 @@ lid_model("put any hindi english code-mixed sentence")
```
* Method-2
* **Method-2**
```py
# !pip install codeswitch
from codeswitch.codeswitch import LanguageIdentification
lid = LanguageIdentification('hin-eng')
text = "" # your code-mixed sentence
......
......@@ -2,6 +2,13 @@
language:
- hi
- en
datasets:
- LinCE
license: "MIT"
tags:
- codeswitching
- hindi-english
- ner
---
# codeswitch-hineng-ner-lince
......@@ -17,13 +24,13 @@ To install codeswitch:
pip install codeswitch
```
## Identify Language
## Name Entity Recognition of Code-Mixed Data
* Method-1
* **Method-1**
```py
from transformers import AutoTokenizer, AutoModelForTokenClassification
from transformers import AutoTokenizer, AutoModelForTokenClassification, pipeline
tokenizer = AutoTokenizer.from_pretrained("sagorsarker/codeswitch-hineng-ner-lince")
......@@ -35,7 +42,7 @@ ner_model("put any hindi english code-mixed sentence")
```
* Method-2
* **Method-2**
```py
from codeswitch.codeswitch import NER
......
......@@ -2,6 +2,13 @@
language:
- hi
- en
datasets:
- LinCE
license: "MIT"
tags:
- codeswitching
- hindi-english
- pos
---
# codeswitch-hineng-pos-lince
......@@ -17,13 +24,13 @@ To install codeswitch:
pip install codeswitch
```
## Identify Language
## Part-of-Speech Tagging of Hindi-English Mixed Data
* Method-1
* **Method-1**
```py
from transformers import AutoTokenizer, AutoModelForTokenClassification
from transformers import AutoTokenizer, AutoModelForTokenClassification, pipeline
tokenizer = AutoTokenizer.from_pretrained("sagorsarker/codeswitch-hineng-pos-lince")
......@@ -34,7 +41,7 @@ pos_model("put any hindi english code-mixed sentence")
```
* Method-2
* **Method-2**
```py
from codeswitch.codeswitch import POS
......
......@@ -2,6 +2,13 @@
language:
- ne
- en
datasets:
- LinCE
license: "MIT"
tags:
- codeswitching
- nepali-english
- language-identification
---
# codeswitch-nepeng-lid-lince
......@@ -19,11 +26,11 @@ pip install codeswitch
## Identify Language
* Method-1
* **Method-1**
```py
from transformers import AutoTokenizer, AutoModelForTokenClassification
from transformers import AutoTokenizer, AutoModelForTokenClassification, pipeline
tokenizer = AutoTokenizer.from_pretrained("sagorsarker/codeswitch-nepeng-lid-lince")
......@@ -34,7 +41,7 @@ lid_model("put any nepali english code-mixed sentence")
```
* Method-2
* **Method-2**
```py
from codeswitch.codeswitch import LanguageIdentification
......
......@@ -2,19 +2,35 @@
language:
- es
- en
datasets:
- LinCE
license: "MIT"
tags:
- codeswitching
- spanish-english
- language-identification
---
# codeswitch-spaeng-lid-lince
This is a pretrained model for **language identification** of `spanish-english` code-mixed data used from [LinCE](https://ritual.uh.edu/lince/home)
This model is trained for this below repository.
[https://github.com/sagorbrur/codeswitch](https://github.com/sagorbrur/codeswitch)
To install codeswitch:
```
pip install codeswitch
```
## Identify Language
* Method-1
* **Method-1**
```py
from transformers import AutoTokenizer, AutoModelForTokenClassification
from transformers import AutoTokenizer, AutoModelForTokenClassification, pipeline
tokenizer = AutoTokenizer.from_pretrained("sagorsarker/codeswitch-spaeng-lid-lince")
......@@ -25,10 +41,9 @@ lid_model("put any spanish english code-mixed sentence")
```
* Method-2
* **Method-2**
```py
# !pip install codeswitch
from codeswitch.codeswitch import LanguageIdentification
lid = LanguageIdentification('spa-eng')
text = "" # your code-mixed sentence
......
......@@ -2,6 +2,13 @@
language:
- es
- en
datasets:
- LinCE
license: "MIT"
tags:
- codeswitching
- spanish-english
- ner
---
# codeswitch-spaeng-ner-lince
......@@ -17,13 +24,13 @@ To install codeswitch:
pip install codeswitch
```
## Identify Language
## Name Entity Recognition of Spanish-English Mixed Data
* Method-1
* **Method-1**
```py
from transformers import AutoTokenizer, AutoModelForTokenClassification
from transformers import AutoTokenizer, AutoModelForTokenClassification, pipeline
tokenizer = AutoTokenizer.from_pretrained("sagorsarker/codeswitch-spaeng-ner-lince")
......@@ -35,7 +42,7 @@ ner_model("put any spanish english code-mixed sentence")
```
* Method-2
* **Method-2**
```py
from codeswitch.codeswitch import NER
......
......@@ -2,6 +2,13 @@
language:
- es
- en
datasets:
- LinCE
license: "MIT"
tags:
- codeswitching
- spanish-english
- pos
---
# codeswitch-spaeng-pos-lince
......@@ -17,13 +24,13 @@ To install codeswitch:
pip install codeswitch
```
## Identify Language
## Part-of-Speech Tagging of Spanish-English Mixed Data
* Method-1
* **Method-1**
```py
from transformers import AutoTokenizer, AutoModelForTokenClassification
from transformers import AutoTokenizer, AutoModelForTokenClassification, pipeline
tokenizer = AutoTokenizer.from_pretrained("sagorsarker/codeswitch-spaeng-pos-lince")
......@@ -34,7 +41,7 @@ pos_model("put any spanish english code-mixed sentence")
```
* Method-2
* **Method-2**
```py
from codeswitch.codeswitch import POS
......
---
language:
- es
- en
datasets:
- LinCE
license: "MIT"
tags:
- codeswitching
- spanish-english
- sentiment-analysis
---
# codeswitch-spaeng-sentiment-analysis-lince
This is a pretrained model for **Sentiment Analysis** of `spanish-english` code-mixed data used from [LinCE](https://ritual.uh.edu/lince/home)
This model is trained for this below repository.
[https://github.com/sagorbrur/codeswitch](https://github.com/sagorbrur/codeswitch)
To install codeswitch:
```
pip install codeswitch
```
## Sentiment Analysis of Spanish-English Code-Mixed Data
* **Method-1**
```py
from transformers import AutoTokenizer, AutoModelForSequenceClassification, pipeline
tokenizer = AutoTokenizer.from_pretrained("sagorsarker/codeswitch-spaeng-sentiment-analysis-lince")
model = AutoModelForSequenceClassification.from_pretrained("sagorsarker/codeswitch-spaeng-sentiment-analysis-lince")
nlp = pipeline('sentiment-analysis', model=model, tokenizer=tokenizer)
sentence = "El perro le ladraba a La Gatita .. .. lol #teamlagatita en las playas de Key Biscayne este Memorial day"
nlp(sentence)
```
* **Method-2**
```py
from codeswitch.codeswitch import SentimentAnalysis
sa = SentimentAnalysis('spa-eng')
sentence = "El perro le ladraba a La Gatita .. .. lol #teamlagatita en las playas de Key Biscayne este Memorial day"
result = sa.analyze(sentence)
print(result)
```
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment