-
Notifications
You must be signed in to change notification settings - Fork 27.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added multiple model_cards for below models (#6666)
* Create README.md * Update README.md * Create README.md * Update README.md * added multiple codeswitch model
- Loading branch information
Showing
7 changed files
with
232 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
model_cards/sagorsarker/codeswitch-hineng-ner-lince/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
language: | ||
- hi | ||
- en | ||
--- | ||
|
||
# codeswitch-hineng-ner-lince | ||
This is a pretrained model for **Name Entity Recognition** 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 | ||
|
||
```py | ||
|
||
from transformers import AutoTokenizer, AutoModelForTokenClassification | ||
|
||
tokenizer = AutoTokenizer.from_pretrained("sagorsarker/codeswitch-hineng-ner-lince") | ||
|
||
model = AutoModelForTokenClassification.from_pretrained("sagorsarker/codeswitch-hineng-ner-lince") | ||
|
||
ner_model = pipeline('ner', model=model, tokenizer=tokenizer) | ||
|
||
ner_model("put any hindi english code-mixed sentence") | ||
|
||
``` | ||
|
||
* Method-2 | ||
|
||
```py | ||
from codeswitch.codeswitch import NER | ||
ner = NER('hin-eng') | ||
text = "" # your mixed sentence | ||
result = ner.tag(text) | ||
print(result) | ||
|
||
``` |
45 changes: 45 additions & 0 deletions
45
model_cards/sagorsarker/codeswitch-hineng-pos-lince/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
--- | ||
language: | ||
- hi | ||
- en | ||
--- | ||
|
||
# codeswitch-hineng-pos-lince | ||
This is a pretrained model for **Part of Speech Tagging** 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 | ||
|
||
```py | ||
|
||
from transformers import AutoTokenizer, AutoModelForTokenClassification | ||
|
||
tokenizer = AutoTokenizer.from_pretrained("sagorsarker/codeswitch-hineng-pos-lince") | ||
|
||
model = AutoModelForTokenClassification.from_pretrained("sagorsarker/codeswitch-hineng-pos-lince") | ||
pos_model = pipeline('ner', model=model, tokenizer=tokenizer) | ||
|
||
pos_model("put any hindi english code-mixed sentence") | ||
|
||
``` | ||
|
||
* Method-2 | ||
|
||
```py | ||
from codeswitch.codeswitch import POS | ||
pos = POS('hin-eng') | ||
text = "" # your mixed sentence | ||
result = pos.tag(text) | ||
print(result) | ||
``` |
47 changes: 47 additions & 0 deletions
47
model_cards/sagorsarker/codeswitch-nepeng-lid-lince/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
language: | ||
- ne | ||
- en | ||
--- | ||
|
||
# codeswitch-nepeng-lid-lince | ||
This is a pretrained model for **language identification** of `nepali-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 | ||
|
||
```py | ||
|
||
from transformers import AutoTokenizer, AutoModelForTokenClassification | ||
|
||
tokenizer = AutoTokenizer.from_pretrained("sagorsarker/codeswitch-nepeng-lid-lince") | ||
|
||
model = AutoModelForTokenClassification.from_pretrained("sagorsarker/codeswitch-nepeng-lid-lince") | ||
lid_model = pipeline('ner', model=model, tokenizer=tokenizer) | ||
|
||
lid_model("put any nepali english code-mixed sentence") | ||
|
||
``` | ||
|
||
* Method-2 | ||
|
||
```py | ||
from codeswitch.codeswitch import LanguageIdentification | ||
lid = LanguageIdentification('nep-eng') | ||
text = "" # your code-mixed sentence | ||
result = lid.identify(text) | ||
print(result) | ||
|
||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
model_cards/sagorsarker/codeswitch-spaeng-ner-lince/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
--- | ||
language: | ||
- es | ||
- en | ||
--- | ||
|
||
# codeswitch-spaeng-ner-lince | ||
This is a pretrained model for **Name Entity Recognition** 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 | ||
|
||
```py | ||
|
||
from transformers import AutoTokenizer, AutoModelForTokenClassification | ||
|
||
tokenizer = AutoTokenizer.from_pretrained("sagorsarker/codeswitch-spaeng-ner-lince") | ||
|
||
model = AutoModelForTokenClassification.from_pretrained("sagorsarker/codeswitch-spaeng-ner-lince") | ||
|
||
ner_model = pipeline('ner', model=model, tokenizer=tokenizer) | ||
|
||
ner_model("put any spanish english code-mixed sentence") | ||
|
||
``` | ||
|
||
* Method-2 | ||
|
||
```py | ||
from codeswitch.codeswitch import NER | ||
ner = NER('spa-eng') | ||
text = "" # your mixed sentence | ||
result = ner.tag(text) | ||
print(result) | ||
``` |
45 changes: 45 additions & 0 deletions
45
model_cards/sagorsarker/codeswitch-spaeng-pos-lince/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
--- | ||
language: | ||
- es | ||
- en | ||
--- | ||
|
||
# codeswitch-spaeng-pos-lince | ||
This is a pretrained model for **Part of Speech Tagging** 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 | ||
|
||
```py | ||
|
||
from transformers import AutoTokenizer, AutoModelForTokenClassification | ||
|
||
tokenizer = AutoTokenizer.from_pretrained("sagorsarker/codeswitch-spaeng-pos-lince") | ||
|
||
model = AutoModelForTokenClassification.from_pretrained("sagorsarker/codeswitch-spaeng-pos-lince") | ||
pos_model = pipeline('ner', model=model, tokenizer=tokenizer) | ||
|
||
pos_model("put any spanish english code-mixed sentence") | ||
|
||
``` | ||
|
||
* Method-2 | ||
|
||
```py | ||
from codeswitch.codeswitch import POS | ||
pos = POS('spa-eng') | ||
text = "" # your mixed sentence | ||
result = pos.tag(text) | ||
print(result) | ||
``` |