add unicodedata
Browse files- app.py +3 -0
- requirements.txt +2 -1
app.py
CHANGED
@@ -10,6 +10,7 @@ from pathlib import Path
|
|
10 |
import pandas as pd
|
11 |
import plotly.express as px
|
12 |
import keras
|
|
|
13 |
|
14 |
from underthesea import word_tokenize
|
15 |
|
@@ -81,6 +82,8 @@ def judge(x):
|
|
81 |
result = []
|
82 |
judge_result = []
|
83 |
|
|
|
|
|
84 |
lstm_pred = LSTM_predict(x)
|
85 |
gru_pred = GRU_predict(x)
|
86 |
# bert_pred = BERT_predict(x)
|
|
|
10 |
import pandas as pd
|
11 |
import plotly.express as px
|
12 |
import keras
|
13 |
+
import unicodedata as ud
|
14 |
|
15 |
from underthesea import word_tokenize
|
16 |
|
|
|
82 |
result = []
|
83 |
judge_result = []
|
84 |
|
85 |
+
x = ud.normalize('NFKC', x)
|
86 |
+
|
87 |
lstm_pred = LSTM_predict(x)
|
88 |
gru_pred = GRU_predict(x)
|
89 |
# bert_pred = BERT_predict(x)
|
requirements.txt
CHANGED
@@ -9,4 +9,5 @@ pandas
|
|
9 |
keras==2.15.0
|
10 |
underthesea
|
11 |
torch
|
12 |
-
transformers
|
|
|
|
9 |
keras==2.15.0
|
10 |
underthesea
|
11 |
torch
|
12 |
+
transformers
|
13 |
+
unicodedata
|