0111 0112 0113 0114 0115 0116 0119 0121 0122 0123 0124 0125 0126 0127 0128 0129 0130 0141 0142 0143 0144 0145 0146 0147 0149 0150 0161 0162 0163 0164 0170 0210 0220 0230 0240 0311 0312 0321 0322 0510 0520 0610 0620 0710 0721 0729 0811 0812 0891 0892 0893 0899 0910 0990 1011 1012 1013 1020 1031 1032 1039 1041 1042 1051 1052 1061 1062 1071 1072 1073 1081 1082 1083 1084 1085 1086 1089 1091 1092 1101 1102 1103 1104 1105 1106 1107 1200 1310 1320 1330 1391 1392 1393 1394 1395 1396 1399 1411 1412 1413 1414 1419 1420 1431 1439 1511 1512 1520 1610 1621 1622 1623 1624 1629 1711 1712 1721 1722 1723 1724 1729 1811 1812 1813 1814 1820 1910 1920 2011 2012 2013 2014 2015 2016 2017 2020 2030 2041 2042 2051 2052 2053 2059 2060 2110 2120 2211 2219 2221 2222 2223 2229 2311 2312 2313 2314 2319 2320 2331 2332 2341 2342 2343 2344 2349 2351 2352 2361 2362 2363 2364 2365 2369 2370 2391 2399 2410 2420 2431 2432 2433 2434 2441 2442 2443 2444 2445 2446 2451 2452 2453 2454 2511 2512 2521 2529 2530 2540 2550 2561 2562 2571 2572 2573 2591 2592 2593 2594 2599 2611 2612 2620 2630 2640 2651 2652 2660 2670 2680 2711 2712 2720 2731 2732 2733 2740 2751 2752 2790 2811 2812 2813 2814 2815 2821 2822 2823 2824 2825 2829 2830 2841 2849 2891 2892 2893 2894 2895 2896 2899 2910 2920 2931 2932 3011 3012 3020 3030 3040 3091 3092 3099 3101 3102 3103 3109 3211 3212 3213 3220 3230 3240 3250 3291 3299 3311 3312 3313 3314 3315 3316 3317 3319 3320 3511 3512 3513 3514 3521 3522 3523 3530 3600 3700 3811 3812 3821 3822 3831 3832 3900 4110 4120 4211 4212 4213 4221 4222 4291 4299 4311 4312 4313 4321 4322 4329 4331 4332 4333 4334 4339 4391 4399 4511 4519 4520 4531 4532 4540 4611 4612 4613 4614 4615 4616 4617 4618 4619 4621 4622 4623 4624 4631 4632 4633 4634 4635 4636 4637 4638 4639 4641 4642 4643 4644 4645 4646 4647 4648 4649 4651 4652 4661 4662 4663 4664 4665 4666 4669 4671 4672 4673 4674 4675 4676 4677 4690 4711 4719 4721 4722 4723 4724 4725 4726 4729 4730 4741 4742 4743 4751 4752 4753 4754 4759 4761 4762 4763 4764 4765 4771 4772 4773 4774 4775 4776 4777 4778 4779 4781 4782 4789 4791 4799 4910 4920 4931 4932 4939 4941 4942 4950 5010 5020 5030 5040 5110 5121 5122 5210 5221 5222 5223 5224 5229 5310 5320 5510 5520 5530 5590 5610 5621 5629 5630 5811 5812 5813 5814 5819 5821 5829 5911 5912 5913 5914 5920 6010 6020 6110 6120 6130 6190 6201 6202 6203 6209 6311 6312 6391 6399 6411 6419 6420 6430 6491 6492 6499 6511 6512 6520 6530 6611 6612 6619 6621 6622 6629 6630 6810 6820 6831 6832 6910 6920 7010 7021 7022 7111 7112 7120 7211 7219 7220 7311 7312 7320 7410 7420 7430 7490 7500 7711 7712 7721 7722 7729 7731 7732 7733 7734 7735 7739 7740 7810 7820 7830 7911 7912 7990 8010 8020 8030 8110 8121 8122 8129 8130 8211 8219 8220 8230 8291 8292 8299 8411 8412 8413 8421 8422 8423 8424 8425 8430 8510 8520 8531 8532 8541 8542 8551 8552 8553 8559 8560 8610 8621 8622 8623 8690 8710 8720 8730 8790 8810 8891 8899 9001 9002 9003 9004 9101 9102 9103 9104 9200 9311 9312 9313 9319 9321 9329 9411 9412 9420 9491 9492 9499 9511 9512 9521 9522 9523 9524 9525 9529 9601 9602 9603 9604 9609 9700 9810 9820 9900
# Classifying Text into NACE Codes

This model is [xlm-roberta-base](https://huggingface.co/xlm-roberta-base) fine-tuned to classify descriptions of activities into [NACE Rev. 2](https://ec.europa.eu/eurostat/web/nace-rev2) codes.


## Data
The data used to fine-tune the model consist of 2.5 million descriptions of activities from Norwegian and Danish businesses. To improve the model's multilingual performance, random samples of the Norwegian and Danish descriptions were machine translated into the following languages:
- English
- German
- Spanish
- French
- Finnish
- Polish


## Quick Start

```python
from transformers import pipeline, AutoTokenizer, AutoModelForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("erst/xlm-roberta-base-finetuned-nace")
model = AutoModelForSequenceClassification.from_pretrained("erst/xlm-roberta-base-finetuned-nace")

pl = pipeline(
    "sentiment-analysis",
    model=model,
    tokenizer=tokenizer,
    return_all_scores=False,
)

pl("The purpose of our company is to build houses")
```
