Git Product home page Git Product logo

Comments (5)

heewoneha avatar heewoneha commented on August 17, 2024

그리고 train, validation, test 데이터를 임의로 분할했다. 생각해보니 모델이 학습/검증/테스트할 때 모든 속성이 담겨있지 않으면 문장에 속성이 드러나는지 T/F 예측할 때 문제가 생기지 않을까?

from nlp-project.

heewoneha avatar heewoneha commented on August 17, 2024

그리고 현재 max_length 를 256으로 설정했는데, 데이터 EDA(#3) 때 미처 확인하지 못했던 부분을 발견했다.
AiHub에서 제공한 속성기반감성분석 라벨링 데이터의 경우, 일반 홈페이지에서의 짤막한 리뷰와 SNS의 긴 리뷰가 모두 제공된다.
그래서 256자를 넘는 데이터가 간혹 있다.

512자로 바꿔서 실행해봤는데 cuda가 메모리 문제로 인해 실행조차 못한다. 일단 이 문제는 패스.

from nlp-project.

heewoneha avatar heewoneha commented on August 17, 2024

그런데 이렇게 하면 문제가 생긴다. 속성에 따른 문장까지 함께 제거하니 의도치 않게 다른 속성의 개수도 줄었다.

기존 전처리에서는 annotation에 일/십의 자리 개수의 속성이 있다면 raw_text를 포함한 데이터 자체를 지웠는데, annotation 안의 해당 aspect 값만 지워주는 것으로 수정했다.

ex)

data = [{'MainCategory': '스킨케어',
  'raw_text': '가격도착하고 촉촉하게 피부에스며들어 좋았어여',
  'annotation': [('가격', '1'), ('보습력/수분감', '1'), ('흡수력', '1')]},
 {'MainCategory': '스킨케어',
  'raw_text': '손에 살짝 발라봤어요 촉촉함의 확실한 차이가 느껴져요 바르고 나서 반짝거리는피부 가 좋아요 제품도 손에 쏙 들어보고 들고다니기 좋네요',
  'annotation': [('보습력/수분감', '1'), ('윤기/피부(톤)', '1'), ('편의성/활용성', '1')]},
 {'MainCategory': '스킨케어',
  'raw_text': '구성이 좋아서 엄마와 함께 나눠 사용하려고요 전 기본 멀티밤 사용했는데 얼굴에 광이 나요 다만 처음 바를땐 끈적이는 느낌이라 눈가나 목 같은데 발라요 얼굴 전체는 살짝 부담스러워요',
  'annotation': [('제품구성', '1'), ('윤기/피부(톤)', '1'), ('흡수력', '-1')]}]

만약 보습력/수분감 속성을 지운다면 여기에서 아래처럼.

data = [{'MainCategory': '스킨케어',
  'raw_text': '가격도착하고 촉촉하게 피부에스며들어 좋았어여',
  'annotation': [('가격', '1'), ('흡수력', '1')]},
 {'MainCategory': '스킨케어',
  'raw_text': '손에 살짝 발라봤어요 촉촉함의 확실한 차이가 느껴져요 바르고 나서 반짝거리는피부 가 좋아요 제품도 손에 쏙 들어보고 들고다니기 좋네요',
  'annotation': [('윤기/피부(톤)', '1'), ('편의성/활용성', '1')]},
 {'MainCategory': '스킨케어',
  'raw_text': '구성이 좋아서 엄마와 함께 나눠 사용하려고요 전 기본 멀티밤 사용했는데 얼굴에 광이 나요 다만 처음 바를땐 끈적이는 느낌이라 눈가나 목 같은데 발라요 얼굴 전체는 살짝 부담스러워요',
  'annotation': [('제품구성', '1'), ('윤기/피부(톤)', '1'), ('흡수력', '-1')]}]

from nlp-project.

heewoneha avatar heewoneha commented on August 17, 2024

e0433a0

추가로 여기에서 하드코딩해서 MainCategory별 속성을 불러오지 않고, 데이터로부터 끌어와서 알아서 하도록 코드를 변경했다.

from nlp-project.

heewoneha avatar heewoneha commented on August 17, 2024

#4 에 적은 카테고리별 속성 개수도 수정해야겠다.

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.