Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,36 @@
|
|
1 |
-
---
|
2 |
-
license: mit
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: mit
|
3 |
+
language:
|
4 |
+
- th
|
5 |
+
tags:
|
6 |
+
- sequence-tagging
|
7 |
+
- aspect-based-sentiment
|
8 |
+
---
|
9 |
+
|
10 |
+
# XLM-RoBERTa-Large for Aspect-Based Sentiment Analysis
|
11 |
+
|
12 |
+
This is a fine-tuned XLM-RoBERTa-Large model for Aspect-Based Sentiment Analysis in Thai. The model is fine-tuned on a dataset specifically for the task of identifying sentiments related to specific aspects within sentences.
|
13 |
+
|
14 |
+
## Model Description
|
15 |
+
|
16 |
+
XLM-RoBERTa is a large multilingual language model that has been fine-tuned for sequence tagging tasks. This model has been further fine-tuned for Aspect-Based Sentiment Analysis, making it suitable for applications that require understanding of sentiments expressed towards specific aspects within a text.
|
17 |
+
|
18 |
+
## Usage
|
19 |
+
|
20 |
+
You can use this model for sequence tagging and aspect-based sentiment analysis in the Thai language. Here is a quick example of how to use it:
|
21 |
+
|
22 |
+
```python
|
23 |
+
from transformers import AutoTokenizer, AutoModelForTokenClassification
|
24 |
+
from transformers import pipeline
|
25 |
+
|
26 |
+
tokenizer = AutoTokenizer.from_pretrained("path_to_your_model")
|
27 |
+
model = AutoModelForTokenClassification.from_pretrained("path_to_your_model")
|
28 |
+
|
29 |
+
nlp = pipeline("token-classification", model=model, tokenizer=tokenizer)
|
30 |
+
|
31 |
+
text = "ใส่ประโยคภาษาไทยที่ต้องการวิเคราะห์ที่นี่"
|
32 |
+
result = nlp(text)
|
33 |
+
|
34 |
+
for item in result:
|
35 |
+
print(item)
|
36 |
+
|