
# Hungarian Aspect-based Sentiment Analysis with finetuned XLM-RoBERTa model

For further models, scripts and details, see [our repository](https://github.com/nytud/sentiment-analysis) or [our demo site](https://juniper.nytud.hu/demo/nlp).

  - Pretrained model used: XLM-RoBERTa
  - Finetuned on OpinHuBank (OHB) Corpus
  - Labels: 0 (negative), 2 (neutral), 3 (positive)
  - Separator: \</s\>
  	
## Limitations

- max_seq_length = 256

## Results

| Model | OHB | 
| ------------- | ------------- | 
| huBERT | 82.30  |
| XLM-R | 80.59  |


## Usage with pipeline

```python
from transformers import pipeline

classification = pipeline(task="sentiment-analysis", model="NYTK/sentiment-ohb3-xlm-roberta-hungarian")
input_text = "Kovácsné Nagy Erzsébet </s> A Kovácsné Nagy Erzsébet nagyon jól érzi magát a Nokiánál, azonban a Németországból érkezett Kovács Péter nehezen boldogul a beilleszkedéssel."

print(classification(input_text)[0])
```

## Citation
If you use this model, please cite the following paper:

```
@inproceedings {yang-asent,
    title = {Neurális entitásorientált szentimentelemző alkalmazás magyar nyelvre},
	booktitle = {XIX. Magyar Számítógépes Nyelvészeti Konferencia (MSZNY 2023)},
	year = {2023},
	publisher = {Szegedi Tudományegyetem, Informatikai Intézet},
	address = {Szeged, Hungary},
	author = {Yang, Zijian Győző and Laki, László János},
	pages = {107--117}
}

```
{"language": ["hu"], "license": "mit", "tags": ["text-classification"], "metrics": ["accuracy"], "widget": [{"text": "Kov\u00e1csn\u00e9 Nagy Erzs\u00e9bet </s> A Kov\u00e1csn\u00e9 Nagy Erzs\u00e9bet nagyon j\u00f3l \u00e9rzi mag\u00e1t a Noki\u00e1n\u00e1l, azonban a N\u00e9metorsz\u00e1gb\u00f3l \u00e9rkezett Kov\u00e1cs P\u00e9ter nehezen boldogul a beilleszked\u00e9ssel.", "example_title": "positive"}, {"text": "Kov\u00e1cs P\u00e9ter </s> A Kov\u00e1csn\u00e9 Nagy Erzs\u00e9bet nagyon j\u00f3l \u00e9rzi mag\u00e1t a Noki\u00e1n\u00e1l, azonban a N\u00e9metorsz\u00e1gb\u00f3l \u00e9rkezett Kov\u00e1cs P\u00e9ter nehezen boldogul a beilleszked\u00e9ssel.", "example_title": "negative"}, {"text": "Kov\u00e1csn\u00e9 Nagy Erzs\u00e9bet </s> A Kov\u00e1csn\u00e9 Nagy Erzs\u00e9bet azt mondta, hogy a N\u00e9metorsz\u00e1gb\u00f3l \u00e9rkezett Kov\u00e1cs P\u00e9ter nehezen boldogul a beilleszked\u00e9ssel.", "example_title": "neutral"}]}
transformers pytorch xlm-roberta text-classification hu license:mit autotrain_compatible endpoints_compatible region:us
TAGS
#transformers #pytorch #xlm-roberta #text-classification #hu #license-mit #autotrain_compatible #endpoints_compatible #region-us 

Hungarian Aspect-based Sentiment Analysis with finetuned XLM-RoBERTa model
==========================================================================


For further models, scripts and details, see our repository or our demo site.


* Pretrained model used: XLM-RoBERTa
* Finetuned on OpinHuBank (OHB) Corpus
* Labels: 0 (negative), 2 (neutral), 3 (positive)
* Separator: </s>


Limitations
-----------


* max\_seq\_length = 256


Results
-------



Usage with pipeline
-------------------


If you use this model, please cite the following paper:



TAGS
#transformers #pytorch #xlm-roberta #text-classification #hu #license-mit #autotrain_compatible #endpoints_compatible #region-us 

TAGS
#transformers #pytorch #xlm-roberta #text-classification #hu #license-mit #autotrain_compatible #endpoints_compatible #region-us 
