Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,41 @@
|
|
1 |
---
|
|
|
|
|
|
|
|
|
|
|
2 |
license: apache-2.0
|
|
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
language:
|
3 |
+
- ru
|
4 |
+
- ru-RU
|
5 |
+
tags:
|
6 |
+
- token-classification
|
7 |
license: apache-2.0
|
8 |
+
inference: false
|
9 |
+
|
10 |
---
|
11 |
+
|
12 |
+
# RuWordStressTransformer
|
13 |
+
|
14 |
+
## Model description
|
15 |
+
|
16 |
+
Transformer encoder for predicting word stress in Russian.
|
17 |
+
|
18 |
+
## Intended uses & limitations
|
19 |
+
|
20 |
+
#### How to use
|
21 |
+
|
22 |
+
```python
|
23 |
+
from transformers import AutoTokenizer, AutoModelForTokenClassification, pipeline
|
24 |
+
|
25 |
+
model_name = "IlyaGusev/ru-word-stress-transformer"
|
26 |
+
tokenizer = AutoTokenizer.from_pretrained(
|
27 |
+
model_name,
|
28 |
+
trust_remote_code=True,
|
29 |
+
revision="3400828"
|
30 |
+
)
|
31 |
+
model = AutoModelForTokenClassification.from_pretrained(model_name)
|
32 |
+
pipe = pipeline(
|
33 |
+
"token-classification",
|
34 |
+
model=model,
|
35 |
+
tokenizer=tokenizer,
|
36 |
+
device=-1,
|
37 |
+
aggregation_strategy="none",
|
38 |
+
ignore_labels=("NO",)
|
39 |
+
)
|
40 |
+
print(pipe("щеколда"))
|
41 |
+
```
|