Comments (5)
대시보드에 올리기 위해서는 list에 담지 않고 unnesting을 해야한다.
그래서 row 수가 기존에 존재하던 전처리 데이터 개수보다 훨씬 늘었다.
from nlp-project.
여기서 끝이 아니라 워드 클라우드를 만들기 위해
하나의 리뷰에서 단어들을 추출해서, 그걸 또 unnesting하면...? 안 해봤지만 벌써 무섭다
from nlp-project.
생각한 대안
- 굳이 워드클라우드를 만들어야할까? → kiwipiepy를 쓰는 것도 NLP의 일종이라 버리기 살짝 아깝다. 대시보드 완성도도 떨어지지 않을까.
MainCategory
가 총 4개인데, 하나만 골라서 대시보드를 만들까? → 데이터 개수가 가장 적은 남성화장품 카테고리(현재 sentiment csv 확인해보니 3000여개 row)만을 대상으로 하면 될 것 같다. (=>결국 모든 카테고리 다 했다!)
from nlp-project.
2번을 선택하자. 대신 수정해야할 점은 아래와 같다.
* 참고: 0은 긍정
sentence | prediction | correct |
---|---|---|
여름에 몸에서 땀 냄새 안 나게 하려고 구매했는데 향도 좋고 오래가서 좋습니다 남성화장품#향 | 0 | 0 |
지금 csv가 이런 형식으로 되어있다. 코드를 sentence 안에 남성화장품#{속성}
을 따로 분리해 aspect
column에 넣도록 수정하자.
from nlp-project.
-
예상되는 분리 코드
import re sentences = [ "여름에 몸에서 땀 냄새 안 나게 하려고 구매했는데 향도 좋고 오래가서 좋습니다 남성화장품#향", "성분은 마음에 드는데 피부가 지성이라 번들거림이 과한 듯합니다 재구매 의사 없어요 남성화장품#성분" ] for sentence in sentences: match = re.search(r'남성화장품#([^\s]+)', sentence) if match: keyword = match.group(1) cleaned_sentence = re.sub(r'남성화장품#[^\s]+', '', sentence) # ... keyword, cleaned_sentence 를 이용하여 이후 구현 ... #
-
예상되는 형태소 분석 코드
from kiwipiepy import Kiwi def extract_nouns(kiwi, text): result = kiwi.tokenize(text) return [token.form for token in result if token.tag in {'NNG', 'NNP'}] kiwi = Kiwi() results = extract_nouns(kiwi, "여름에 몸에서 땀 냄새 안 나게 하려고 구매했는데 향도 좋고 오래가서 좋습니다")
from nlp-project.
Related Issues (10)
- 프로젝트 주제 HOT 5
- 데이터 개방 관련 HOT 5
- EDA 과정 HOT 5
- 데이터 사전 가공 HOT 6
- GPU 문제 HOT 5
- 데이터 사전 가공과 관련한 문제 HOT 5
- 디스크 용량 부족 문제 HOT 5
- 중간 Report 이후로 바뀐 점 정리 HOT 5
- 모델의 성능과 속도 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nlp-project.