Update README.md
Browse files
README.md
CHANGED
|
@@ -10,17 +10,6 @@ formal classifier or honorific classifier
|
|
| 10 |
|
| 11 |
## νκ΅μ΄ μ‘΄λλ§ λ°λ§ λΆλ₯κΈ°
|
| 12 |
|
| 13 |
-
μ€λμ μ μ‘΄λλ§ , λ°λ§μ νκ΅μ΄ ννμ λΆμκΈ°λ‘ λΆλ₯νλ κ°λ¨ν λ°©λ²μ μκ°νλ€.<br>
|
| 14 |
-
νμ§λ§ μ΄ λ°©λ²μ μ€μ λ‘ μ μ©νλ € νλλ, λ§μ λΆλΆμμ μ€λ₯κ° λ°μνμλ€.
|
| 15 |
-
|
| 16 |
-
μλ₯Ό λ€λ©΄)
|
| 17 |
-
```bash
|
| 18 |
-
μ λ²μ κ΅μλκ»μ μλ£ κ°μ Έμ€λΌνλλ° κΈ°μ΅λ?
|
| 19 |
-
```
|
| 20 |
-
λΌλ 문ꡬλ₯Ό "κ»μ"λΌλ μ‘΄μΉλλ¬Έμ μ 체문μ₯μ μ‘΄λλ§λ‘ νλ¨νλ μ€λ₯κ° λ§μ΄ λ°μνλ€. <br>
|
| 21 |
-
κ·Έλμ μ΄λ²μ λ₯λ¬λ λͺ¨λΈμ λ§λ€κ³ κ·Έ κ³Όμ μ 곡μ ν΄λ³΄κ³ μνλ€.
|
| 22 |
-
|
| 23 |
-
#### λΉ λ₯΄κ² κ°μ Έλ€ μ°μ€ λΆλ€μ μλ μ½λλ‘ λ°λ‘ μ¬μ©νμ€ μ μμ΅λλ€.
|
| 24 |
```python
|
| 25 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification, pipeline
|
| 26 |
|
|
@@ -69,11 +58,6 @@ pandas==1.5.3
|
|
| 69 |
- HuggingFace : https://huggingface.co/beomi/kcbert-base
|
| 70 |
***
|
| 71 |
|
| 72 |
-
## λ°μ΄ν°
|
| 73 |
-
```bash
|
| 74 |
-
get_train_data.py
|
| 75 |
-
```
|
| 76 |
-
|
| 77 |
### μμ
|
| 78 |
|sentence|label|
|
| 79 |
|------|---|
|
|
@@ -92,30 +76,6 @@ get_train_data.py
|
|
| 92 |
|
| 93 |
***
|
| 94 |
|
| 95 |
-
## νμ΅(train)
|
| 96 |
-
```bash
|
| 97 |
-
python3 modeling/train.py
|
| 98 |
-
```
|
| 99 |
-
|
| 100 |
-
***
|
| 101 |
-
|
| 102 |
-
## μμΈ‘(inference)
|
| 103 |
-
```bash
|
| 104 |
-
python3 inference.py
|
| 105 |
-
```
|
| 106 |
-
|
| 107 |
-
```python
|
| 108 |
-
def formal_percentage(self, text):
|
| 109 |
-
return round(float(self.predict(text)[0][1]), 2)
|
| 110 |
-
|
| 111 |
-
def print_message(self, text):
|
| 112 |
-
result = self.formal_persentage(text)
|
| 113 |
-
if result > 0.5:
|
| 114 |
-
print(f'{text} : μ‘΄λλ§μ
λλ€. ( νλ₯ {result*100}% )')
|
| 115 |
-
if result < 0.5:
|
| 116 |
-
print(f'{text} : λ°λ§μ
λλ€. ( νλ₯ {((1 - result)*100)}% )')
|
| 117 |
-
```
|
| 118 |
-
|
| 119 |
κ²°κ³Ό
|
| 120 |
```
|
| 121 |
μ λ²μ κ΅μλκ»μ μλ£ κ°μ Έμ€λΌνμ
¨λλ° κΈ°μ΅λμΈμ? : μ‘΄λλ§μ
λλ€. ( νλ₯ 99.19% )
|
|
|
|
| 10 |
|
| 11 |
## νκ΅μ΄ μ‘΄λλ§ λ°λ§ λΆλ₯κΈ°
|
| 12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
```python
|
| 14 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification, pipeline
|
| 15 |
|
|
|
|
| 58 |
- HuggingFace : https://huggingface.co/beomi/kcbert-base
|
| 59 |
***
|
| 60 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 61 |
### μμ
|
| 62 |
|sentence|label|
|
| 63 |
|------|---|
|
|
|
|
| 76 |
|
| 77 |
***
|
| 78 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 79 |
κ²°κ³Ό
|
| 80 |
```
|
| 81 |
μ λ²μ κ΅μλκ»μ μλ£ κ°μ Έμ€λΌνμ
¨λλ° κΈ°μ΅λμΈμ? : μ‘΄λλ§μ
λλ€. ( νλ₯ 99.19% )
|