File size: 1,481 Bytes
187dc3c
 
5704814
 
 
187dc3c
5704814
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
---
license: cc-by-nc-nd-4.0
language: ko
widget:
  - text: 피고인은 2022. 11. 14. 혈중알콜농도 0.123%의 술에 취한 상태로 승용차를 운전하였다.
---
# Model information
KLAID(Korean Legal Artificial Intelligence Datasets) LJP classification model based on pretrained KLUE RoBERTa-base. See more information about KLUE: [Github](https://github.com/KLUE-benchmark/KLUE) and [Paper](https://arxiv.org/abs/2105.09680) for more details.
## How to use
_NOTE:_ Use `BertTokenizer` instead of RobertaTokenizer and RobertaForSequenceClassification. (`AutoTokenizer` will load `BertTokenizer`)
```python
import numpy as np
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("lawcompany/KLAID_LJP_base")
model = AutoModelForSequenceClassification.from_pretrained("lawcompany/KLAID_LJP_base")
model.eval()
input_data = tokenizer("피고인은 2022. 11. 14. 혈중알콜농도 0.123%의 술에 취한 상태로 승용차를 운전하였다.", 
                       max_length=512, 
                       return_tensors="pt")
logits = model(**input_data).logits.detach().numpy()
pred = np.argmax(logits)
# output
# 7
```

## Licensing information
Copyright 2022-present [Law&Company Co. Ltd.](https://career.lawcompany.co.kr/)

Licensed under the CC-BY-NC-ND-4.0

## Other Inquiries
- **Email:** [[email protected]]([email protected])
- **Homepage:** [https://klaid.net/](https://klaid.net/)