j5ng commited on
Commit
35a522c
β€’
1 Parent(s): e92823b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +0 -40
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% )