011100 011200 011300 011400 011500 011600 011900 012100 012200 012300 012400 012500 012600 012700 012800 012900 013000 014100 014200 014300 014400 014500 014610 014620 014700 014910 014920 015000 016100 016200 016300 016400 017000 021000 022000 023000 024000 031100 031200 032100 032200 051000 052000 061000 062000 071000 072100 072900 081100 081200 089100 089200 089300 089900 091000 099000 101110 101190 101200 101300 102010 102020 103100 103200 103900 104100 104200 105100 105200 106100 106200 107110 107120 107200 107300 108100 108200 108300 108400 108500 108600 108900 109100 109200 110100 110200 110300 110400 110500 110600 110700 120000 131000 132000 133000 139100 139210 139220 139300 139400 139500 139600 139900 141100 141200 141300 141400 141900 142000 143100 143900 151100 151200 152000 161000 162100 162200 162300 162400 162900 171100 171200 172100 172200 172300 172400 172900 181100 181200 181300 181400 182000 191000 192000 201100 201200 201300 201400 201500 201600 201700 202000 203000 204100 204200 205100 205200 205300 205900 206000 211000 212000 221100 221900 222100 222200 222300 222900 231100 231200 231300 231400 231900 232000 233100 233200 234100 234200 234300 234400 234900 235100 235200 236100 236200 236300 236400 236500 236900 237000 239100 239910 239990 241000 242000 243100 243200 243300 243400 244100 244200 244300 244400 244500 244600 245100 245200 245300 245400 251100 251200 252100 252900 253000 254000 255000 256100 256200 257100 257200 257300 259100 259200 259300 259400 259900 261100 261200 262000 263000 264000 265100 265200 266010 266090 267000 268000 271100 271200 272000 273100 273200 273300 274000 275100 275200 279000 281110 281190 281200 281300 281400 281500 282100 282200 282300 282400 282500 282900 283000 284100 284900 289100 289200 289300 289400 289500 289600 289900 291000 292000 293100 293200 301100 301200 302000 303000 304000 309100 309200 309900 310100 310200 310300 310900 321100 321200 321300 322000 323000 324000 325000 329100 329900 331100 331200 331300 331400 331500 331600 331700 331900 332000 351100 351200 351300 351400 352100 352200 352300 353000 360000 370000 381100 381200 382110 382120 382200 383100 383200 390000 411000 412000 421100 421200 421300 422100 422200 429100 429900 431100 431200 431300 432100 432200 432900 433100 433200 433300 433410 433420 433900 439100 439910 439990 451110 451120 451910 451920 452010 452020 452030 452040 453100 453200 454000 461100 461200 461300 461400 461500 461600 461710 461790 461800 461900 462100 462200 462300 462400 463100 463200 463300 463410 463420 463500 463600 463700 463810 463890 463900 464100 464210 464220 464310 464320 464330 464340 464350 464410 464420 464500 464610 464620 464700 464800 464910 464920 464930 464990 465100 465210 465220 466100 466200 466300 466400 466500 466600 466900 467100 467200 467310 467320 467400 467500 467600 467700 469000 471110 471120 471130 471900 472100 472200 472300 472400 472500 472600 472900 473000 474100 474200 474300 475100 475210 475220 475300 475400 475910 475920 475930 475940 475990 476100 476200 476300 476410 476420 476430 476500 477110 477120 477210 477220 477300 477400 477500 477610 477620 477630 477700 477810 477820 477830 477840 477890 477900 478100 478200 478900 479111 479112 479113 479114 479115 479116 479117 479119 479120 479900 491000 492000 493110 493120 493200 493910 493920 494100 494200 495000 501000 502000 503000 504000 511010 511020 512100 512200 521000 522110 522120 522130 522210 522220 522300 522400 522910 522920 522990 531000 532000 551010 551020 552000 553000 559000 561010 561020 562100 562900 563000 581100 581200 581300 581410 581420 581900 582100 582900 591110 591120 591200 591300 591400 592000 601000 602000 611000 612000 613000 619000 620100 620200 620300 620900 631100 631200 639100 639900 641100 641900 642010 642020 642030 643010 643020 643030 643040 649100 649210 649220 649230 649240 649900 651100 651200 652000 653010 653020 661100 661200 661900 662100 662200 662900 663000 681000 682010 682020 682030 682040 683110 683120 683210 683220 691000 692000 701010 701020 702100 702200 711100 711210 711220 711230 711240 711290 712010 712020 712090 721100 721900 722000 731110 731190 731200 732000 741010 741020 741030 742000 743000 749010 749090 750000 771100 771200 772100 772200 772900 773100 773200 773300 773400 773500 773900 774000 781000 782000 783000 791100 791200 799000 801000 802000 803000 811000 812100 812210 812220 812290 812900 813000 821100 821900 822000 823000 829100 829200 829900 841100 841200 841300 842100 842200 842300 842400 842500 843000 851000 852010 852020 853110 853120 853200 854100 854200 855100 855200 855300 855900 856000 861000 862100 862200 862300 869010 869020 869030 869040 869090 871010 871020 872010 872020 873010 873020 879010 879020 879090 881010 881020 881030 889110 889120 889130 889140 889150 889160 889910 889920 889990 900110 900120 900200 900300 900400 910110 910120 910200 910300 910400 920000 931100 931200 931300 931900 932100 932910 932990 941100 941200 942000 949100 949200 949900 951100 951200 952100 952200 952300 952400 952500 952900 960110 960120 960210 960220 960300 960400 960900 970000 981000 982000 990000
# Classifying Text into DB07 Codes

This model is [xlm-roberta-base](https://huggingface.co/xlm-roberta-base) fine-tuned to classify Danish descriptions of activities into [Dansk Branchekode DB07](https://www.dst.dk/en/Statistik/dokumentation/nomenklaturer/dansk-branchekode-db07) codes.


## Data
Approximately 2.5 million business names and descriptions of activities from Norwegian and Danish businesses were used to fine-tune the model. The Norwegian descriptions were translated into Danish and the Norwegian SN 2007 codes were translated into Danish DB07 codes.

Activity descriptions and business names were concatenated but separated by the separator token `</s>`. Thus, the model was trained on input texts in the format `f"{description_of_activity}</s>{business_name}"`.

## Quick Start

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

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

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

pl("Vi sælger sko")

pl("We sell clothes</s>Clothing ApS")
```
