Git Product home page Git Product logo

Comments (5)

heewoneha avatar heewoneha commented on July 18, 2024

대시보드에 올리기 위해서는 list에 담지 않고 unnesting을 해야한다.
그래서 row 수가 기존에 존재하던 전처리 데이터 개수보다 훨씬 늘었다.

from nlp-project.

heewoneha avatar heewoneha commented on July 18, 2024

여기서 끝이 아니라 워드 클라우드를 만들기 위해
하나의 리뷰에서 단어들을 추출해서, 그걸 또 unnesting하면...? 안 해봤지만 벌써 무섭다

from nlp-project.

heewoneha avatar heewoneha commented on July 18, 2024

생각한 대안

  1. 굳이 워드클라우드를 만들어야할까? → kiwipiepy를 쓰는 것도 NLP의 일종이라 버리기 살짝 아깝다. 대시보드 완성도도 떨어지지 않을까.
  2. MainCategory가 총 4개인데, 하나만 골라서 대시보드를 만들까? → 데이터 개수가 가장 적은 남성화장품 카테고리(현재 sentiment csv 확인해보니 3000여개 row)만을 대상으로 하면 될 것 같다. (=>결국 모든 카테고리 다 했다!)

from nlp-project.

heewoneha avatar heewoneha commented on July 18, 2024

2번을 선택하자. 대신 수정해야할 점은 아래와 같다.

* 참고: 0은 긍정

sentence prediction correct
여름에 몸에서 땀 냄새 안 나게 하려고 구매했는데 향도 좋고 오래가서 좋습니다 남성화장품#향 0 0

지금 csv가 이런 형식으로 되어있다. 코드를 sentence 안에 남성화장품#{속성}을 따로 분리해 aspect column에 넣도록 수정하자.

from nlp-project.

heewoneha avatar heewoneha commented on July 18, 2024
  • 예상되는 분리 코드

    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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.