Skip to content

Commit

Permalink
refactor: tokenizer 분리
Browse files Browse the repository at this point in the history
  • Loading branch information
yooooonshine committed Sep 2, 2024
1 parent b48ac39 commit 1ab066d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
8 changes: 1 addition & 7 deletions aiServer/stock/ai_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
import pandas as pd
import requests
from bs4 import BeautifulSoup
from konlpy.tag import Okt
from sklearn.linear_model import LinearRegression
from sklearn.model_selection import train_test_split



class Output:
def __init__(self, product_number, name, quantity):
self.product_number = product_number
Expand All @@ -37,16 +37,10 @@ def get_stock_order_ratio(stocks) -> list[dict[str, Any]]:
# outputs = []
# output = Output("005930", "삼성전자", 1)
# outputs.append(output.to_dict())

return outputs


okt = Okt()


def okt_tokenizer(text):
tokens = okt.morphs(text)
return tokens


title_list = []
Expand Down
8 changes: 8 additions & 0 deletions aiServer/stock/tokenizer.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from konlpy.tag import Okt

okt = Okt()


def okt_tokenizer(text):
tokens = okt.morphs(text)
return tokens

0 comments on commit 1ab066d

Please sign in to comment.